Class: KloutAPI::Identity

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

Overview

Represents an identity

Class Method Summary collapse

Class Method Details

.find_by_klout_id(klout_id) ⇒ Object



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

def find_by_klout_id(klout_id)
  response = KloutAPI.get "/identity.json/klout/#{klout_id}/tw", :query => {:key =>  KloutAPI.api_key}
  Hashie::Mash.new(response)
end

.find_by_screen_name(screen_name) ⇒ Object



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

def find_by_screen_name(screen_name)
  response = KloutAPI.get "/identity.json/twitter", :query => {:key =>  KloutAPI.api_key, :screenName =>  screen_name}
  Hashie::Mash.new(response)
end

.find_by_twitter_id(twitter_id) ⇒ Object



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

def find_by_twitter_id(twitter_id)
  response = KloutAPI.get "/identity.json/tw/#{twitter_id}", :query => {:key =>  KloutAPI.api_key}
  Hashie::Mash.new(response)
end