Class: OpenFec::Resources::Committees
- Defined in:
- lib/open_fec/resources/committees.rb
Overview
Search and retrieve FEC committee records (PACs, campaign committees, etc.).
Instance Method Summary collapse
-
#each_page(**params) {|OpenFec::Response| ... } ⇒ Object
Paginate through committee search results (offset-based).
-
#find(committee_id) ⇒ OpenFec::Response
Fetch a single committee by FEC committee ID.
-
#search(**params) ⇒ OpenFec::Response
Search committees by name, candidate_id, state, committee_type, etc.
Methods inherited from Base
Constructor Details
This class inherits a constructor from OpenFec::Resources::Base
Instance Method Details
#each_page(**params) {|OpenFec::Response| ... } ⇒ Object
Paginate through committee search results (offset-based).
33 34 35 |
# File 'lib/open_fec/resources/committees.rb', line 33 def each_page(**params, &) client.paginate('committees/', params, &) end |
#find(committee_id) ⇒ OpenFec::Response
Fetch a single committee by FEC committee ID.
25 26 27 |
# File 'lib/open_fec/resources/committees.rb', line 25 def find(committee_id) get("committee/#{committee_id}/") end |
#search(**params) ⇒ OpenFec::Response
Search committees by name, candidate_id, state, committee_type, etc.
17 18 19 |
# File 'lib/open_fec/resources/committees.rb', line 17 def search(**params) get('committees/', params) end |