sferik / x-ruby

A Ruby interface to the X API.
MIT License
68 stars 13 forks source link

Get monthly rate limits #23

Closed tophertoy closed 2 months ago

tophertoy commented 3 months ago

Thanks for your work on this gem.

It's very useful!

Is there anyway to get monthly rate limits?

When we get a X::TooManyRequests I know we get rate limits from the response but these tend to be hourly. I need a way to track monthly rate limits and adjust API request attempts based on the monthly limits..

sferik commented 3 months ago

How does the API return monthly limits? Is it one of the header values of a 429 response? I wasn’t able to find any documentation on this. If you can provide an example response, I can expand the X::RateLimit object to parse and return the value.

sferik commented 2 months ago

@tophertoy It's been two weeks since I asked this question. I’m going to close this issue now but feel free to reopen it if you have a response.

tophertoy commented 2 months ago

Sorry for the delay. We had to stop using the gem for other reasons.

Apologies.

On Thu, Mar 14, 2024, 07:54 Erik Berlin @.***> wrote:

@tophertoy https://github.com/tophertoy It's been two weeks since I asked this question. I’m going to close this issue now but feel free to reopen it if you have a response.

— Reply to this email directly, view it on GitHub https://github.com/sferik/x-ruby/issues/23#issuecomment-1995384816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELL7EU4PDJNRVCYVOQIADYYCOHBAVCNFSM6AAAAABDSAKZDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVGM4DIOBRGY . You are receiving this because you were mentioned.Message ID: @.***>

sferik commented 2 months ago

What were the reasons? If you don't want to share publicly, please feel free to email me: sferik@gmail.com

tophertoy commented 2 months ago

Twitter API costs.

sferik commented 2 months ago

Gotcha. Happy to hear it wasn’t an issue with this library specifically.