Module: Croudia::Rest::Friends

Included in:
Client
Defined in:
lib/croudia/rest/friends.rb

Instance Method Summary collapse

Instance Method Details

#friend_ids(params = {}) ⇒ Croudia::Object::IDs

Returns a collection of user ids that the authenticating user’s friends.

Parameters:

  • params (Hash) (defaults to: {})

    A customized options.

Options Hash (params):

  • :screen_name (String)

    The screen name of the potentially friends user.

  • :user_id (Integer)

    The ID of the potentially friends user.

  • :cursor (Integer)

    The page cursor of collection.

Returns:

See Also:



16
17
18
19
# File 'lib/croudia/rest/friends.rb', line 16

def friend_ids(params = {})
  response = get('friends/ids.json', params)
  Croudia::Object::IDs.new(response)
end

#friends(params = {}) ⇒ Croudia::Object::List

Returns a collection of user objects the authenticating user’s friends.

Parameters:

  • params (Hash) (defaults to: {})

    A customized options.

Options Hash (params):

  • :screen_name (String)

    The screen name of the potentially friends user.

  • :user_id (Integer)

    The ID of the potentially friends user.

  • :cursor (Integer)

    The page cursor of collection.

  • :trim_user (Boolean)

    When set to truem each whisper returned in a timeline will include a user object including only the status authors numerical ID.

Returns:

See Also:



30
31
32
33
# File 'lib/croudia/rest/friends.rb', line 30

def friends(params = {})
  response = get('friends/list.json', params)
  Croudia::Object::List.new(response)
end