Skip to content

HearthStone Deck Tracker API calls

Jeffrey Tong edited this page Mar 3, 2015 · 1 revision

MATCH_AFTER

curl -X POST -H "Content-Type: application/json" -d '{"date":"1422828005"}' http://localhost:3000/api/v2/matches/hdt_after?auth_token=key

DECK_AFTER

curl -X POST -H "Content-Type: application/json" -d '{"date":"1422484174"}' http://localhost:3000/api/v2/decks/hdt_after?auth_token=key

CREATE VERSION

curl -X POST -H "Content-Type: application/json" -d '{"deck_id": "248511", "version": "3.0", "cards":[{"id":"EX1_169","count":"2"},{"id":"EX1_008","count":"2"},{"id":"EX1_160","count":"2"},{"id":null,"count":"2"},{"id":null,"count":"2"},{"id":"FP1_003","count":"2"},{"id":"FP1_002","count":"2"},{"id":"CS2_011","count":"2"},{"id":"EX1_590","count":"1"},{"id":null,"count":"2"},{"id":"EX1_158","count":"1"},{"id":"CS2_012","count":"2"},{"id":"NEW1_026","count":"2"},{"id":"EX1_284","count":"2"},{"id":"EX1_571","count":"1"},{"id":"NEW1_008","count":"2"},{"id":null,"count":"1"}]}' http://localhost:3000/api/v2/decks/hdt_create?auth_token=key

LOGIN:

curl -v -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST http://localhost:3000/api/v2/users/sign_in -d "{\"user_login\":{\"email\":\"[email protected]\",\"password\":\"pwd\"}}"

MATCH DELETE

curl -X POST -H "Content-Type: application/json" -d '{"match_id": [263,283,282]}' http://localhost:3000/api/v2/decks/delete?auth_token=key

DECK DELETE

curl -X POST -H "Content-Type: application/json" -d '{"deck_id": [249522]}' http://localhost:3000/api/v2/decks/delete?auth_token=key

MATCH MOVE

curl -X POST -H "Content-Type: application/json" -d '{"match_id": [263,283,282], "deck_id": "71"}' http://localhost:3000/api/v2/matches/move?auth_token=key

DECK EDIT

curl -X POST -H "Content-Type: application/json" -d '{"name": "sameguy", "class":"Druid", "cards":[{"id":"EX1_169","count":"2"},{"id":"EX1_008","count":"2"},{"id":"EX1_160","count":"2"},{"id":null,"count":"2"},{"id":null,"count":"2"},{"id":"FP1_003","count":"2"},{"id":"FP1_002","count":"2"},{"id":"CS2_011","count":"2"},{"id":"EX1_590","count":"1"},{"id":null,"count":"2"},{"id":"EX1_158","count":"1"},{"id":"CS2_012","count":"2"},{"id":"NEW1_026","count":"2"},{"id":"EX1_284","count":"2"},{"id":"EX1_571","count":"1"},{"id":"NEW1_008","count":"2"},{"id":null,"count":"1"}]}' http://localhost:3000/api/v2/decks/hdt_create?auth_token=key

ARENA

CREATE ARENA DECK

curl -X POST -H "Content-Type: application/json" -d ' {"class":"Paladin","cards":[{"count":"1","id":"CS2_188"},{"count":"1","id":"EX1_619"},{"count":"1","id":"NEW1_018"},{"count":"1","id":"CS2_173"},{"count":"1","id":"NEW1_019"},{"count":"1","id":"NEW1_037"},{"count":"1","id":"GVG_058"},{"count":"1","id":"GVG_059"},{"count":"1","id":"EX1_366"},{"count":"2","id":"EX1_382"},{"count":"1","id":"CS2_122"},{"count":"1","id":"EX1_020"},{"count":"1","id":"GVG_044"},{"count":"1","id":"CS2_097"},{"count":"2","id":"CS2_093"},{"count":"1","id":"GVG_068"},{"count":"1","id":"CS2_182"},{"count":"2","id":"EX1_046"},{"count":"1","id":"GVG_107"},{"count":"1","id":"GVG_070"},{"count":"1","id":"CS2_227"},{"count":"1","id":"EX1_384"},{"count":"1","id":"EX1_583"},{"count":"1","id":"EX1_032"},{"count":"1","id":"CS2_088"},{"count":"2","id":"CS2_222"}]}' http://localhost:3000/api/v2/arena_runs/new?auth_token=key

ARENA MATCH SUBMISSION

curl -X POST -H "Content-Type: application/json" -d '{"mode":"Arena","class":"Paladin","result":"Loss","coin":"true","numturns":0,"duration":8,"arena_run_id":"74","oppclass":"Mage","oppname":"BecauseRavin"}' http://localhost:3000/api/v2/matches/hdt_new?auth_token=key
Clone this wiki locally