Sha256: 046dc83f813de161ae60609a7297e9f53616b3333cd61d6ad070737bc5c1ea4a

Contents?: true

Size: 339 Bytes

Versions: 8

Compression:

Stored size: 339 Bytes

Contents

module Twitterland
  class TwitterGrader
    include HTTParty
    base_uri 'api.twittergrader.com/api'
    format :json

    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

  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
squeejee-twitterland-0.0.1 lib/twitterland/twitter_grader.rb
squeejee-twitterland-0.0.2 lib/twitterland/twitter_grader.rb
squeejee-twitterland-0.1.1 lib/twitterland/twitter_grader.rb
twitterland-0.1.0 lib/twitterland/twitter_grader.rb
twitterland-0.1.1 lib/twitterland/twitter_grader.rb
twitterland-0.0.1 lib/twitterland/twitter_grader.rb
twitterland-0.0.2 lib/twitterland/twitter_grader.rb
twitterland-0.0.3 lib/twitterland/twitter_grader.rb