The Associated Press client
The AP client is public class you can use to connect to the AP's data feed.
Election result collections
Depending on which client method you use to harvest data, results may be returned as State or TopOfTicket objects. Don't worry about the distinction, because they act pretty much the same. They share the following attributes for you to use.
A contest being decided by voters choosing between candidates. This object is the key to everything about it. It is often found in the races attribute of a result collection.
An area or unit that groups votes into a total. For instance, a state, a congressional district, a county.
A choice for voters in a race. In the presidential race, a person, like Barack Obama. In a ballot measure, a direction, like Yes or No.
The vote count for a candidate in a race in a particular reporting unit.
Presidential summary collections
Calling presidential methods, like get_presidential_summary will return a slightly different, and simpler, result collection.
Delegate summary collections
Calling delegate related methods, like get_delegate_summary will return a slightly different, and simpler, result collection. To start, you should receive a list containing two Nomination objects.
A contest to be the presidential nominee of one of the two major parties.
A state's delegation and who they choose to be a party's presidential nominee.