trevorhobenshield / twitter-api-client

Implementation of X/Twitter v1, v2, and GraphQL APIs
https://pypi.org/project/twitter-api-client
MIT License
1.56k stars 207 forks source link

rate limit not appearing on following endpoint + rate limit logic #188

Closed Vishalk-PS closed 6 months ago

Vishalk-PS commented 7 months ago

Hi,

I am trying to display the rate limit for the following endpoint using the debug=1 parameter. However, this is all that shows up, which is the same as the result without the debug endpoint:

Following: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.03it/s]

Also, is the request limit based on the number of users' queried or the number of paginations? And if it is the number of paginations, how many following need to be queried for each pagination to be hit? I am conducting a large scale scrap and need all the information before having the script run.

Thanks!

Vishalk-PS commented 7 months ago

As a follow up, I tried querying a user's following list (12 following) 125 times before hitting the limit, so I'm a little confused about the discrepancy between that amount the 50 requests per 15 min as mentioned in the documentation.

trevorhobenshield commented 6 months ago

Also, is the request limit based on the number of users' queried or the number of paginations?

for the Scraper class all method's rate limits relate to a single request made to a GraphQL endpoint.

As a follow up, I tried querying a user's following list (12 following) 125 times before hitting the limit, so I'm a little confused about the discrepancy between that amount the 50 requests per 15 min as mentioned in the documentation.

things could have changed over time, I will look into this and update the readme

for now, i've added a rate_limits property that you can use to see what the current limits for each method are.