135 lines
4.2 KiB
Markdown
135 lines
4.2 KiB
Markdown
# Dune API Skill For OpenClaw Agents
|
|
|
|
Use `https://dune.api.coppnic.cc` as the API base URL.
|
|
|
|
Prefer detailed singular datasets for OpenClaw because they contain complete Questlog single-record payloads in `raw`:
|
|
|
|
```text
|
|
GET /api/item/{id}
|
|
GET /api/skill/{id}
|
|
GET /api/recipe/{id}
|
|
GET /api/placeable/{id}
|
|
GET /api/npc/{id}
|
|
```
|
|
|
|
Examples:
|
|
|
|
```text
|
|
GET /api/item/LongRifle_Unique_Poison_03?language=en
|
|
GET /api/item/Bloodsack_02?language=en
|
|
GET /api/skill/skills_ability_poisonmine?language=en
|
|
GET /api/recipe/Bloodsack_2_Recipe?language=en
|
|
GET /api/placeable/Atre_Banner_Placeable?language=en
|
|
GET /api/npc/bs43q?language=en
|
|
GET /api/search?q=poison&datasets=item,skill,recipe&language=en
|
|
```
|
|
|
|
Supported languages are `en` and `de`.
|
|
|
|
Detailed public datasets:
|
|
|
|
```text
|
|
item, skill, recipe, placeable, npc
|
|
```
|
|
|
|
Plural summary datasets:
|
|
|
|
```text
|
|
items, skills, recipes, placeables, npcs
|
|
```
|
|
|
|
Use singular datasets for complete stats and relationships. Use plural datasets only when a compact Questlog page-summary record is enough.
|
|
|
|
## Discord Markdown Output Contract
|
|
|
|
Rich Discord embeds are not available yet. When OpenClaw asks for Discord output, return a plain Discord message string formatted with Discord-supported Markdown only. Do not return embed JSON.
|
|
|
|
Use supported Markdown:
|
|
|
|
- Headings with `#`, `##`, or `###` for short section titles.
|
|
- Bold with asterisks, for example `**Assassin's Rifle**`. Do not use underscores for bold.
|
|
- Italic sparingly for secondary text.
|
|
- Unordered lists with `-` for fields and search results.
|
|
- Ordered lists for ranked results.
|
|
- Inline code for ids, dataset names, stat keys, and short values.
|
|
- Fenced code blocks for compact JSON or command examples.
|
|
- Links with `[label](url)` when a clean label helps.
|
|
- Blockquotes with `>` or `>>>` for quoted descriptions.
|
|
- Strikethrough only when it adds useful meaning.
|
|
|
|
Avoid unsupported or unreliable formatting:
|
|
|
|
- No Markdown tables.
|
|
- No HTML.
|
|
- No horizontal rules.
|
|
- No task lists.
|
|
- No footnotes, heading ids, definition lists, subscript, superscript, or highlight syntax.
|
|
- No images in Markdown.
|
|
- Do not rely on Markdown paragraph syntax or special line-break syntax; use normal newline-separated lines.
|
|
|
|
Default Discord result format:
|
|
|
|
```text
|
|
## Assassin's Rifle
|
|
**Type:** `item`
|
|
**Language:** `en`
|
|
**Source ID:** `LongRifle_Unique_Poison_03`
|
|
**Category:** `weapon` / `rifle`
|
|
|
|
**Stats**
|
|
- Damage: `128.25`
|
|
- Accuracy: `1.2`
|
|
- Clip Size: `2`
|
|
|
|
[Open in Dune API](https://dune.api.coppnic.cc/api/item/LongRifle_Unique_Poison_03?language=en)
|
|
```
|
|
|
|
Search result format:
|
|
|
|
```text
|
|
## Search Results: poison
|
|
1. **Poison Mine** (`skill`) - `skills_ability_poisonmine`
|
|
2. **Assassin's Rifle** (`item`) - `LongRifle_Unique_Poison_03`
|
|
|
|
Use `/api/{dataset}/{id}?language=en` for details.
|
|
```
|
|
|
|
Discord response rules:
|
|
|
|
- Keep responses concise enough for Discord message limits.
|
|
- Show at most 10 compact search results unless the user asks for more.
|
|
- For detailed records, prefer the most useful 5 to 8 fields.
|
|
- Do not dump the full `raw` object.
|
|
- Omit empty, null, unknown, or noisy fields.
|
|
- Include a Dune API link for single-record answers.
|
|
- Prefer singular datasets: `item`, `skill`, `recipe`, `placeable`, `npc`.
|
|
|
|
Dataset field ideas:
|
|
|
|
- `item`: grade, category, subcategory, weapon stats, armor stats, fillable stats.
|
|
- `skill`: category, subcategory, max skill level, level bonuses.
|
|
- `recipe`: output items, input items, crafting time, required stations.
|
|
- `placeable`: category, power, water, supported production types.
|
|
- `npc`: category, tags, description.
|
|
|
|
Repository guide:
|
|
|
|
```text
|
|
src/datasets.js Dataset keys, collections, Questlog methods, API allowlists.
|
|
src/importer/questlogClient.js Questlog URL building and TRPC response extraction.
|
|
src/importer/importer.js Import orchestration, detail fetches, Mongo upserts.
|
|
src/db/indexes.js Mongo indexes for summary and singular collections.
|
|
src/routes/api.js REST API routes, search, dataset lookup behavior.
|
|
src/swagger/openapi.js OpenAPI/Swagger documentation.
|
|
src/app.js Express middleware and public top-level routes.
|
|
scripts/import.js CLI import entry point.
|
|
```
|
|
|
|
Useful checks:
|
|
|
|
```text
|
|
GET /health
|
|
GET /api/datasets
|
|
GET /SKILL.md
|
|
```
|