Module: Croudia::Rest::Mutes::Users

Included in:
Croudia::Rest::Mutes
Defined in:
lib/croudia/rest/mutes/users.rb

Instance Method Summary collapse

Instance Method Details

#mute(params = {}) ⇒ Croudia::Object::User

Mutes the user specified in the ID parameter for the authenticating user.

Parameters:

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

    A customized options.

Options Hash (params):

  • :screen_name (String)

    The screen name of the potentially muted user.

  • :user_id (Integer)

    The ID of the potentially muted user.

Returns:

See Also:



17
18
19
20
# File 'lib/croudia/rest/mutes/users.rb', line 17

def mute(params = {})
  response = post('mutes/users/create.json', params)
  Croudia::Object::User.new(response)
end

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

Returns an array of numeric user ids the authenticating user has muted.

Parameters:

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

    A customized options.

Options Hash (params):

  • :cursor (Integer)

    The page cursor.

Returns:

See Also:



51
52
53
54
# File 'lib/croudia/rest/mutes/users.rb', line 51

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

#mutes(params = {}) ⇒ Object

Returns a collection of users the authenticating user has muted.

Parameters:

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

    A customized options.

Options Hash (params):

  • :cursor (Integer)

    The page cursor.

  • :trim_user (Boolean)

    When set to true, objects returned will include a user object including only the status authors numerical ID.

See Also:



40
41
42
43
# File 'lib/croudia/rest/mutes/users.rb', line 40

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

#umnute(params = {}) ⇒ Croudia::Object::User

Un-mutes the user specified in the ID parameter for the authenticating user.

Parameters:

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

    A customized options.

Options Hash (params):

  • :screen_name (String)

    The screen name of the potentially unmuted user.

  • :user_id (Integer)

    The ID of the potentially unmuted user.

Returns:

See Also:



29
30
31
32
# File 'lib/croudia/rest/mutes/users.rb', line 29

def umnute(params = {})
  response = post('mutes/users/destroy.json', params)
  Croudia::Object::User.new(response)
end