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
{{ message }}
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
Hi there! I was thinking about implementing a new trait, and I wanted to see if you had any feedback on its design and whether it would be appropriate for inclusion with Twitter::API or it should be its own standalone thing.
Basically, there are two things that I don't like about working with the Twitter API (not this module in particular - it's great! Just the API in general):
Different REST endpoints have different ways of paging through results; some use a next_cursor/cursor system, some use since_id and max_id.
I would much rather write code like this, which is more concise and less error prone:
my$tw = Twitter::API->new(...);
my$favorites = $tw->favorites;
while(my$tweet = $favorites->next) {
# process $tweet here...
}
# alternatively, you could call $favorites->all to return a list of all favorites
The $favorites value would be a cursor object that you could use above, but could still be an array reference so that it's backwards compatible with traditional usage. What do you think?