-
Notifications
You must be signed in to change notification settings - Fork 34
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
Provide better documentation #556
Comments
As per a recent PR, this doc link already provides a bit more info: https://octokit.github.io/rest.js/v19#throttling Maybe it should be somehow integrated in the README. |
Just ran into this as well, some additional information on this that might help understand at least some of your question can be found on the GH docs. |
I recently added some more type information to the That should satisfy the needs for the The As mentioned, this all relates to the GitHub docs, https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api?apiVersion=2022-11-28 |
There are only 2 utility functions (
onRateLimit
andonSecondaryRateLimit
) to define to use this library, yet they remain relatively cryptic despite the example provided in the README.options
parameter?Currently, it seems like I can mostly only imply these:
onRateLimit
will execute a retry if it returnstrue
(but what aboutfalse
? and whatonSecondaryRateLimit
?)retryAfter
uses the seconds as its time unit (why not include that information directly in the variable name? as per its name, this could even be interpreted as being a boolean we could use to trigger yet another retry)retryCount
is a counter which starts at 0 and gets incremented by 1 afteronRateLimit
is calledoptions
contains at least 2 values:url
andmethod
(but what even ismethod
?)There is already #76 but it seems to mostly relate to GHE (and it's been open for so long anyways). Personally, I built a tool that extensively relies on
plugin-throttling
and I would assume most of my users are non-GHE, so I'm creating this issue to hopefully cover my case as well.The text was updated successfully, but these errors were encountered: