The popular Track-o-bot Hearthstone tracker offers an API to upload match results to a player's online profile. The simplest way to do it is to download a Firefox plug-in called Poster to send a proper request to the API. After installing it and opening its window, a minimal request can be compiled as follows:
- URL must be compiled to
https://trackobot.com/profile/results.json?username=YOUR_USERNAME&token=YOUR_SECRET_TOKEN
where username and token can be obtained on the API page of your online profile Settings section. - Content Type must be compiled to
application/json
. - The payload for the request must be a JSON object of the following form:
{
"result": {
"hero": "Warlock",
"opponent": "Hunter",
"mode": "ranked",
"win": true,
"rank": 18,
"added": "2016-07-01T21:35:00.000Z"
}
}
To send the request, press POST. A new window will appear with the response details: a HTTP 201 Created code and a response payload composed by the same JSON object you sent in the request when the match has been successfully recorded, a HTTP error and some HTML code explaining the error when the request has been rejected. In case of a successful request, the new entry should immediately be visible on the online profile page.
Some other details can be obtained from a Gist by the author of Track-o-bot, or by looking at the code for the data structure that represents a match result.