You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SDK you're using (please complete the following information):
Version: 4.29.0
Is your feature request related to a problem? Please describe.
Yes.Xero API's enforces the following rate limits:
5 concurrent request (per tenant)
60 requests per minute (per tenant)
5,000 request per day (per tenant)
10,000 requests per day (hard limit on the app level)
I'm currently creating a solution that works with these constraints.
Describe the solution you'd like
We want to be able to specify a hook on the XeroClient level like so:
import{XeroClient}from'xero-node';constclient=newXeroClient({clientId: process.env.XERO_CLIENT_ID,clientSecret: process.env.XERO_CLIENT_SECRET,redirectUris: [process.env.XERO_REDIRECT_URI],scopes: ['openid','profile','email','accounting.settings','payroll.employees','payroll.payruns','offline_access'],onResponse: (response: IncomingMessage)=>{constdayRemaining=response.headers['X-DayLimit-Remaining'];constminuteRemaining=response.headers['X-MinLimit-Remaining'];constAppMinLimit=response.headers['X-AppMinLimit-Remaining'];// do something}});
Describe alternatives you've considered
No alternatives available other than to write your own helper function that handles these everytime you make a request which isn't as good and causes a lot of code repetition.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
SDK you're using (please complete the following information):
Is your feature request related to a problem? Please describe.
Yes.Xero API's enforces the following rate limits:
I'm currently creating a solution that works with these constraints.
Describe the solution you'd like
We want to be able to specify a hook on the XeroClient level like so:
Describe alternatives you've considered
No alternatives available other than to write your own helper function that handles these everytime you make a request which isn't as good and causes a lot of code repetition.
Additional context
N/A
The text was updated successfully, but these errors were encountered: