lib/twitter/rest/users.rb
# Returns true if the authenticating user is blocking a target user
#
# @see https://dev.twitter.com/rest/reference/get/blocks/ids
# @rate_limited Yes
# @authentication Requires user context
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
# @return [Boolean] true if the authenticating user is blocking the target user, otherwise false.
# @param user [Integer, String, URI, Twitter::User] A Twitter user ID, screen name, URI, or object.
# @param options [Hash] A customizable set of options.
Returns true if the authenticating user is blocking a target user
Returns true if the authenticating user is blocking a target user
def block?(user, options = {})
        user_id =
          case user
          when Integer                       then user
          when String, URI, Addressable::URI then user(user).id
          when Twitter::User                 then user.id
          end
        blocked_ids(options).collect(&:to_i).include?(user_id)
      end
def block? ( user , options = { } ) user_id = case user when Integer then user when String , URI , Addressable :: URI then user ( user ) . id when Twitter :: User then user . id end blocked_ids ( options ) . collect ( & :to_i ) . include? ( user_id ) end
Returns true if the authenticating user is blocking a target user
Returns true if the authenticating user is blocking a target user
true if the authenticating user is blocking the target user, otherwise false.
true if the authenticating user is blocking the target user otherwise false .
Boolean
[Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid.
[ Twitter :: Error :: Unauthorized ] Error raised when supplied user credentials are not valid .
user
A Twitter user ID, screen name, URI, or object.
A Twitter user ID screen name URI or object .
options
A customizable set of options.
A customizable set of options .
see
None
rate_limited
None
authentication
Requires user context
Requires user context