Class: Klout::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_facebook_id(third_party_id) ⇒ Object



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

def find_by_facebook_id(third_party_id)
  response = Klout.get "/identity.json/fb/#{third_party_id}", :query => {key: Klout.api_key}
  Hashie::Mash.new(response)
end

.find_by_google_plus_id(google_plus_id) ⇒ Object



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

def find_by_google_plus_id(google_plus_id)
  response = Klout.get "/identity.json/gp/#{google_plus_id}", :query => {key: Klout.api_key}
  Hashie::Mash.new(response)
end

.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 = Klout.get "/identity.json/klout/#{klout_id}/tw", :query => {key: Klout.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 = Klout.get "/identity.json/twitter", :query => {key: Klout.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 = Klout.get "/identity.json/tw/#{twitter_id}", :query => {key: Klout.api_key}
  Hashie::Mash.new(response)
end