Module: TwitterFriendly::REST::Favorites
- Included in:
- API
- Defined in:
- lib/twitter_friendly/rest/favorites.rb
Constant Summary collapse
- MAX_TWEETS_PER_REQUEST =
100
Instance Method Summary collapse
Instance Method Details
#favorites(*args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/twitter_friendly/rest/favorites.rb', line 7 def favorites(*args) = {count: MAX_TWEETS_PER_REQUEST}.merge(args.) args << if [:count] <= MAX_TWEETS_PER_REQUEST @twitter.favorites(*args)&.map(&:attrs) else fetch_tweets_with_max_id(__method__, MAX_TWEETS_PER_REQUEST, *args) end end |