trevorsstone / goriot Goto Github PK
View Code? Open in Web Editor NEWGo bindings for official Riot/League of legends REST API
License: MIT License
Go bindings for official Riot/League of legends REST API
License: MIT License
Reddit user /u/sumair pointed out that the function names should probably not use GetXXX as it is not idiomatic for Go
Currently the code is not documented
Any chance at updating this for V3? If not I can clone it and make the updates and send a PR, but it looks like they changed quite a bit.
Currently the tests do almost nothing except help debug. Should have a full test suite to ensure functionality
Currently Errors only reports that there was a status error. Should return a unique error value per error allowing the developer to adapt to what happened.
Hi @TrevorSStone Great work man!
I'm still learning GoLang, really hard for the moment for me (Allways code in PHP) :/ hope in some moment have good skills to contribute to your work.
Anyway, did you see the API update by RIOT? http://developer.riotgames.com/discussion/riot-games-api/show/rXIx7RPr
Thanks.
With some of the latest updates, there have been instances where I've decided to double check the number of items in a slice instead of fixing the core of the problem, as referenced in #34. I'm working through MatchHistory now and finding that there are other use cases that are causing some problems.
At the moment, some endpoints allow looking up either 40, 10, or 1 summoners at a time. Endpoints that use TeamID currently allow 10 or 1 teams at a time. The new MatchHistory also has ChampionIDs and RankedQueue types that need to be comma seperated.
My suggestion is to create two new methods: intSliceToSeparatedString
and stringSliceToSeparatedString
. They can use a signature like this
intSliceToSeparatedString (seperator string, limit int, numbers []int) (separated string, err error) {}
The other option that I can think of is to remove the limit check from createSummonerIDString
and createTeamIDString
and do the check beforehand.
if len(summonerIDs) > 40 {
return nil, errors.New("The limit for summoner IDs in this endpoint is 40")
}
idStr, err = createSummonerIDString(summonerIDs)
// proceed as usual
Before I go making changes, what are your thoughts/feedback? I'm not sold on the method names and I'm not sure which way makes more sense.
We have released a new version (v1.3) of the summoner API.
This version contains the ability to look up all summoner data by multiple summoner IDs (or names for the by-name lookup), up to 40 at a time. The response will be map of each summoner ID (or name) to the JSON object containing the requested summoner data.
Note that Riot Games will support older version of an API for 60 days before removing them. This policy only applies to APIs with minor version changes (e.g. 1.1 -> 1.2).
Provide the ability to block until rate is available. Would make development easier when using the rate limited key
Hello Trevor,
Is any chance you can update GoRiot to latest changes and updates from RIOT?
Thank you very much.
Summoner names need to be URL encoded to ensure compatability
I believe the issue is that the rate limit timer is being started before the get request goes out. This causes a discrepancy between the internal timer for the server and client. It would be preferable to start the internal timer after receiving the first response from the server instead of prior to it.
Korean support has been added, but uses a different url. Need to use http://asia.api.pvp.net
Currently dates are just stored as int64. Should convert to a time.Time value to make working with them easier.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.