Module Twitter::REST::FriendsAndFollowers
In: lib/twitter/rest/friends_and_followers.rb

Methods

Included Modules

Twitter::REST::Utils Twitter::Utils

Public Instance methods

create_friendship(*args)

Alias for follow

create_friendship!(*args)

Alias for follow!

destroy_friendship(*args)

Alias for unfollow

Allows the authenticating user to follow the specified users, unless they are already followed

@see dev.twitter.com/rest/reference/post/friendships/create @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::User>] The followed users. @overload follow(*users)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.

@overload follow(*users, options)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
  @param options [Hash] A customizable set of options.
  @option options [Boolean] :follow (false) Enable notifications for the target user.

Allows the authenticating user to follow the specified users

@see dev.twitter.com/rest/reference/post/friendships/create @rate_limited No @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::User>] The followed users. @overload follow!(*users)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.

@overload follow!(*users, options)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
  @param options [Hash] A customizable set of options.
  @option options [Boolean] :follow (false) Enable notifications for the target user.

@see dev.twitter.com/rest/reference/get/followers/ids @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Cursor] @overload follower_ids(options = {})

  Returns an array of numeric IDs for every user following the authenticated user

  @param options [Hash] A customizable set of options.

@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.

Returns a cursored collection of user objects for users following the specified user.

@see dev.twitter.com/rest/reference/get/followers/list @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Cursor] @overload followers(options = {})

  Returns a cursored collection of user objects for users following the authenticated user.

  @param options [Hash] A customizable set of options.
  @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 [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.
following(*args)

Alias for friends

@see dev.twitter.com/rest/reference/get/friends/ids @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Cursor] @overload friend_ids(options = {})

  Returns an array of numeric IDs for every user the authenticated user is following

  @param options [Hash] A customizable set of options.

@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.

Returns a cursored collection of user objects for every user the specified user is following (otherwise known as their "friends").

@see dev.twitter.com/rest/reference/get/friends/list @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Cursor] @overload friends(options = {})

  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 [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 [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.

Returns detailed information about the relationship between two users

@see dev.twitter.com/rest/reference/get/friendships/show @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Relationship] @param source [Integer, String, Twitter::User] The Twitter user ID, screen name, or object of the source user. @param target [Integer, String, Twitter::User] The Twitter user ID, screen name, or object of the target user. @param options [Hash] A customizable set of options.

Test for the existence of friendship between two users

@see dev.twitter.com/rest/reference/get/friendships/show @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Boolean] true if user_a follows user_b, otherwise false. @param source [Integer, String, Twitter::User] The Twitter user ID, screen name, or object of the source user. @param target [Integer, String, Twitter::User] The Twitter user ID, screen name, or object of the target user. @param options [Hash] A customizable set of options.

friendship_show(source, target, options = {})

Alias for friendship

Allows one to enable or disable retweets and device notifications from the specified user.

@see dev.twitter.com/rest/reference/post/friendships/update @rate_limited No @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Relationship] @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 [Boolean] :device Enable/disable device notifications from the target user. @option options [Boolean] :retweets Enable/disable retweets from the target user.

Returns the relationship of the authenticating user to the comma separated list of up to 100 screen_names or user_ids provided. Values for connections can be: following, following_requested, followed_by, none.

@see dev.twitter.com/rest/reference/get/friendships/lookup @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::User>] The requested users. @overload friendships(*users)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.

@overload friendships(*users, options)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
  @param options [Hash] A customizable set of options.

Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user

@see dev.twitter.com/rest/reference/get/friendships/incoming @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Cursor] @param options [Hash] A customizable set of options.

Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request

@see dev.twitter.com/rest/reference/get/friendships/outgoing @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::Cursor] @param options [Hash] A customizable set of options.

Returns a collection of user IDs that the currently authenticated user does not want to receive retweets from. @see dev.twitter.com/rest/reference/get/friendships/no_retweets/ids @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Integer>] @param options [Hash] A customizable set of options.

no_retweets_ids(options = {})

Alias for no_retweet_ids

relationship(source, target, options = {})

Alias for friendship

Allows the authenticating user to unfollow the specified users

@see dev.twitter.com/rest/reference/post/friendships/destroy @rate_limited No @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::User>] The unfollowed users. @overload unfollow(*users)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.

@overload unfollow(*users, options)

  @param users [Enumerable<Integer, String, Twitter::User>] A collection of Twitter user IDs, screen names, or objects.
  @param options [Hash] A customizable set of options.

[Validate]