Last active
January 5, 2018 15:33
-
-
Save fukaz55/84377c7ef504b19bf581b53447ddc314 to your computer and use it in GitHub Desktop.
track-o-bot API GETで取得できるJSONのサンプル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
history:[ // 対戦履歴の配列 | |
{ | |
id: 92131081, // track-o-botによって設定される一意のマッチID | |
mode: "casual", // casual, ranked, arena, friendly | |
hero: "Rogue", // ユーザーの使ったヒーロー | |
hero_deck: null, // card_historyから推測されたデッキタイプ。推測できなかった時はnull | |
opponent: "Priest", // 対戦相手のヒーロー | |
opponent_deck: "Dragon", // 対戦相手のデッキタイプ | |
coin: true, // コインの有無。先行であればfalse, 後攻であればtrue になる | |
result: "win", // 対戦結果。lose/winのみ? | |
duration: 473, // 対戦にかかった秒数 | |
note: null, // このマッチのメモ。Track-o-botのサイトでは吹き出しの形で表示される | |
added: "2017-09-24T03:59:21.000Z", // 対戦した日時をISO8601形式で表現 | |
card_history: [ // 対戦中にプレイされたカードの棋譜 | |
{ | |
turn: 1, // ターン数 | |
player: "me", // meは自分のターン, opponentは対戦相手のターン | |
card: { | |
id: "KAR_069", // カードID Hearthstone APIで提供されているカードデータのIDと同一 | |
name: "Swashburglar", // カード名 | |
mana: 1 // カードのマナ | |
} | |
}, | |
{ | |
turn: 2, | |
player: "opponent", | |
card: { | |
id: "CS1h_001", // ヒーローパワーにもIDが割り振られている | |
name: "Lesser Heal", | |
mana: 2 | |
} | |
}, | |
{ | |
turn: 2, | |
player: "me", | |
card: { | |
id: "ICC_851", | |
name: "Prince Keleseth", | |
mana: 2 | |
} | |
}, | |
{ | |
turn: 3, | |
player: "opponent", | |
card: { | |
id: "CS1h_001", | |
name: "Lesser Heal", | |
mana: 2 | |
} | |
}, | |
{ | |
turn: 3, | |
player: "me", | |
card: { | |
id: "UNG_072", | |
name: "Stonehill Defender", // 発見されたカードまでは記録されない | |
mana: 3 | |
} | |
}, | |
{ | |
turn: 4, | |
player: "opponent", | |
card: { | |
id: "KAR_114", | |
name: "Barnes", // カードの効果によってプレイ以外の手段で場に出たミニオンも記録されない | |
mana: 4 | |
} | |
}, ... | |
] | |
}, { | |
... // 1ページ辺り15件のデータまで取得できる | |
} | |
], | |
meta: { // メタ情報 | |
current_page: 1, // 取得したTrack-o-botのページ番号 | |
next_page: 2, // 次のページ番号 | |
prev_page: null, // 前のページ番号 | |
total_pages: 27, // 全ページ数 | |
total_items: 396 // すべての対戦数 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment