Class: VoteSmart::Leadership

Inherits:
Common
  • Object
show all
Defined in:
lib/vote_smart/leadership.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_officials(leadership_id, state_id = "NA") ⇒ Object

Returns a list of candidates in specific leadership positions



11
12
13
# File 'lib/vote_smart/leadership.rb', line 11

def self.get_officials leadership_id, state_id = "NA"
  request("Leadership.getOfficials", "leadershipId" => leadership_id, "stateId" => state_id)
end

.get_positions(state_id = "NA", office_id = nil) ⇒ Object

Returns a list of leadership positions



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

def self.get_positions state_id = "NA", office_id = nil
  request("Leadership.getPositions", "stateId" => state_id, "officeId" => office_id)
end