Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
491 stars 46 forks source link

rettiwt.user.timeline(id, 5) returns the entire payload instead of just 5 tweets #502

Closed randyyu13 closed 8 months ago

randyyu13 commented 8 months ago

Issue is what title says ^

Rishikant181 commented 8 months ago

All cursored resources (like timeline, search, likes, retweets, followers, followings, etc) have a quirk, where if you fetch the first batch (without using a cursor), the default count of 20 items are fetched and the count is ignored. It's just how Twitter client's API works. For successive batches however, the cursor is taken into account.

TL;DR: Count parameter doesn't work for the first batch of tweets, but works for successive batches.

Rishikant181 commented 8 months ago

Another thing to add, if you are using it without logging in, count won't work even with a cursor and you'll just get the most popular tweets and not the recent ones (this too is a limitation).

randyyu13 commented 8 months ago

Got it