Class: VoteSmart::Local

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

Instance 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

Instance Method Details

#get_cities(state_id) ⇒ Object

Returns a list of cities in a given state



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

def get_cities state_id
  request("Local.getCities", "stateId" => state_id)
end

#get_counties(state_id) ⇒ Object

Returns a list of counties in a given state.



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

def get_counties state_id
  request("Local.getCounties", "stateId" => state_id)
end

#get_officials(local_id) ⇒ Object



16
17
18
# File 'lib/vote_smart/local.rb', line 16

def get_officials local_id
  request("Local.getOfficials", "localId" => local_id)
end