core icon indicating copy to clipboard operation
core copied to clipboard

Paging support for players/{account_id}/mmr

Open doublekill2020 opened this issue 9 years ago • 35 comments

your opendota api is very worked to me,thank you

but i have a question :How to get account_id by user name

doublekill2020 avatar Jun 27 '17 05:06 doublekill2020

There isn't a really good way to do it since Steam users can change their tag at any time. You can try using the /search endpoint to attempt to find players by the last name we have on record for them.

howardchung avatar Jun 27 '17 08:06 howardchung

thank you .but when i query username = 123,there have too many results,but i want to get the results by page. is there have a good way to get?

doublekill2020 avatar Jun 27 '17 08:06 doublekill2020

Unfortunately the server limits results to 500, so searching for common usernames may be difficult. We do this because otherwise the search request might take too long.

howardchung avatar Jun 27 '17 08:06 howardchung

If the user logs in via Steam, your server can identify them and find their account_id that way.

howardchung avatar Jun 27 '17 08:06 howardchung

thank you

doublekill2020 avatar Jun 27 '17 08:06 doublekill2020

how to get player's recent match by page? @howardchung

doublekill2020 avatar Jun 29 '17 12:06 doublekill2020

i want to build an app with your api, but most of them doesn't have the way to get data by page.i'm very hope you to add this method to me .thank you very much.

doublekill2020 avatar Jun 29 '17 12:06 doublekill2020

What do you mean by recent match by page?

The /players/{account_id}/matches endpoint is a full listing of the matches the player has played.

/players/{account_id}/recentMatches returns only the last 20, but is faster.

howardchung avatar Jun 29 '17 16:06 howardchung

like this,https://wiki.teamfortress.com/wiki/WebAPI/GetMatchHistory start_at_match_id (Optional) (string) Start searching for matches equal to or older than this match ID matches_requested (Optional) (string) Amount of matches to include in results (default: 25).

doublekill2020 avatar Jun 29 '17 16:06 doublekill2020

That should be covered by the /players/{account_id}/matches endpoint. It returns all matches (there is no paging)

howardchung avatar Jun 30 '17 04:06 howardchung

If you want to page you can pass limit and offset parameters. (This should be in the docs, let me know if it's not there)

howardchung avatar Jun 30 '17 04:06 howardchung

ok

doublekill2020 avatar Jun 30 '17 07:06 doublekill2020

Hello my friend ,how to get hero's info by hero id?

doublekill2020 avatar Jul 04 '17 10:07 doublekill2020

What info are you looking for?

howardchung avatar Jul 04 '17 13:07 howardchung

for example,hero's icon,name,skills and hero's other info the more the better

doublekill2020 avatar Jul 04 '17 14:07 doublekill2020

See the dotaconstants project for this data: https://github.com/odota/dotaconstants/tree/master/build

howardchung avatar Jul 04 '17 17:07 howardchung

how can i know when the constants's data get updated?

doublekill2020 avatar Jul 05 '17 12:07 doublekill2020

You can watch the repo for updates. We run a script to update it after patches.

howardchung avatar Jul 05 '17 16:07 howardchung

https://api.opendota.com/api/players/{account_id}/ratings hey brother,can you add some params that can query the result by limit?

doublekill2020 avatar Jul 06 '17 11:07 doublekill2020

example?

howardchung avatar Jul 06 '17 16:07 howardchung