Skip to content

Commit

Permalink
Discourage setting the cursor manually [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Feb 11, 2014
1 parent 2ced592 commit cc2f8b5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
10 changes: 0 additions & 10 deletions lib/twitter/rest/friends_and_followers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ module FriendsAndFollowers
# Returns an array of numeric IDs for every user the authenticated user is following
#
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. This is recommended for users who are following many users. Provide a value of -1 to begin paging. Provide values as returned in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
# @overload friend_ids(user, options = {})
# Returns an array of numeric IDs for every user the specified user is following
#
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
def friend_ids(*args)
cursor_from_response_with_user(:ids, nil, :get, '/1.1/friends/ids.json', args)
end
Expand All @@ -41,13 +39,11 @@ def friend_ids(*args)
# Returns an array of numeric IDs for every user following the authenticated user
#
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @overload follower_ids(user, options = {})
# Returns an array of numeric IDs for every user following the specified user
#
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. This is recommended for users who are following many users. Provide a value of -1 to begin paging. Provide values as returned in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
def follower_ids(*args)
cursor_from_response_with_user(:ids, nil, :get, '/1.1/followers/ids.json', args)
end
Expand Down Expand Up @@ -78,7 +74,6 @@ def friendships(*args)
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
# @return [Twitter::Cursor]
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
def friendships_incoming(options = {})
perform_with_cursor(:get, '/1.1/friendships/incoming.json', options, :ids)
end
Expand All @@ -91,7 +86,6 @@ def friendships_incoming(options = {})
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
# @return [Twitter::Cursor]
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
def friendships_outgoing(options = {})
perform_with_cursor(:get, '/1.1/friendships/outgoing.json', options, :ids)
end
Expand Down Expand Up @@ -223,15 +217,13 @@ def friendship?(source, target, options = {})
# Returns a cursored collection of user objects for users following the authenticated user.
#
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. This is recommended for users who are following many users. Provide a value of -1 to begin paging. Provide values as returned in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
# @option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
# @option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
# @overload followers(user, options = {})
# Returns a cursored collection of user objects for users following the specified user.
#
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
# @option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
def followers(*args)
Expand All @@ -249,15 +241,13 @@ def followers(*args)
# Returns a cursored collection of user objects for every user the authenticated user is following (otherwise known as their "friends").
#
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. This is recommended for users who are following many users. Provide a value of -1 to begin paging. Provide values as returned in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.
# @option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
# @option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
# @overload friends(user, options = {})
# Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").
#
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @option options [Boolean, String, Integer] :skip_status Do not include contributee's Tweets when set to true, 't' or 1.
# @option options [Boolean, String, Integer] :include_user_entities The user entities node will be disincluded when set to false.
def friends(*args)
Expand Down
8 changes: 0 additions & 8 deletions lib/twitter/rest/lists.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,10 @@ def remove_list_member(*args)
# @return [Twitter::Cursor]
# @overload memberships(options = {})
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @option options [Boolean, String, Integer] :filter_to_owned_lists When set to true, t or 1, will return just lists the authenticating user owns, and the user represented by user_id or screen_name is a member of.
# @overload memberships(user, options = {})
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @option options [Boolean, String, Integer] :filter_to_owned_lists When set to true, t or 1, will return just lists the authenticating user owns, and the user represented by user_id or screen_name is a member of.
def memberships(*args)
cursor_from_response_with_user(:lists, Twitter::List, :get, '/1.1/lists/memberships.json', args)
Expand All @@ -113,12 +111,10 @@ def memberships(*args)
# @overload list_subscribers(list, options = {})
# @param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @overload list_subscribers(user, list, options = {})
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
def list_subscribers(*args)
cursor_from_response_with_list(:get, '/1.1/lists/subscribers.json', args)
end
Expand Down Expand Up @@ -232,12 +228,10 @@ def list_member?(*args)
# @overload list_members(list, options = {})
# @param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @overload list_members(user, list, options = {})
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param list [Integer, String, Twitter::List] A Twitter list ID, slug, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
def list_members(*args)
cursor_from_response_with_list(:get, '/1.1/lists/members.json', args)
end
Expand Down Expand Up @@ -351,11 +345,9 @@ def list(*args)
# @return [Twitter::Cursor]
# @overload subscriptions(options = {})
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @overload subscriptions(user, options = {})
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
def subscriptions(*args)
cursor_from_response_with_user(:lists, Twitter::List, :get, '/1.1/lists/subscriptions.json', args)
end
Expand Down
7 changes: 1 addition & 6 deletions lib/twitter/rest/undocumented.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,16 @@ module Undocumented
# @rate_limited Yes
# @authentication Requires user context
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
#
# @return [Twitter::Cursor]
# @overload following_followers_of(options = {})
# Returns users following followers of the specified user
#
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @return [Twitter::Cursor]
#
# @overload following_followers_of(user, options = {})
# Returns users following followers of the authenticated user
#
# @param user [Integer, String, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :cursor (-1) Breaks the results into pages. Provide values as returned in the response objects's next_cursor and previous_cursor attributes to page back and forth in the list.
# @return [Twitter::Cursor]
def following_followers_of(*args)
cursor_from_response_with_user(:users, Twitter::User, :get, '/users/following_followers_of.json', args)
end
Expand Down

0 comments on commit cc2f8b5

Please sign in to comment.