From 9f393f05c127623f4c58a68e2246a3553f225349 Mon Sep 17 00:00:00 2001 From: "Michael D. Ivey" Date: Mon, 30 Nov 2009 13:02:44 -0600 Subject: [PATCH] Quick addition of cursor param for list_members 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. --- lib/twitter/base.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/twitter/base.rb b/lib/twitter/base.rb index ccae4fa28..3b3b35a9b 100644 --- a/lib/twitter/base.rb +++ b/lib/twitter/base.rb @@ -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)