Class: VoteSmart::Committee

Inherits:
Common
  • Object
show all
Defined in:
lib/vote_smart/committee.rb

Class Method Summary collapse

Methods inherited from Common

construct_url, get_json_data, hash2get, #initialize, parallelize!, request, response_child, session, set_attribute_map, #update_attributes

Constructor Details

This class inherits a constructor from VoteSmart::Common

Class Method Details

.get_committee(committee_id) ⇒ Object



14
15
16
# File 'lib/vote_smart/committee.rb', line 14

def self.get_committee committee_id
  request("Committee.getCommittee", "committeeId" => committee_id)
end

.get_committee_members(committee_id) ⇒ Object



18
19
20
# File 'lib/vote_smart/committee.rb', line 18

def self.get_committee_members committee_id
  request("Committee.getCommitteeMembers", "committeeId" => committee_id)
end

.get_committees_by_type_state(type_id = nil, state_id = 'NA') ⇒ Object



10
11
12
# File 'lib/vote_smart/committee.rb', line 10

def self.get_committees_by_type_state type_id = nil, state_id = 'NA'
  request("Committee.getCommitteesByTypeState", "typeId" => type_id, "stateId" => state_id)
end

.get_typesObject

Returns committee types for use in other methods



6
7
8
# File 'lib/vote_smart/committee.rb', line 6

def self.get_types
  request("Committee.getTypes")
end