Class: GovKit::OpenStates::Legislator
- Inherits:
-
GovKit::OpenStatesResource
- Object
- Resource
- GovKit::OpenStatesResource
- GovKit::OpenStates::Legislator
- Defined in:
- lib/gov_kit/open_states.rb
Overview
The Legislator class represents the legislator data returned from Open States.
For details about fields returned, see the Open States documentation, at openstates.sunlightlabs.com/api/legislators/,
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
Methods inherited from GovKit::OpenStatesResource
Methods inherited from Resource
#initialize, instantiate, instantiate_collection, parse, #to_md5, #unload
Constructor Details
This class inherits a constructor from GovKit::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class GovKit::Resource
Class Method Details
.find(legislator_id) ⇒ Object
83 84 85 |
# File 'lib/gov_kit/open_states.rb', line 83 def self.find(legislator_id) get_uri("/legislators/#{legislator_id}/") end |
.search(options = {}) ⇒ Object
87 88 89 90 |
# File 'lib/gov_kit/open_states.rb', line 87 def self.search( = {}) result = get_uri('/legislators/', :query => ) return Array(result) end |