Class: KloutAPI::User

Inherits:
Object
  • Object
show all
Defined in:
lib/klout/user.rb

Overview

Represents a user

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klout_id) ⇒ User

Returns a new instance of User.



9
10
11
# File 'lib/klout/user.rb', line 9

def initialize(klout_id)
  @klout_id = klout_id
end

Instance Attribute Details

#klout_idObject (readonly)

Returns the value of attribute klout_id.



7
8
9
# File 'lib/klout/user.rb', line 7

def klout_id
  @klout_id
end

Instance Method Details

#detailsObject



13
14
15
16
# File 'lib/klout/user.rb', line 13

def details
  response = get
  Hashie::Mash.new(response)
end

#influenceObject



28
29
30
31
# File 'lib/klout/user.rb', line 28

def influence
  response = get "influence"
  Hashie::Mash.new(response)
end

#scoreObject



18
19
20
21
# File 'lib/klout/user.rb', line 18

def score
  response = get "score"
  Hashie::Mash.new(response)
end

#topicsObject



23
24
25
26
# File 'lib/klout/user.rb', line 23

def topics
  response = get "topics"
  response.parsed_response
end