atuleu / go-lol

Golang Domain, REST API binding and utilities for Riot Games League Of Legends
GNU General Public License v3.0
6 stars 2 forks source link

new champion masteries endpoint #2

Closed yawhide closed 8 years ago

yawhide commented 8 years ago

Hello,

Would it be possible for you to add the new champion masteries endpoint?

https://developer.riotgames.com/api/methods#!/1071

thanks!

atuleu commented 8 years ago

Hi,

Unfortunately this project is not in my top priority list ( I am finalizing my PhD thesis over the next months).

However it would not be difficult to add some structures that would represent this API. You should only need to add a structure that will Unmarshall the json you would get from the Riot API, and add a few func to APIEndpoint to get those structure. Its pretty straight forward and there is no magic.

Actually it would not have even be useful to make a go specific package for the riot API, as getting RESTfull data is easy and json is standard in golang. The only reason of that library is that the APIEndpoint limits the number of request you make to meet riot requirement, letting you forget abouth those 419 errors.

yawhide commented 8 years ago

Thanks for responding. Yeah, only reason why I ask was so I didn't have to re-implement the rate limiter. I'll take your advice ad extend your lib.

atuleu commented 8 years ago

Hi,

So I had a bit of time and will to implement it. result is in the branch master ( a574d32c66420b8bb9299f235e922598626561ef )

You will also found two new example to test the Champion Mastery API and one to store locally an API Key

bests,

yawhide commented 8 years ago

thank you very much!