Class: Klout::TwUser

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

Overview

Represents a user

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(twitter_id) ⇒ TwUser

Returns a new instance of TwUser.



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

def initialize(twitter_id)
  @twitter_id = twitter_id
end

Instance Attribute Details

#twitter_idObject (readonly)

Returns the value of attribute twitter_id.



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

def twitter_id
  @twitter_id
end

Instance Method Details

#detailsObject



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

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

#influenceObject



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

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

#scoreObject



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

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

#topicsObject



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

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