Class: OpenFec::Resources::Elections
- Defined in:
- lib/open_fec/resources/elections.rb
Overview
Election results and candidate comparisons for a specific race. Shows all candidates who ran in a district with financial totals side by side.
Instance Method Summary collapse
-
#list(**params) ⇒ OpenFec::Response
List all candidates in a specific election with financial totals.
-
#search(**params) ⇒ OpenFec::Response
Search for elections by state, office, and cycle.
-
#summary(**params) ⇒ OpenFec::Response
Election summary with aggregate spending data.
Methods inherited from Base
Constructor Details
This class inherits a constructor from OpenFec::Resources::Base
Instance Method Details
#list(**params) ⇒ OpenFec::Response
List all candidates in a specific election with financial totals. Returns candidate_name, party, total_receipts, total_disbursements, cash_on_hand_end_period, etc.
20 21 22 |
# File 'lib/open_fec/resources/elections.rb', line 20 def list(**params) get('elections/', params) end |
#search(**params) ⇒ OpenFec::Response
Search for elections by state, office, and cycle.
28 29 30 |
# File 'lib/open_fec/resources/elections.rb', line 28 def search(**params) get('elections/search/', params) end |
#summary(**params) ⇒ OpenFec::Response
Election summary with aggregate spending data.
36 37 38 |
# File 'lib/open_fec/resources/elections.rb', line 36 def summary(**params) get('elections/summary/', params) end |