Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Contest

import type { Contest } from "https://googleapis.deno.dev/v1/civicinfo:v2.ts";

Information about a contest that appears on a voter's ballot.

interface Contest {
ballotPlacement?: bigint;
ballotTitle?: string;
candidates?: Candidate[];
district?: ElectoralDistrict;
electorateSpecifications?: string;
level?:
| "international"
| "country"
| "administrativeArea1"
| "regional"
| "administrativeArea2"
| "locality"
| "subLocality1"
| "subLocality2"
| "special"[];
numberElected?: bigint;
numberVotingFor?: bigint;
office?: string;
primaryParties?: string[];
referendumBallotResponses?: string[];
referendumBrief?: string;
referendumConStatement?: string;
referendumEffectOfAbstain?: string;
referendumPassageThreshold?: string;
referendumProStatement?: string;
referendumSubtitle?: string;
referendumText?: string;
referendumTitle?: string;
referendumUrl?: string;
roles?:
| "headOfState"
| "headOfGovernment"
| "deputyHeadOfGovernment"
| "governmentOfficer"
| "executiveCouncil"
| "legislatorUpperBody"
| "legislatorLowerBody"
| "highestCourtJudge"
| "judge"
| "schoolBoard"
| "specialPurposeOfficer"
| "otherRole"[];
sources?: Source[];
special?: string;
type?: string;
}

§Properties

§
ballotPlacement?: bigint
[src]

A number specifying the position of this contest on the voter's ballot.

§
ballotTitle?: string
[src]

The official title on the ballot for this contest, only where available.

§
candidates?: Candidate[]
[src]

The candidate choices for this contest.

§

Information about the electoral district that this contest is in.

§
electorateSpecifications?: string
[src]

A description of any additional eligibility requirements for voting in this contest.

§
level?: "international" | "country" | "administrativeArea1" | "regional" | "administrativeArea2" | "locality" | "subLocality1" | "subLocality2" | "special"[]
[src]

The levels of government of the office for this contest. There may be more than one in cases where a jurisdiction effectively acts at two different levels of government; for example, the mayor of the District of Columbia acts at "locality" level, but also effectively at both "administrative-area-2" and "administrative-area-1".

§
numberElected?: bigint
[src]

The number of candidates that will be elected to office in this contest.

§
numberVotingFor?: bigint
[src]

The number of candidates that a voter may vote for in this contest.

§
office?: string
[src]

The name of the office for this contest.

§
primaryParties?: string[]
[src]

If this is a partisan election, the name of the party/parties it is for.

§
referendumBallotResponses?: string[]
[src]

The set of ballot responses for the referendum. A ballot response represents a line on the ballot. Common examples might include "yes" or "no" for referenda. This field is only populated for contests of type 'Referendum'.

§
referendumBrief?: string
[src]

Specifies a short summary of the referendum that is typically on the ballot below the title but above the text. This field is only populated for contests of type 'Referendum'.

§
referendumConStatement?: string
[src]

A statement in opposition to the referendum. It does not necessarily appear on the ballot. This field is only populated for contests of type 'Referendum'.

§
referendumEffectOfAbstain?: string
[src]

Specifies what effect abstaining (not voting) on the proposition will have (i.e. whether abstaining is considered a vote against it). This field is only populated for contests of type 'Referendum'.

§
referendumPassageThreshold?: string
[src]

The threshold of votes that the referendum needs in order to pass, e.g. "two-thirds". This field is only populated for contests of type 'Referendum'.

§
referendumProStatement?: string
[src]

A statement in favor of the referendum. It does not necessarily appear on the ballot. This field is only populated for contests of type 'Referendum'.

§
referendumSubtitle?: string
[src]

A brief description of the referendum. This field is only populated for contests of type 'Referendum'.

§
referendumText?: string
[src]

The full text of the referendum. This field is only populated for contests of type 'Referendum'.

§
referendumTitle?: string
[src]

The title of the referendum (e.g. 'Proposition 42'). This field is only populated for contests of type 'Referendum'.

§
referendumUrl?: string
[src]

A link to the referendum. This field is only populated for contests of type 'Referendum'.

§
roles?: "headOfState" | "headOfGovernment" | "deputyHeadOfGovernment" | "governmentOfficer" | "executiveCouncil" | "legislatorUpperBody" | "legislatorLowerBody" | "highestCourtJudge" | "judge" | "schoolBoard" | "specialPurposeOfficer" | "otherRole"[]
[src]

The roles which this office fulfills.

§
sources?: Source[]
[src]

A list of sources for this contest. If multiple sources are listed, the data has been aggregated from those sources.

§
special?: string
[src]

"Yes" or "No" depending on whether this a contest being held outside the normal election cycle.

§
type?: string
[src]

The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with candidates. For referenda this will be 'Referendum'. For Retention contests this will typically be 'Retention'.