gogol-civicinfo-0.0.1: Google Civic Information SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.CivicInfo

Contents

Description

An API for accessing civic information.

See: Google Civic Information API Reference

Synopsis

Service Configuration

civicInfoService :: Service Source

Default request referring to version v2 of the Google Civic Information API. This contains the host and root path used as a starting point for constructing service requests.

API Declaration

Resources

civicinfo.divisions.search

civicinfo.elections.electionQuery

civicinfo.elections.voterInfoQuery

civicinfo.representatives.representativeInfoByAddress

civicinfo.representatives.representativeInfoByDivision

Types

RepresentativeInfoResponseDivisions

representativeInfoResponseDivisions Source

Creates a value of RepresentativeInfoResponseDivisions with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rirdAddtional :: Lens' RepresentativeInfoResponseDivisions (HashMap Text GeographicDivision) Source

The unique Open Civic Data identifier for this division.

VoterInfoResponse

voterInfoResponse :: VoterInfoResponse Source

Creates a value of VoterInfoResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

virOtherElections :: Lens' VoterInfoResponse [Election] Source

If no election ID was specified in the query, and there was more than one election with data for the given voter, this will contain information about the other elections that could apply.

virContests :: Lens' VoterInfoResponse [Contest] Source

Contests that will appear on the voter's ballot.

virState :: Lens' VoterInfoResponse [AdministrationRegion] Source

Local Election Information for the state that the voter votes in. For the US, there will only be one element in this array.

virKind :: Lens' VoterInfoResponse Text Source

Identifies what kind of resource this is. Value: the fixed string "civicinfo#voterInfoResponse".

virDropOffLocations :: Lens' VoterInfoResponse [PollingLocation] Source

Locations where a voter is eligible to drop off a completed ballot. The voter must have received and completed a ballot prior to arriving at the location. The location may not have ballots available on the premises. These locations could be open on or before election day as indicated in the pollingHours field.

virElection :: Lens' VoterInfoResponse (Maybe Election) Source

The election that was queried.

virNormalizedInput :: Lens' VoterInfoResponse (Maybe SimpleAddressType) Source

The normalized version of the requested address

virMailOnly :: Lens' VoterInfoResponse (Maybe Bool) Source

Specifies whether voters in the precinct vote only by mailing their ballots (with the possible option of dropping off their ballots as well).

virEarlyVoteSites :: Lens' VoterInfoResponse [PollingLocation] Source

Locations where the voter is eligible to vote early, prior to election day.

virPollingLocations :: Lens' VoterInfoResponse [PollingLocation] Source

Locations where the voter is eligible to vote on election day.

PollingLocation

data PollingLocation Source

A location where a voter can vote. This may be an early vote site, an election day voting location, or a drop off location for a completed ballot.

See: pollingLocation smart constructor.

pollingLocation :: PollingLocation Source

Creates a value of PollingLocation with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

plVoterServices :: Lens' PollingLocation (Maybe Text) Source

The services provided by this early vote site or drop off location. This field is not populated for polling locations.

plEndDate :: Lens' PollingLocation (Maybe Text) Source

The last date that this early vote site or drop off location may be used. This field is not populated for polling locations.

plSources :: Lens' PollingLocation [Source] Source

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

plAddress :: Lens' PollingLocation (Maybe SimpleAddressType) Source

The address of the location.

plStartDate :: Lens' PollingLocation (Maybe Text) Source

The first date that this early vote site or drop off location may be used. This field is not populated for polling locations.

plPollingHours :: Lens' PollingLocation (Maybe Text) Source

A description of when this location is open.

plName :: Lens' PollingLocation (Maybe Text) Source

The name of the early vote site or drop off location. This field is not populated for polling locations.

plId :: Lens' PollingLocation (Maybe Text) Source

An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page.

plNotes :: Lens' PollingLocation (Maybe Text) Source

Notes about this location (e.g. accessibility ramp or entrance to use).

RepresentativesRepresentativeInfoByDivisionLevels

GeographicDivision

geographicDivision :: GeographicDivision Source

Creates a value of GeographicDivision with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

gdName :: Lens' GeographicDivision (Maybe Text) Source

The name of the division.

gdOfficeIndices :: Lens' GeographicDivision [Word32] Source

List of indices in the offices array, one for each office elected from this division. Will only be present if includeOffices was true (or absent) in the request.

gdAlsoKnownAs :: Lens' GeographicDivision [Text] Source

Any other valid OCD IDs that refer to the same division. Because OCD IDs are meant to be human-readable and at least somewhat predictable, there are occasionally several identifiers for a single division. These identifiers are defined to be equivalent to one another, and one is always indicated as the primary identifier. The primary identifier will be returned in ocd_id above, and any other equivalent valid identifiers will be returned in this list. For example, if this division's OCD ID is ocd-division/country:us/district:dc, this will contain ocd-division/country:us/state:dc.

Candidate

data Candidate Source

Information about a candidate running for elected office.

See: candidate smart constructor.

candidate :: Candidate Source

Creates a value of Candidate with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

cEmail :: Lens' Candidate (Maybe Text) Source

The email address for the candidate's campaign.

cPhone :: Lens' Candidate (Maybe Text) Source

The voice phone number for the candidate's campaign office.

cPhotoURL :: Lens' Candidate (Maybe Text) Source

A URL for a photo of the candidate.

cChannels :: Lens' Candidate [Channel] Source

A list of known (social) media channels for this candidate.

cCandidateURL :: Lens' Candidate (Maybe Text) Source

The URL for the candidate's campaign web site.

cOrderOnBallot :: Lens' Candidate (Maybe Int64) Source

The order the candidate appears on the ballot for this contest.

cName :: Lens' Candidate (Maybe Text) Source

The candidate's name.

cParty :: Lens' Candidate (Maybe Text) Source

The full name of the party the candidate is a member of.

RepresentativesRepresentativeInfoByAddressLevels

Office

data Office Source

Information about an Office held by one or more Officials.

See: office smart constructor.

office :: Office Source

Creates a value of Office with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

oDivisionId :: Lens' Office (Maybe Text) Source

The OCD ID of the division with which this office is associated.

oRoles :: Lens' Office [Text] Source

The roles which this office fulfills. Roles are not meant to be exhaustive, or to exactly specify the entire set of responsibilities of a given office, but are meant to be rough categories that are useful for general selection from or sorting of a list of offices.

oOfficialIndices :: Lens' Office [Word32] Source

List of indices in the officials array of people who presently hold this office.

oSources :: Lens' Office [Source] Source

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

oName :: Lens' Office (Maybe Text) Source

The human-readable name of the office.

oLevels :: Lens' Office [Text] Source

The levels of government of which this office is part. 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".

RepresentativesRepresentativeInfoByDivisionRoles

Channel

data Channel Source

A social media or web channel for a candidate.

See: channel smart constructor.

channel :: Channel Source

Creates a value of Channel with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

cId :: Lens' Channel (Maybe Text) Source

The unique public identifier for the candidate's channel.

cType :: Lens' Channel (Maybe Text) Source

The type of channel. The following is a list of types of channels, but is not exhaustive. More channel types may be added at a later time. One of: GooglePlus, YouTube, Facebook, Twitter

Election

data Election Source

Information about the election that was queried.

See: election smart constructor.

election :: Election Source

Creates a value of Election with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

eOcdDivisionId :: Lens' Election (Maybe Text) Source

The political division of the election. Represented as an OCD Division ID. Voters within these political jurisdictions are covered by this election. This is typically a state such as ocd-division/country:us/state:ca or for the midterms or general election the entire US (i.e. ocd-division/country:us).

eElectionDay :: Lens' Election (Maybe Text) Source

Day of the election in YYYY-MM-DD format.

eName :: Lens' Election (Maybe Text) Source

A displayable name for the election.

eId :: Lens' Election (Maybe Int64) Source

The unique ID of this election.

RepresentativeInfoResponse

representativeInfoResponse :: RepresentativeInfoResponse Source

Creates a value of RepresentativeInfoResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rirKind :: Lens' RepresentativeInfoResponse Text Source

Identifies what kind of resource this is. Value: the fixed string "civicinfo#representativeInfoResponse".

rirNormalizedInput :: Lens' RepresentativeInfoResponse (Maybe SimpleAddressType) Source

The normalized version of the requested address

rirOfficials :: Lens' RepresentativeInfoResponse [Official] Source

Officials holding the offices listed above. Will only be present if includeOffices was true in the request.

rirDivisions :: Lens' RepresentativeInfoResponse (Maybe RepresentativeInfoResponseDivisions) Source

Political geographic divisions that contain the requested address.

rirOffices :: Lens' RepresentativeInfoResponse [Office] Source

Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request.

DivisionSearchResult

divisionSearchResult :: DivisionSearchResult Source

Creates a value of DivisionSearchResult with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

dsrAliases :: Lens' DivisionSearchResult [Text] Source

Other Open Civic Data identifiers that refer to the same division -- for example, those that refer to other political divisions whose boundaries are defined to be coterminous with this one. For example, ocd-division/country:us/state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, since Wyoming has only one Congressional district.

dsrName :: Lens' DivisionSearchResult (Maybe Text) Source

The name of the division.

dsrOcdId :: Lens' DivisionSearchResult (Maybe Text) Source

The unique Open Civic Data identifier for this division.

AdministrativeBody

abCorrespondenceAddress :: Lens' AdministrativeBody (Maybe SimpleAddressType) Source

The mailing address of this administrative body.

abAbsenteeVotingInfoURL :: Lens' AdministrativeBody (Maybe Text) Source

A URL provided by this administrative body for information on absentee voting.

abHoursOfOperation :: Lens' AdministrativeBody (Maybe Text) Source

A description of the hours of operation for this administrative body.

abBallotInfoURL :: Lens' AdministrativeBody (Maybe Text) Source

A URL provided by this administrative body to give contest information to the voter.

abPhysicalAddress :: Lens' AdministrativeBody (Maybe SimpleAddressType) Source

The physical address of this administrative body.

abElectionRegistrationConfirmationURL :: Lens' AdministrativeBody (Maybe Text) Source

A URL provided by this administrative body for confirming that the voter is registered to vote.

abElectionInfoURL :: Lens' AdministrativeBody (Maybe Text) Source

A URL provided by this administrative body for looking up general election information.

abVotingLocationFinderURL :: Lens' AdministrativeBody (Maybe Text) Source

A URL provided by this administrative body for looking up where to vote.

abElectionOfficials :: Lens' AdministrativeBody [ElectionOfficial] Source

The election officials for this election administrative body.

abName :: Lens' AdministrativeBody (Maybe Text) Source

The name of this election administrative body.

abElectionRulesURL :: Lens' AdministrativeBody (Maybe Text) Source

A URL provided by this administrative body describing election rules to the voter.

abVoterServices :: Lens' AdministrativeBody [Text] Source

A description of the services this administrative body may provide.

abElectionRegistrationURL :: Lens' AdministrativeBody (Maybe Text) Source

A URL provided by this administrative body for looking up how to register to vote.

Contest

data Contest Source

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

See: contest smart constructor.

conReferendumPassageThreshold :: Lens' Contest (Maybe Text) Source

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'.

conRoles :: Lens' Contest [Text] Source

The roles which this office fulfills.

conReferendumURL :: Lens' Contest (Maybe Text) Source

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

conReferendumEffectOfAbstain :: Lens' Contest (Maybe Text) Source

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'.

conReferendumSubtitle :: Lens' Contest (Maybe Text) Source

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

conNumberVotingFor :: Lens' Contest (Maybe Int64) Source

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

conOffice :: Lens' Contest (Maybe Text) Source

The name of the office for this contest.

conReferendumConStatement :: Lens' Contest (Maybe Text) Source

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'.

conSources :: Lens' Contest [Source] Source

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

conReferendumProStatement :: Lens' Contest (Maybe Text) Source

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'.

conReferendumBallotResponses :: Lens' Contest [Text] Source

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, or a judge's name for a retention contest. This field is only populated for contests of type 'Referendum'.

conNumberElected :: Lens' Contest (Maybe Int64) Source

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

conSpecial :: Lens' Contest (Maybe Text) Source

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

conReferendumText :: Lens' Contest (Maybe Text) Source

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

conPrimaryParty :: Lens' Contest (Maybe Text) Source

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

conId :: Lens' Contest (Maybe Text) Source

An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page.

conType :: Lens' Contest (Maybe Text) Source

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

conElectorateSpecifications :: Lens' Contest (Maybe Text) Source

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

conReferendumBrief :: Lens' Contest (Maybe Text) Source

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'.

conDistrict :: Lens' Contest (Maybe ElectoralDistrict) Source

Information about the electoral district that this contest is in.

conLevel :: Lens' Contest [Text] Source

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".

conCandidates :: Lens' Contest [Candidate] Source

The candidate choices for this contest.

conReferendumTitle :: Lens' Contest (Maybe Text) Source

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

conBallotPlacement :: Lens' Contest (Maybe Int64) Source

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

DivisionSearchResponse

divisionSearchResponse :: DivisionSearchResponse Source

Creates a value of DivisionSearchResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

dsrKind :: Lens' DivisionSearchResponse Text Source

Identifies what kind of resource this is. Value: the fixed string "civicinfo#divisionSearchResponse".

RepresentativeInfoDataDivisions

representativeInfoDataDivisions Source

Creates a value of RepresentativeInfoDataDivisions with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

riddAddtional :: Lens' RepresentativeInfoDataDivisions (HashMap Text GeographicDivision) Source

The unique Open Civic Data identifier for this division.

RepresentativesRepresentativeInfoByAddressRoles

ElectionOfficial

electionOfficial :: ElectionOfficial Source

Creates a value of ElectionOfficial with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

eoFaxNumber :: Lens' ElectionOfficial (Maybe Text) Source

The fax number of the election official.

eoName :: Lens' ElectionOfficial (Maybe Text) Source

The full name of the election official.

eoOfficePhoneNumber :: Lens' ElectionOfficial (Maybe Text) Source

The office phone number of the election official.

eoEmailAddress :: Lens' ElectionOfficial (Maybe Text) Source

The email address of the election official.

eoTitle :: Lens' ElectionOfficial (Maybe Text) Source

The title of the election official.

RepresentativeInfoData

representativeInfoData :: RepresentativeInfoData Source

Creates a value of RepresentativeInfoData with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

ridOfficials :: Lens' RepresentativeInfoData [Official] Source

Officials holding the offices listed above. Will only be present if includeOffices was true in the request.

ridDivisions :: Lens' RepresentativeInfoData (Maybe RepresentativeInfoDataDivisions) Source

Political geographic divisions that contain the requested address.

ridOffices :: Lens' RepresentativeInfoData [Office] Source

Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request.

Source

data Source Source

Contains information about the data source for the element containing it.

See: source smart constructor.

source :: Source Source

Creates a value of Source with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

sName :: Lens' Source (Maybe Text) Source

The name of the data source.

sOfficial :: Lens' Source (Maybe Bool) Source

Whether this data comes from an official government source.

ElectoralDistrict

electoralDistrict :: ElectoralDistrict Source

Creates a value of ElectoralDistrict with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

edName :: Lens' ElectoralDistrict (Maybe Text) Source

The name of the district.

edScope :: Lens' ElectoralDistrict (Maybe Text) Source

The geographic scope of this district. If unspecified the district's geography is not known. One of: national, statewide, congressional, stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, township, countyCouncil, cityCouncil, ward, special

edId :: Lens' ElectoralDistrict (Maybe Text) Source

An identifier for this district, relative to its scope. For example, the 34th State Senate district would have id "34" and a scope of stateUpper.

SimpleAddressType

simpleAddressType :: SimpleAddressType Source

Creates a value of SimpleAddressType with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

satLine2 :: Lens' SimpleAddressType (Maybe Text) Source

The second line the address, if needed.

satState :: Lens' SimpleAddressType (Maybe Text) Source

The US two letter state abbreviation of the address.

satLine3 :: Lens' SimpleAddressType (Maybe Text) Source

The third line of the address, if needed.

satZip :: Lens' SimpleAddressType (Maybe Text) Source

The US Postal Zip Code of the address.

satCity :: Lens' SimpleAddressType (Maybe Text) Source

The city or town for the address.

satLine1 :: Lens' SimpleAddressType (Maybe Text) Source

The street name and number of this address.

satLocationName :: Lens' SimpleAddressType (Maybe Text) Source

The name of the location.

AdministrationRegion

administrationRegion :: AdministrationRegion Source

Creates a value of AdministrationRegion with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

arLocalJurisdiction :: Lens' AdministrationRegion (Maybe AdministrationRegion) Source

The city or county that provides election information for this voter. This object can have the same elements as state.

arSources :: Lens' AdministrationRegion [Source] Source

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

arName :: Lens' AdministrationRegion (Maybe Text) Source

The name of the jurisdiction.

arElectionAdministrationBody :: Lens' AdministrationRegion (Maybe AdministrativeBody) Source

The election administration body for this area.

arId :: Lens' AdministrationRegion (Maybe Text) Source

An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page.

ElectionsQueryResponse

electionsQueryResponse :: ElectionsQueryResponse Source

Creates a value of ElectionsQueryResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

eqrKind :: Lens' ElectionsQueryResponse Text Source

Identifies what kind of resource this is. Value: the fixed string "civicinfo#electionsQueryResponse".

eqrElections :: Lens' ElectionsQueryResponse [Election] Source

A list of available elections

Official

data Official Source

Information about a person holding an elected office.

See: official smart constructor.

official :: Official Source

Creates a value of Official with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

offPhotoURL :: Lens' Official (Maybe Text) Source

A URL for a photo of the official.

offURLs :: Lens' Official [Text] Source

The official's public website URLs.

offChannels :: Lens' Official [Channel] Source

A list of known (social) media channels for this official.

offAddress :: Lens' Official [SimpleAddressType] Source

Addresses at which to contact the official.

offPhones :: Lens' Official [Text] Source

The official's public contact phone numbers.

offName :: Lens' Official (Maybe Text) Source

The official's name.

offEmails :: Lens' Official [Text] Source

The direct email addresses for the official.

offParty :: Lens' Official (Maybe Text) Source

The full name of the party the official belongs to.