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

Setting Manual Rate Limit #13

Open
Cypherous opened this issue Sep 7, 2022 · 1 comment
Open

Setting Manual Rate Limit #13

Cypherous opened this issue Sep 7, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@Cypherous
Copy link

Hiya, firstly thank you for making this library its going to help me a lot :)

So i had a question/request with regards to the rate limiting, is it possible to set a manual rate limit? sadly i'm a novice so i can't find where the check is happening myself to edit it so if i'm missing a really obvious line somewhere i apologise >.<

The reason for this is wanting to set the limit of the library to say 80% of my max so that there is still some overhead left for users to be able to still make calls where required on a website for adding new summoners to my database with the library mostly running in the background to help update data that i store

@dolejska-daniel dolejska-daniel self-assigned this Sep 8, 2022
@dolejska-daniel dolejska-daniel added enhancement New feature or request question Further information is requested labels Sep 8, 2022
@dolejska-daniel
Copy link
Owner

Hello! Thank you for using this library ☺️

Currently, there is no simple way to define such behaviour using the library configuration. However, you can subclass and extend the main LeagueAPI class and override RateLimitControl manager setup in the loadCache method with your own manager instance, which shall respect such constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants