Skip to content

Commit

Permalink
expose queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Megapixel99 authored and aishek committed May 30, 2024
1 parent d3cbf78 commit 5309038
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ AxiosRateLimit.prototype.getMaxRPS = function () {
return this.maxRequests / perSeconds
}

AxiosRateLimit.prototype.getQueue = function () {
return this.queue
}

AxiosRateLimit.prototype.setMaxRPS = function (rps) {
this.setRateLimitOptions({
maxRequests: rps,
Expand Down Expand Up @@ -156,6 +160,7 @@ function axiosRateLimit (axios, options) {
rateLimitInstance.setRateLimitOptions(options)

axios.getMaxRPS = AxiosRateLimit.prototype.getMaxRPS.bind(rateLimitInstance)
axios.getQueue = AxiosRateLimit.prototype.getQueue.bind(rateLimitInstance)
axios.setMaxRPS = AxiosRateLimit.prototype.setMaxRPS.bind(rateLimitInstance)
axios.setRateLimitOptions = AxiosRateLimit.prototype.setRateLimitOptions
.bind(rateLimitInstance)
Expand Down

0 comments on commit 5309038

Please sign in to comment.