Skip to content

Commit

Permalink
Quick addition of cursor param for list_members
Browse files Browse the repository at this point in the history
Twitter API docs say the cursor param is optional, but paged results
(max of 20) are returned whether or not you include a cursor.
At least for the time being, you *must* page through list members.
  • Loading branch information
ivey committed Nov 30, 2009
1 parent 31341b3 commit 9f393f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/twitter/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ def memberships(list_owner_username)
perform_get("/#{list_owner_username}/lists/memberships.json")
end

def list_members(list_owner_username, slug)
perform_get("/#{list_owner_username}/#{slug}/members.json")
def list_members(list_owner_username, slug, cursor = nil)
path = "/#{list_owner_username}/#{slug}/members.json"
path += "?cursor=#{cursor}" if cursor
perform_get(path)
end

def list_add_member(list_owner_username, slug, new_id)
Expand Down

0 comments on commit 9f393f0

Please sign in to comment.