module TwitterWithAutoPagination::REST::Lists

Public Instance Methods

list_members(*args) click to toggle source

Returns the members of the specified list.

# File lib/twitter_with_auto_pagination/rest/lists.rb, line 19
def list_members(*args)
  options = {count: 5000, skip_status: 1, cursor: -1}.merge(args.extract_options!)

  collect_with_cursor do |next_cursor|
    options[:cursor] = next_cursor unless next_cursor.nil?
    twitter.send(:list_members, *args, options)
  end
end
memberships(*args) click to toggle source

Returns the lists the specified user has been added to.

# File lib/twitter_with_auto_pagination/rest/lists.rb, line 9
def memberships(*args)
  options = {count: 1000, cursor: -1}.merge(args.extract_options!)

  collect_with_cursor do |next_cursor|
    options[:cursor] = next_cursor unless next_cursor.nil?
    twitter.send(:memberships, *args, options)
  end
end