Skip to content

Legacy API: Interface

James Lott edited this page May 8, 2018 · 1 revision

End points

/campaigns/

Returns an array of all campaign objects

/campaigns/info

Returns an array of all campaign info objects

/campaigns/:id

Returns the campaign object associated with campaign of specified id

/campaigns/:id/candidate

Returns the candidate info object for the candidate associated with the campaign of specified id

/campaigns/:id/summary

Returns an array of campaign summary objects associated with the campaign of specified id

/campaigns/:id/info

Returns the campaign info object associated with the campaign of specified id

/candidates/

Returns an array of all candidate objects

/candidates/:id

Returns the candidate object associated with candidate of specified id

/candidates/:id/campaigns

Returns an array of campaign objects associated with candidate of specified id

/candidates/:id/campaigns/info

Returns an array of campaign info objects associate with candidate of specified id

Objects

Campaign

Specifies all information available associated with a particular campaign

  • campaign_id (integer): Unique campaign identifier
  • election_year (integer): Calendar year in which campaign was run
  • election_cycle (string): One of "primary" or "general", specifying which election cycle the campaign was run in
  • candidate_id (integer): Unique identifier of candidate associated with campaign
  • candidate_position (string): Name of office which candidate is running campaign to occupy
  • candidate_party (string): Political party with which candidate associated with in this campaign
  • candidate_name (string): Full name of candidate
  • campaign_summary (array): Array of campaign summary objects associated with this campaign

Campaign info

  • campaign_id (integer): Unique campaign identifier
  • election_year (integer): Calendar year in which campaign was run
  • election_cycle (string): One of "primary" or "general", specifying which election cycle the campaign was run in
  • candidate_id (integer): Unique identifier of candidate associated with campaign
  • candidate_position (string): Name of office which candidate is running campaign to occupy
  • candidate_party (string): Political party with which candidate associated with in this campaign

Campaign summary

  • campaign_id (integer): Unique identifier of campaign contribution was made to
  • summary_level (string): A key which distinguishes the summary object from other summary objects associated with the same campaign id
  • summary_value (number): Numeric value of summary object
  • summary_type (string): Type of information represented by summary object

Candidate

  • candidate_id (integer): Unique identifier for this candidate
  • candidate_name (string): Human name of this candidate
  • campaigns (array): Array of campaign objects associated with this candidate

Candidate info

  • candidate_id (integer): Unique identifier associated with candidate
  • candidate_name (string): Human name of candidate

Clone this wiki locally