Giter Club home page Giter Club logo

Comments (9)

Lierrmm avatar Lierrmm commented on July 23, 2024 1

Will implement axios-rate-limit package later on and will add some defaults.

Will also allow these to be changed but up to the person using the API to handle the rate limit exceptions.

I will update this issue when completed.

Thanks! 😄

from node-callofduty.

Flupster avatar Flupster commented on July 23, 2024

https://github.com/aishek/axios-rate-limit

This could be used to local rate limit if the developer adds it in, should be very simple to implement

from node-callofduty.

gcazin avatar gcazin commented on July 23, 2024

It's look good yes

Very useful to implement this!

from node-callofduty.

Lierrmm avatar Lierrmm commented on July 23, 2024

Decided not to add the rate limit package as mentioned above but have added a login method which should reduce the rate-limiting unless you are hammering the API.

from node-callofduty.

Flupster avatar Flupster commented on July 23, 2024

Decided not to add the rate limit package as mentioned above but have added a login method which should reduce the rate-limiting unless you are hammering the API.

I am still getting rate limited pretty heavily, I would recommend exposing the apiAxios in the module so we can add our own rate limits without modifying this package

It should be as simple as adding module.axios = apiAxios; into index,js

I would also like to request that if a request fails you don't hardcode "Rate Limited", instead let the catch block report the error

from node-callofduty.

Lierrmm avatar Lierrmm commented on July 23, 2024

Hi, @Flupster,

The API will only return rate-limited if you are in fact limited.

I will expose Axios in an update later today.

from node-callofduty.

Lierrmm avatar Lierrmm commented on July 23, 2024

Update:

I have added axios-rate-limit and exposed apiaxios too in this commit

Hope this helps.

from node-callofduty.

Flupster avatar Flupster commented on July 23, 2024

Update:

I have added axios-rate-limit and exposed apiaxios too in this commit

Hope this helps.

Very nice, do you have any idea of the rate limit by cod?

Their headers don't supply any information, I was calling MWcombatwz and there was no rate limit for the user logged in, but if you were to check 3 or 4 different gamertags sporadically over a minute or two a rate limit gets applied, so it leads me to believe there is a maximum requests per hour for the API, would be nice to have exact figure so axios rate limit can be tuned perfectly to not get rate limited

from node-callofduty.

Lierrmm avatar Lierrmm commented on July 23, 2024

I haven't noticed any pattern with rate limits, I usually stick to a call every 4 seconds and it works fine.
I would have to investigate further.

from node-callofduty.

Related Issues (20)

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.