Code Monkey home page Code Monkey logo

goriot's People

Contributors

bhops avatar kronthto avatar mattcan avatar r-shestilovski avatar trevorsstone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

goriot's Issues

V3 updates

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.

Needs Better Testing

Currently the tests do almost nothing except help debug. Should have a full test suite to ensure functionality

Better Error Handling

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.

Changing the method signature for createSummonerIDString and createTeamIDString

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.

Summoner API 1.3

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).

Handle Rate Limits Gracefully

Provide the ability to block until rate is available. Would make development easier when using the rate limited key

Riot API Updated

Hello Trevor,

Is any chance you can update GoRiot to latest changes and updates from RIOT?

Thank you very much.

Rate limiting is currently fudged by +1s to make up for a bug.

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.

Improve Date Handling

Currently dates are just stored as int64. Should convert to a time.Time value to make working with them easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.