Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RIOT API changes) New Matchlist parameters - integrate range splitting with background requests #73

Open
Colorfulstan opened this issue Aug 25, 2017 · 3 comments

Comments

@Colorfulstan
Copy link
Collaborator

Colorfulstan commented Aug 25, 2017

Watch how
https://discussion.developer.riotgames.com/questions/3155/why-pagination-is-a-problem.html
evolves.

Currently there is a new enforced pagination on the matchlist endpoint that might cause requests to fail bc they

a) have a too high range (>=100) for their beginIndex/endIndex done in Colorfulstan/LeagueJS@d97c533
b) have a too high range (> 1week) for their startTime/endTime

If a higher range is given, the Endpoint methods should ideally split the ranges and execute the neccessary requests in the background I think

@Colorfulstan
Copy link
Collaborator Author

@Colorfulstan
Copy link
Collaborator Author

Colorfulstan commented Sep 5, 2017

  • check and split beginIndex - endIndex (batches of 100)
  • check and split beginTime - endTime (1 week intervals)
  • if only beginIndex given: set endIndex +100
  • if only endIndex given: set beginIndex -100
  • if only beginTime given: set endTime +1week
  • if only endTime given: set beginTime -1week

There might be value in a method that returns an observable, but since the batches need to be requested in series anyway (du to missing filtered totalGames indication on the API) for now it will just return a Promise that resolves in a combined array of MatchReferences

@Colorfulstan
Copy link
Collaborator Author

Some things like setting endINdex to beginIndex + 100 were changed on the endpoint, so check what actually still is needed before implementing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant