Sha256: d318d577c15d886696716ba24fd7d3d8a5cfeb3a0248703f29648fb0420bd848

Contents?: true

Size: 811 Bytes

Versions: 5

Compression:

Stored size: 811 Bytes

Contents

module VoteSmart
  
  class Rating < Common
    
    # Returns categories with ratings according to state_id(NA = fed)
    def self.get_categories state_id = nil
      request("Rating.getCategories", "stateId" => state_id)
    end
    
    # Returns a list of SIGs with ratings in category and state
    def self.get_sig_list category_id, state_id = 'NA'
      request("Rating.getSigList", "category_id" => category_id, "stateId" => state_id)
    end
    
    # Returns detailed SIG information
    def self.get_sig sig_id
      request("Rating.getSig", "sigId" => sig_id)
    end
    
    # Returns an SIG's rating on a specific candidate
    def self.get_candidate_rating candidate_id, sig_id
      request("Rating.getCandidateRating", "candidateId" => candidate_id, "sigId" => sig_id)
    end
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
netroots-ruby-votesmart-0.2.0 lib/vote_smart/rating.rb
netroots-ruby-votesmart-0.2.1 lib/vote_smart/rating.rb
netroots-ruby-votesmart-0.2.2 lib/vote_smart/rating.rb
netroots-ruby-votesmart-0.2.3 lib/vote_smart/rating.rb
netroots-ruby-votesmart-0.2.4 lib/vote_smart/rating.rb