Class: VoteSmart::Rating
Class Method Summary collapse
-
.get_candidate_rating(candidate_id, sig_id) ⇒ Object
Returns an SIG’s rating on a specific candidate.
-
.get_categories(state_id = nil) ⇒ Object
Returns categories with ratings according to state_id(NA = fed).
-
.get_sig(sig_id) ⇒ Object
Returns detailed SIG information.
-
.get_sig_list(category_id, state_id = 'NA') ⇒ Object
Returns a list of SIGs with ratings in category and state.
Methods inherited from Common
construct_url, get_json_data, hash2get, #initialize, request, response_child, response_child_array, set_attribute_map, #update_attributes
Constructor Details
This class inherits a constructor from VoteSmart::Common
Class Method Details
.get_candidate_rating(candidate_id, sig_id) ⇒ Object
Returns an SIG’s rating on a specific candidate
21 22 23 |
# File 'lib/vote_smart/rating.rb', line 21 def self. candidate_id, sig_id request("Rating.getCandidateRating", "candidateId" => candidate_id, "sigId" => sig_id) end |
.get_categories(state_id = nil) ⇒ Object
Returns categories with ratings according to state_id(NA = fed)
6 7 8 |
# File 'lib/vote_smart/rating.rb', line 6 def self.get_categories state_id = nil request("Rating.getCategories", "stateId" => state_id) end |
.get_sig(sig_id) ⇒ Object
Returns detailed SIG information
16 17 18 |
# File 'lib/vote_smart/rating.rb', line 16 def self.get_sig sig_id request("Rating.getSig", "sigId" => sig_id) end |
.get_sig_list(category_id, state_id = 'NA') ⇒ Object
Returns a list of SIGs with ratings in category and state
11 12 13 |
# File 'lib/vote_smart/rating.rb', line 11 def self.get_sig_list category_id, state_id = 'NA' request("Rating.getSigList", "category_id" => category_id, "stateId" => state_id) end |