I am attempting to use the riot-api to build statistics pages for different players. The algorithm works after a specific player is identified, then an api call will attempt to fetch about 15 games. I then want to iterate through this list of 15 games where for each game, I need to make another api call to pull that matches specific game data. The game data then gets saved to cloud firestore. I choose to get about 15 games at a time because the riot api limits to 20 calls a second, and 100 calls every 2 minutes. The issues is I am going through all the algorithm too fast and I am getting a 429 error because I am hitting the limit. Is there a way to slow down the rate of my api calls to stay in the window or is there a better way to deal with the 429 error like a retry?
How to call an api and stay inside the rate limit (react javascript)
623 views Asked by Dan At
1
There are 1 answers
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in REACTJS
- ussd reader in Recket Native module
- Teams tab application returns SSO error in mobile Outlook
- Github Pages Deployment deploys a blank page
- Is there any way to glow this bulb image like a real light bulb
- Optimize LCP ReactJs
- Page in React only renders elements after refreshing
- Unable to Post Form Data to MongoDB because of picturepath
- MERN Stack App - User Avatar Upload - 500 Error After Deployment on Render
- Hooks are not supported inside an async component error in nextjs project using useQuery
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- On the server side, it returns undefined but on the client side, logs the values no problem
- Multilevel dropdown with checkboxes in Select component
- TypeScript Error only on big type only when assigned to a variable
- Deployment through app engine, cloud sql database, problem connecting with server code, doesn't connect
- Data is not filtering in props. Showing passdata.map is not a function
Related Questions in API
- Google Sheets API - Append Request not working
- Is there really no product for docs that has these?
- How to show suggested content in response using Azure Cognitive Search?
- error message when closing current position in binance futures, using ccxt library
- How to filter API data in React Native
- I have fetched an API with JS, but the output looks really bad and I don't know how to fix it
- Session is not storing in react and Asp Dot Core Web API
- Apex charts not rendering series value, showing cannot map values of NULL
- Configure IIS to accept API calls only from API Manager, Deny from direct calls
- Problems with API return using the Axios library in NextJS
- How to query by Iteration in pyral?
- Is there a way to have a user enter a url query and have a single function filter a database?
- Cant get value in Vue from data
- Read stories/posts using instagram API
- Need To Make Minor Change To REST API Response
Related Questions in RIOT-GAMES-API
- Riot Api how to get my puuid using my Summoner ID (the nick name that it shows ingame for me) [League of Legends]
- How to get the cookies from the riotgames auth API?
- How to get schema of headers in REST API
- Can't read/parse Riot API Match v5 results (Javascript/NodeJS)
- Missing stats from Riot DataDragon API
- Why does the PUUID of a League of Legends summoner change when using Riot API?
- Get all augments id and name from League of legends API
- Valorant HWID Band
- Riot API deserialization not saving in razorpages C#
- How does porofessor get data about the buffs?
- Collect results from all professional competitive League Of Legends games
- Best way to get SSID cookie from user through a discord bot
- Where should i start in my Riot Api Project?
- How do I use Riot Games API with an API key?
- Deserialize riot champion api in c#
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can use Cloud Tasks for rate limiting your calls to the riot-api. There are a couple of ways to achieve this...
Create another HTTP Cloud Function (the worker) to receive tasks from the queue, call the riot-api and write the data to Cloud Firestore. If you receive an error from the riot-api, the task will retry. Cloud Tasks will automatically reduce the rate of retries to avoid overloading your endpoint.