lib/twitterland/twitter_grader.rb in twitterland-0.1.1 vs lib/twitterland/twitter_grader.rb in twitterland-0.2.0
- old
+ new
@@ -2,9 +2,13 @@
class TwitterGrader
include HTTParty
base_uri 'api.twittergrader.com/api'
format :json
+ # Get Twitter Grade for user
+ # request your api key at [http://twitter.grader.com/accessrequestform
+ #
+ # Twitterland::TwitterGrader.grade('bradleyjoyce', 'OU812')
def self.grade(username, api_key)
data = get("/grade/#{username}.json", :query => {:APIKey => api_key})
data['ErrorMessage'].blank? ? data['Data']['Grade'].to_f : data['ErrorMessage']
end
\ No newline at end of file