Skip to content
/ klout Public
forked from ACPK/klout

Klout measures influence on topics across the social web to find the people the world listens to

Notifications You must be signed in to change notification settings

aquajach/klout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update the lib file according to the new API of Klout, and handle requests of multiple users ( up to 5).
-----------------------------------------
Usage:
---------
>> Klout.api_key = "yourkloutapikey"
>> Klout.score("jasontorres")
=> {"status" => 200, "users" => [{"twitter_screen_name"=>"jasontorres", "kscore"=>29.89}]}
>> Klout.profile("jasontorres")
=> {"status" => 200, "users" => [{"twitter_id"=>"406073",
                                  "twitter_screen_name"=>"jasontorres",
                                  "score"=>{"kscore"=>29.89, "slope"=>0,
                                  "description"=>"is influential to a tightly formed network that is growing larger.",
                                  "kclass_id"=>11, "kclass"=>"Specialist",
                                  "kclass_description"=>"You may not be a celebrity, but within your area of expertise your opinion is second to none. Your content is likely focused around a specific topic or industry with a focused, highly-engaged audience.",
                                  "kscore_description"=>"jasontorres has a low level of influence.",
                                  "network_score"=>20.25,
                                  "amplification_score"=>15.27,
                                  "true_reach"=>195}}]}

#Handling of invalid/inactive username 
>> Klout.score("very_new_user")
=> {"status" => 404}
>> Klout.score("very_new_user")
=> {"status" => 404}

#Ignore invalid/inactive usernames in array
>> Klout.score(["very_new_user", "twitter", "twitter_es", "twitterapi", "twittermobile"].join(","))
 => {"status"=>200, "users"=>[{"twitter_screen_name"=>"twitter", "kscore"=>76.88},
                              {"twitter_screen_name"=>"twitter_es", "kscore"=>70.33},
                              {"twitter_screen_name"=>"twitterapi", "kscore"=>68.3},
                              {"twitter_screen_name"=>"twittermobile", "kscore"=>61.17}]}
---------------------------------------------------------------------------------------


Klout measures influence on topics across the social web to find the people the world listens to

See http://klout.com for more information about their service

Install:

sudo gem install klout

Usage and Example

>> require 'rubygems'
>> require 'klout'
>> Klout.api_key = "yourkloutapikey"
>> Klout.score('jasontorres')
=> {"user"=>{"kscore"=>19.74, "status"=>200, "status_message"=>"OK"}}
>> Klout.profile('jasontorres')
 {"user"=>{"score"=>{"slope"=>0, "kscore"=>"19.7429", "kclass"=>"connector", "true_reach"=>"195", "amplification_score"=>"0", "kscore_description"=>"", "network_score"=>"0", "kclass_description"=>"You are a constant source of information to your friends and co-workers. There is a good chance that you probably introduced several of your friends to Twitter. Your taste and opinion is respected and your judgment is trusted.", "date_updated"=>"2009-07-09 00:59:08"}, "twitter_screen_name"=>"jasontorres", "status"=>200, "twitter_id"=>"406073", "status_message"=>"OK"}}
 
Disclaimer: Author is not anyway involved w/ Klout.com

Klout is a copyright trademark of Klout.com

MIT License

About

Klout measures influence on topics across the social web to find the people the world listens to

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%