Module: TwitterWithAutoPagination::REST::Lists
Constant Summary
Constants included from Utils
Instance Method Summary collapse
-
#list_members(*args) ⇒ Object
Returns the members of the specified list.
-
#memberships(*args) ⇒ Object
Returns the lists the specified user has been added to.
Methods included from Collector
#collect_with_cursor, #collect_with_max_id
Instance Method Details
#list_members(*args) ⇒ Object
Returns the members of the specified list.
19 20 21 22 23 24 25 26 |
# File 'lib/twitter_with_auto_pagination/rest/lists.rb', line 19 def list_members(*args) = {count: 5000, skip_status: 1, cursor: -1}.merge(args.) collect_with_cursor do |next_cursor| [:next_cursor] = next_cursor unless next_cursor.nil? twitter.send(:list_members, *args, ) end end |
#memberships(*args) ⇒ Object
Returns the lists the specified user has been added to.
9 10 11 12 13 14 15 16 |
# File 'lib/twitter_with_auto_pagination/rest/lists.rb', line 9 def memberships(*args) = {count: 1000, cursor: -1}.merge(args.) collect_with_cursor do |next_cursor| [:next_cursor] = next_cursor unless next_cursor.nil? twitter.send(:memberships, *args, ) end end |