Class: Twitterland::TwitterGrader
- Inherits:
-
Object
- Object
- Twitterland::TwitterGrader
- Includes:
- HTTParty
- Defined in:
- lib/twitterland/twitter_grader.rb
Class Method Summary collapse
-
.grade(username, api_key) ⇒ Object
Get Twitter Grade for user request your api key at [twitter.grader.com/accessrequestform.
Class Method Details
.grade(username, api_key) ⇒ Object
Get Twitter Grade for user request your api key at [twitter.grader.com/accessrequestform
Twitterland::TwitterGrader.grade('bradleyjoyce', 'OU812')
11 12 13 14 |
# File 'lib/twitterland/twitter_grader.rb', line 11 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 |