Class: KloutAPI::User
- Inherits:
-
Object
- Object
- KloutAPI::User
- Defined in:
- lib/klout/user.rb
Overview
Represents a user
Instance Attribute Summary collapse
-
#klout_id ⇒ Object
readonly
Returns the value of attribute klout_id.
Instance Method Summary collapse
- #details ⇒ Object
- #influence ⇒ Object
-
#initialize(klout_id) ⇒ User
constructor
A new instance of User.
- #score ⇒ Object
- #topics ⇒ Object
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_id ⇒ Object (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
#details ⇒ Object
13 14 15 16 |
# File 'lib/klout/user.rb', line 13 def details response = get Hashie::Mash.new(response) end |
#influence ⇒ Object
28 29 30 31 |
# File 'lib/klout/user.rb', line 28 def influence response = get "influence" Hashie::Mash.new(response) end |
#score ⇒ Object
18 19 20 21 |
# File 'lib/klout/user.rb', line 18 def score response = get "score" Hashie::Mash.new(response) end |
#topics ⇒ Object
23 24 25 26 |
# File 'lib/klout/user.rb', line 23 def topics response = get "topics" response.parsed_response end |