Module: Assistly::Client::User

Included in:
Assistly::Client
Defined in:
lib/assistly/client/user.rb

Overview

Defines methods related to users

Instance Method Summary collapse

Instance Method Details

#user(user, options = {}) ⇒ Hashie::Mash

Returns extended information of a given user

Returns The requested user.

Examples:

Return extended information for 12345

Assistly.user(12345)

Options Hash (options):

  • :include_entities (Boolean, String, Integer)

    Include Tweet Entities when set to true, 't' or 1.

See Also:

Requires Authentication:

  • true

Supported formats:

  • :json, :xml



16
17
18
19
20
# File 'lib/assistly/client/user.rb', line 16

def user(id,*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get("users/#{id}",options)
  response.user
end

#users(*args) ⇒ Array

Returns extended information for up to 100 users

Examples:

Return extended information account users

Assistly.users

See Also:

Rate Limited:

  • true

Requires Authentication:

  • true

Supported formats:

  • :json, :xml



31
32
33
34
35
# File 'lib/assistly/client/user.rb', line 31

def users(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get('users', options)
  response
end