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

Civicinfo

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

Provides polling places, early vote locations, contest data, election officials, and government representatives for U.S. residential addresses.

class Civicinfo {
constructor(client?: CredentialsClient, baseUrl?: string);
async divisionsSearch(opts?: DivisionsSearchOptions): Promise<DivisionSearchResponse>;
async electionsElectionQuery(opts?: ElectionsElectionQueryOptions): Promise<ElectionsQueryResponse>;
async electionsVoterInfoQuery(opts?: ElectionsVoterInfoQueryOptions): Promise<VoterInfoResponse>;
async representativesRepresentativeInfoByAddress(opts?: RepresentativesRepresentativeInfoByAddressOptions): Promise<RepresentativeInfoResponse>;
async representativesRepresentativeInfoByDivision(ocdId: string, opts?: RepresentativesRepresentativeInfoByDivisionOptions): Promise<RepresentativeInfoData>;
}

§Constructors

§
new Civicinfo(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
divisionsSearch(opts?: DivisionsSearchOptions): Promise<DivisionSearchResponse>
[src]

Searches for political divisions by their natural name or OCD ID.

§
electionsElectionQuery(opts?: ElectionsElectionQueryOptions): Promise<ElectionsQueryResponse>
[src]

List of available elections to query.

§
electionsVoterInfoQuery(opts?: ElectionsVoterInfoQueryOptions): Promise<VoterInfoResponse>
[src]

Looks up information relevant to a voter based on the voter's registered address.

§
representativesRepresentativeInfoByAddress(opts?: RepresentativesRepresentativeInfoByAddressOptions): Promise<RepresentativeInfoResponse>
[src]

Looks up political geography and representative information for a single address.

§
representativesRepresentativeInfoByDivision(ocdId: string, opts?: RepresentativesRepresentativeInfoByDivisionOptions): Promise<RepresentativeInfoData>
[src]

Looks up representative information for a single geographic division.

@param ocdId

The Open Civic Data division identifier of the division to look up.