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

x-app-limit-24hour-x header properties #495

Closed
hkong-mitre opened this issue Jul 28, 2023 · 1 comment
Closed

x-app-limit-24hour-x header properties #495

hkong-mitre opened this issue Jul 28, 2023 · 1 comment

Comments

@hkong-mitre
Copy link

How do I use this library to get the x-app-limit-24hour-reset, x-app-limit-24hour-limit, and x-app-limit-24hour-remaining header properties?

I tried using the @twitter-api-v2/plugin-rate-limit plugin, using this code in the examples, but it returns the rateLimit property, whereas I need the x-app-limit-24hour-x header properties, which are different and (for my application at least, more useful).

Thank you in advance,

@alkihis
Copy link
Collaborator

alkihis commented Oct 11, 2023

Hello,

As 1.15.2 it is now available in rateLimit.day property.

A rateLimit object is a TwitterRateLimit

interface SingleTwitterRateLimit {
  limit: number;
  reset: number;
  remaining: number;
}

interface TwitterRateLimit extends SingleTwitterRateLimit {
  day?: SingleTwitterRateLimit;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants