ElectionsAPI Documentation: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
*<code>election_name</code> - The name of the election
*<code>election_type</code> - The type of election. Currently, valid election types are <code>popular</code>, <code>primary</code>, <code>parliament</code>, and <code>electoral</code>.
*<code>percent_reporting</code> - Specifies the number of precincts reporting.
*<code>votes_needed</code> - Will list the number of votes needed in a parliamentary or electoral vote to win the election. This parameter does not exist if the election_type is <code>popular</code>.
*<code>round</code> - Specifies the current round of voting in the election.
*<code>election_type</code> - The type of election. Currently, valid election types are <code>popular</code>, <code>primary</code>, <code>parliament</code>, and <code>electoral</code>.
*<code>votes_needed</code> - Will list the number of votes needed in a parliamentary or electoral vote to win the election. This parameter does not exist if the election_type is <code>popular</code>.
*<code>percent_reporting</code> - Returns the number of precincts reporting in the election.
*<code>round</code> - Specifies the current round of voting in the election.
*<code>is_snap_election</code> - Specifies if the election is a snap election.
**<code>winner</code> - Specifies if the candidate has been declared the winner.
*<code>region_results</code> - Results of the counties/districts/parishes/boroughs/etc.
**<code>region</code> - The region name
***<code>candidates</code> - The list of candidates in the region.
****<code>name</code> - Candidate's name
****<code>percent</code> - The percentage of votes the candidate received
**<code>electoral_votes</code> - Specifies the number of electoral votes of the region. Only exists if the election_type is <code>electoral</code>.
**<code>percent_reporting</code> - Specifies the number of precincts in the region reporting.
**<code>winner</code> - The winner of the region.
**<code>fill</code> - The region winner's hex color, for filling maps in with.

Navigation menu