Ensure that API calls are efficient

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Ensure that API calls are efficient



I'm integrating with the Sport Radar API. This is a pretty great API but I'm noticing it doesn't have a particular Endpoint that I was hoping to leverage.


Sport Radar



I noticed that the API does not have a Players index call. In order to get all the players in the league you have to go through this process (Confirmed by the API team)


Players


get


1) Call an endpoint that lists the ids of each team in the league.

2) For each Team id call an endpoint that gets each team and lists each player for each team.



All in all that is over 30 API requests for each time I need to run a fairly common function.


30



Store the Players in the database. So instead of reaching out through the API every time I need to list the players. I can just make a DB query for the players. This solution seems heavy handed though, I'd like for my application to not have to keep track of the players.



What are some ways of solving this problem? Again the questions is: What are ways of avoiding many api calls in order to get common data? Is the best solution just to make the 30 api call each time? Thank you!


30









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

C# - How to create a semi transparent or blurred backcolor on windows form

Will Oldham

Makefile test if variable is not empty