搜尋
繁體中文
設定
搜尋
全部結果 →

開發者

DomiAtlas 以靜態檔案釋出資料。沒有服務程序、API 金鑰或速率限制:下面每個地址都是同一主機上的檔案。

資料佈局

每個條目一個 JSON 檔案。表格在“columns”裡只列一次列名,“rows”的每一項按同樣順序給出一行。缺失值是 null,不是 0。每個表格帶自己來源的遊戲版本。

{
  "id": "general-cleopatra",
  "name": {"en": "Cleopatra", "zh": "埃及艳后"},
  "tables": [{
    "columns": ["level", "health"],
    "rows": [[1, 12000], [2, 12250]],
    "version": "13.1610"
  }]
}

表格列

同一個列名在所有條目裡含義相同。每張表只列它用到的列,所以不是每個條目都有全部列。

列名內容
level等級序號。
age時代序號;對應時代資料裡的“order”。
health基礎生命值,不含加成。
damage每次攻擊的基礎傷害,不含加成。
attack_interval兩次攻擊之間的秒數。
range攻擊範圍,使用遊戲配置單位。
cost升級費用,[資源, 數量] 對;空列表表示免費或不適用。
build_upgrade_time建造或升級時間(秒)。

null 表示客戶端沒有數值,絕不是 0。

靜態 API

先讀索引,確認“schemaVersion”,再讀列表或單個條目。各語言的名稱是單獨的檔案。

地址內容
/api/v1/index.jsonSchema、數量和端點列表
/api/v1/entities.json全部條目,每行一個摘要
/api/v1/entities/{id}.json單個條目及其表格和關係
/api/v1/names/{locale}.json某一語言的條目名稱
/search.{locale}.json某一語言的搜尋索引

每張表也有 CSV(適合表格軟體),每個分類還有一個 JSON 檔案。 資料下載 →

示例

const index = await fetch('https://domiatlas.top/api/v1/index.json').then(r => r.json());
if (index.schemaVersion !== 1) throw new Error('Unsupported schema');
const list = await fetch('https://domiatlas.top/api/v1/entities.json').then(r => r.json());
const id = list.entities.find(e => e.id === 'general-cleopatra').id;
const detail = await fetch(`https://domiatlas.top/api/v1/entities/${id}.json`).then(r => r.json());

規則與限制