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

fix issue 358 #370

Merged
merged 1 commit into from Jul 16, 2016

Conversation

Projects
None yet
2 participants
@jeremylow
Collaborator

jeremylow commented Jul 16, 2016

Adds ability to set rate limit endpoints even if api.sleep_on_rate_limit is False

Basically, if you instantiate an Api instance with sleep_on_rate_limit=False, then previously we would not keep track of the data returned in the headers that pertained to the rate limit. My thinking is that there could be a use case where you don't want the Api to sleep for 15 minutes (the default behavior when you're rate limited), but would rather have the program do something else.

This change has the Api keep track of the rate limit status of any endpoint that the user specifically calls, but won't, on its own, go out and obtain the full rate limit endpoint and doesn't force the user into the default sleeping behavior.


This change is Reviewable

@bear

This comment has been minimized.

Owner

bear commented Jul 16, 2016

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@bear

This comment has been minimized.

Owner

bear commented Jul 16, 2016

👍 - I like that this allows a saner default for this one use case

@jeremylow jeremylow merged commit 82304af into master Jul 16, 2016

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
code-review/reviewable 3 files reviewed
Details
dependency-ci Dependencies checked
Details

@jeremylow jeremylow deleted the fix/issue358 branch Jul 16, 2016

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