Permalink
Browse files

Move merge_default_cursor! inside cursor_from_response

  • Loading branch information...
sferik committed Dec 20, 2012
1 parent 3f1fdb5 commit ecf657b205030736d26898b53bc56e5cb281d67b
@@ -93,7 +93,6 @@ def friendships(*args)
# @example Return an array of numeric IDs for every user who has a pending request to follow the authenticating user
# Twitter.friendships_incoming
def friendships_incoming(options={})
- merge_default_cursor!(options)
cursor_from_response(:ids, nil, :get, "/1.1/friendships/incoming.json", options, :friendships_incoming)
end
@@ -109,7 +108,6 @@ def friendships_incoming(options={})
# @example Return an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request
# Twitter.friendships_outgoing
def friendships_outgoing(options={})
- merge_default_cursor!(options)
cursor_from_response(:ids, nil, :get, "/1.1/friendships/outgoing.json", options, :friendships_outgoing)
end
View
@@ -519,7 +519,6 @@ def list_from_response(request_method, path, args)
def list_users(request_method, path, args, calling_method)
options = extract_options!(args)
- merge_default_cursor!(options)
merge_list!(options, args.pop)
merge_owner!(options, args.pop || screen_name) unless options[:owner_id] || options[:owner_screen_name]
cursor_from_response(:users, Twitter::User, request_method, path, options, calling_method)
@@ -67,7 +67,6 @@ def activity_by_friends(options={})
# Twitter.following_followers_of(7505382) # Same as above
def following_followers_of(*args)
options = extract_options!(args)
- merge_default_cursor!(options)
merge_user!(options, args.pop || screen_name) unless options[:user_id] || options[:screen_name]
cursor_from_response(:users, Twitter::User, :get, "/users/following_followers_of.json", options, :following_followers_of)
end
View
@@ -147,7 +147,6 @@ def update_profile_image(image, options={})
# @example Return an array of user objects that the authenticating user is blocking
# Twitter.blocking
def blocking(options={})
- merge_default_cursor!(options)
cursor_from_response(:users, Twitter::User, :get, "/1.1/blocks/list.json", options, :blocking)
end
View
@@ -56,7 +56,6 @@ def objects_from_response(klass, request_method, path, args)
# @return [Array<Integer>]
def ids_from_response(request_method, path, args, method_name)
options = extract_options!(args)
- merge_default_cursor!(options)
merge_user!(options, args.pop)
cursor_from_response(:ids, nil, request_method, path, options, method_name)
end
@@ -70,7 +69,6 @@ def ids_from_response(request_method, path, args, method_name)
# @return [Twitter::Cursor]
def cursor_object_from_response(collection_name, klass, request_method, path, args, method_name)
options = extract_options!(args)
- merge_default_cursor!(options)
merge_user!(options, args.pop || screen_name) unless options[:user_id] || options[:screen_name]
cursor_from_response(collection_name, klass, request_method, path, options, method_name)
end
@@ -83,6 +81,7 @@ def cursor_object_from_response(collection_name, klass, request_method, path, ar
# @param method_name [Symbol]
# @return [Twitter::Cursor]
def cursor_from_response(collection_name, klass, request_method, path, params, method_name)
+ merge_default_cursor!(params)
response = send(request_method.to_sym, path, params)
Twitter::Cursor.from_response(response, collection_name.to_sym, klass, self, method_name, params)
end

0 comments on commit ecf657b

Please sign in to comment.