What is dotapicker.com?
dotapicker.com is one of the leading hero counter & synergy picking apps available. We statistically calculate suggestions from millions of games.
What is Autopicker?
Currently our users have to manually introduce the heroes picked by their teammates and enemies. We want to automate this process.
The picking info is already automatically read by 3rd party apps, they could easily also send it to our servers.
We will of-course list all the apps on our website and users will want to install the apps for this feature.
If you are interested in doing this please
contact us.
How will this be implemented?
The app should have a menu where the user can enter his steamid and security token, which they can find on our website in the profile section.
The app should display a dotapicker connections status box to see eventual errors (like authentication errors).
The app should make http requests to our servers to send the picking data and also to mark that the user is active. This API is already implemented.
The picks will then be autoupdated on our website if the user is logged in. Use
this link to have the feature enabled.
API
Request
- A POST should be made to http://dotapicker.com/api/autopicker/update/{steamid}/{security_token}
- The content of the post should be a JSON and the "Content-type" header set to "application/json".
- {ping: true} - request with ping should be sent at least each 30 seconds so that the picker knows the app is connected, whenever the app is active, even during the actual game. This is so that we can show the user if the app is connected or no, through the and icons.
-
{
isRadiant: true/false, //true if the user is Radiant, false if the user is Dire.
radiantPick: [123, 32], //Array of integers, the ids of the heroes in the Radiant team.
direPick: [], //Array of integers, the ids of the heroes in the Dire team.
radiantBan: [], //Array of integers, the ids of the heroes banned by the Radiant team.
direBan: [], //Array of integers, the ids of the heroes banned by the Dire team.
unavailableHeroes: [],//Array of integers, the ids of the heroes unavailable in random draft or banned heroes in all pick.
app: "appname" //String, name of the app, used for statistics.
} - pick info should be sent whenever something has changed in the pick.
- Any pick info request resets the previously sent pick info. We can also implement something which works incrementally if it is needed.
- The ids of the heroes are the official valve dota 2 hero ids.
- When a new game starts to load, to reset the pick, sent a request with empty arrays on eack array key: { isRadiant: true, radiantPick: [], direPick: [], radiantBan: [], direBan: [], unavailableHeroes: [], app: "appname"} - this will also signal that picks will follow and the picker will check for changes more often.
Response
- Is a JSON, {"error": true/false, "errorId": "STRING_PRESENT_IF_ERROR"}
- errorId can be on of the following:
AUTHENTICATION_ERROR - when the steam id and auth token do not corespond
INSUFFICIENT_ENERGY - if the user ran out of energy and can't use this service anymore
MALFORMED_JSON - if the request is not a valid json
MALFORMED_JSON_DATA - if the data in the json is not valid
TEST CONSOLE
Please login with steam to use the testing API console.