Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- Service Configuration
- API Declaration
- Resources
- Types
- RepresentativeInfoResponseDivisions
- VoterInfoResponse
- PollingLocation
- RepresentativesRepresentativeInfoByDivisionLevels
- GeographicDivision
- Candidate
- RepresentativesRepresentativeInfoByAddressLevels
- Office
- RepresentativesRepresentativeInfoByDivisionRoles
- ElectionsQueryRequest
- Channel
- Election
- RepresentativeInfoResponse
- VoterInfoSegmentResult
- DivisionSearchResult
- DivisionSearchRequest
- AdministrativeBody
- RepresentativeInfoRequest
- Contest
- DivisionSearchResponse
- RepresentativeInfoDataDivisions
- RepresentativesRepresentativeInfoByAddressRoles
- ElectionOfficial
- RepresentativeInfoData
- Source
- DivisionRepresentativeInfoRequest
- ElectoralDistrict
- VoterInfoRequest
- SimpleAddressType
- ContextParams
- PostalAddress
- AdministrationRegion
- ElectionsQueryResponse
- Official
Provides polling places, early vote locations, contest data, election officials, and government representatives for U.S. residential addresses.
- civicInfoService :: ServiceConfig
- type CivicInfoAPI = ElectionsVoterInfoQueryResource :<|> (ElectionsElectionQueryResource :<|> (DivisionsSearchResource :<|> (RepresentativesRepresentativeInfoByDivisionResource :<|> RepresentativesRepresentativeInfoByAddressResource)))
- module Network.Google.Resource.CivicInfo.Divisions.Search
- module Network.Google.Resource.CivicInfo.Elections.ElectionQuery
- module Network.Google.Resource.CivicInfo.Elections.VoterInfoQuery
- module Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByAddress
- module Network.Google.Resource.CivicInfo.Representatives.RepresentativeInfoByDivision
- data RepresentativeInfoResponseDivisions
- representativeInfoResponseDivisions :: HashMap Text GeographicDivision -> RepresentativeInfoResponseDivisions
- rirdAddtional :: Lens' RepresentativeInfoResponseDivisions (HashMap Text GeographicDivision)
- data VoterInfoResponse
- voterInfoResponse :: VoterInfoResponse
- virOtherElections :: Lens' VoterInfoResponse [Election]
- virContests :: Lens' VoterInfoResponse [Contest]
- virState :: Lens' VoterInfoResponse [AdministrationRegion]
- virKind :: Lens' VoterInfoResponse Text
- virDropOffLocations :: Lens' VoterInfoResponse [PollingLocation]
- virElection :: Lens' VoterInfoResponse (Maybe Election)
- virNormalizedInput :: Lens' VoterInfoResponse (Maybe SimpleAddressType)
- virMailOnly :: Lens' VoterInfoResponse (Maybe Bool)
- virEarlyVoteSites :: Lens' VoterInfoResponse [PollingLocation]
- virPollingLocations :: Lens' VoterInfoResponse [PollingLocation]
- virPrecinctId :: Lens' VoterInfoResponse (Maybe Text)
- data PollingLocation
- pollingLocation :: PollingLocation
- plVoterServices :: Lens' PollingLocation (Maybe Text)
- plEndDate :: Lens' PollingLocation (Maybe Text)
- plSources :: Lens' PollingLocation [Source]
- plAddress :: Lens' PollingLocation (Maybe SimpleAddressType)
- plStartDate :: Lens' PollingLocation (Maybe Text)
- plPollingHours :: Lens' PollingLocation (Maybe Text)
- plName :: Lens' PollingLocation (Maybe Text)
- plId :: Lens' PollingLocation (Maybe Text)
- plNotes :: Lens' PollingLocation (Maybe Text)
- data RepresentativesRepresentativeInfoByDivisionLevels
- data GeographicDivision
- geographicDivision :: GeographicDivision
- gdName :: Lens' GeographicDivision (Maybe Text)
- gdOfficeIndices :: Lens' GeographicDivision [Word32]
- gdAlsoKnownAs :: Lens' GeographicDivision [Text]
- data Candidate
- candidate :: Candidate
- cEmail :: Lens' Candidate (Maybe Text)
- cPhone :: Lens' Candidate (Maybe Text)
- cPhotoURL :: Lens' Candidate (Maybe Text)
- cChannels :: Lens' Candidate [Channel]
- cCandidateURL :: Lens' Candidate (Maybe Text)
- cOrderOnBallot :: Lens' Candidate (Maybe Int64)
- cName :: Lens' Candidate (Maybe Text)
- cParty :: Lens' Candidate (Maybe Text)
- data RepresentativesRepresentativeInfoByAddressLevels
- data Office
- office :: Office
- oDivisionId :: Lens' Office (Maybe Text)
- oRoles :: Lens' Office [Text]
- oOfficialIndices :: Lens' Office [Word32]
- oSources :: Lens' Office [Source]
- oName :: Lens' Office (Maybe Text)
- oLevels :: Lens' Office [Text]
- data RepresentativesRepresentativeInfoByDivisionRoles
- data ElectionsQueryRequest
- electionsQueryRequest :: ElectionsQueryRequest
- eqrContextParams :: Lens' ElectionsQueryRequest (Maybe ContextParams)
- data Channel
- channel :: Channel
- cId :: Lens' Channel (Maybe Text)
- cType :: Lens' Channel (Maybe Text)
- data Election
- election :: Election
- eOcdDivisionId :: Lens' Election (Maybe Text)
- eElectionDay :: Lens' Election (Maybe Text)
- eName :: Lens' Election (Maybe Text)
- eId :: Lens' Election (Maybe Int64)
- data RepresentativeInfoResponse
- representativeInfoResponse :: RepresentativeInfoResponse
- rirKind :: Lens' RepresentativeInfoResponse Text
- rirNormalizedInput :: Lens' RepresentativeInfoResponse (Maybe SimpleAddressType)
- rirOfficials :: Lens' RepresentativeInfoResponse [Official]
- rirDivisions :: Lens' RepresentativeInfoResponse (Maybe RepresentativeInfoResponseDivisions)
- rirOffices :: Lens' RepresentativeInfoResponse [Office]
- data VoterInfoSegmentResult
- voterInfoSegmentResult :: VoterInfoSegmentResult
- visrResponse :: Lens' VoterInfoSegmentResult (Maybe VoterInfoResponse)
- visrGeneratedMillis :: Lens' VoterInfoSegmentResult (Maybe Int64)
- visrPostalAddress :: Lens' VoterInfoSegmentResult (Maybe PostalAddress)
- visrRequest :: Lens' VoterInfoSegmentResult (Maybe VoterInfoRequest)
- data DivisionSearchResult
- divisionSearchResult :: DivisionSearchResult
- dsrAliases :: Lens' DivisionSearchResult [Text]
- dsrName :: Lens' DivisionSearchResult (Maybe Text)
- dsrOcdId :: Lens' DivisionSearchResult (Maybe Text)
- data DivisionSearchRequest
- divisionSearchRequest :: DivisionSearchRequest
- dsrContextParams :: Lens' DivisionSearchRequest (Maybe ContextParams)
- data AdministrativeBody
- administrativeBody :: AdministrativeBody
- abCorrespondenceAddress :: Lens' AdministrativeBody (Maybe SimpleAddressType)
- abAbsenteeVotingInfoURL :: Lens' AdministrativeBody (Maybe Text)
- abHoursOfOperation :: Lens' AdministrativeBody (Maybe Text)
- abBallotInfoURL :: Lens' AdministrativeBody (Maybe Text)
- abPhysicalAddress :: Lens' AdministrativeBody (Maybe SimpleAddressType)
- abElectionRegistrationConfirmationURL :: Lens' AdministrativeBody (Maybe Text)
- abElectionInfoURL :: Lens' AdministrativeBody (Maybe Text)
- abVotingLocationFinderURL :: Lens' AdministrativeBody (Maybe Text)
- abElectionOfficials :: Lens' AdministrativeBody [ElectionOfficial]
- abName :: Lens' AdministrativeBody (Maybe Text)
- abElectionRulesURL :: Lens' AdministrativeBody (Maybe Text)
- abAddressLines :: Lens' AdministrativeBody [Text]
- abVoterServices :: Lens' AdministrativeBody [Text]
- abElectionRegistrationURL :: Lens' AdministrativeBody (Maybe Text)
- data RepresentativeInfoRequest
- representativeInfoRequest :: RepresentativeInfoRequest
- rirContextParams :: Lens' RepresentativeInfoRequest (Maybe ContextParams)
- data Contest
- contest :: Contest
- conReferendumPassageThreshold :: Lens' Contest (Maybe Text)
- conRoles :: Lens' Contest [Text]
- conReferendumURL :: Lens' Contest (Maybe Text)
- conReferendumEffectOfAbstain :: Lens' Contest (Maybe Text)
- conReferendumSubtitle :: Lens' Contest (Maybe Text)
- conNumberVotingFor :: Lens' Contest (Maybe Int64)
- conOffice :: Lens' Contest (Maybe Text)
- conReferendumConStatement :: Lens' Contest (Maybe Text)
- conSources :: Lens' Contest [Source]
- conReferendumProStatement :: Lens' Contest (Maybe Text)
- conReferendumBallotResponses :: Lens' Contest [Text]
- conNumberElected :: Lens' Contest (Maybe Int64)
- conSpecial :: Lens' Contest (Maybe Text)
- conReferendumText :: Lens' Contest (Maybe Text)
- conPrimaryParty :: Lens' Contest (Maybe Text)
- conId :: Lens' Contest (Maybe Text)
- conType :: Lens' Contest (Maybe Text)
- conElectorateSpecifications :: Lens' Contest (Maybe Text)
- conReferendumBrief :: Lens' Contest (Maybe Text)
- conDistrict :: Lens' Contest (Maybe ElectoralDistrict)
- conLevel :: Lens' Contest [Text]
- conCandidates :: Lens' Contest [Candidate]
- conReferendumTitle :: Lens' Contest (Maybe Text)
- conBallotPlacement :: Lens' Contest (Maybe Int64)
- data DivisionSearchResponse
- divisionSearchResponse :: DivisionSearchResponse
- dsrResults :: Lens' DivisionSearchResponse [DivisionSearchResult]
- dsrKind :: Lens' DivisionSearchResponse Text
- data RepresentativeInfoDataDivisions
- representativeInfoDataDivisions :: HashMap Text GeographicDivision -> RepresentativeInfoDataDivisions
- riddAddtional :: Lens' RepresentativeInfoDataDivisions (HashMap Text GeographicDivision)
- data RepresentativesRepresentativeInfoByAddressRoles
- data ElectionOfficial
- electionOfficial :: ElectionOfficial
- eoFaxNumber :: Lens' ElectionOfficial (Maybe Text)
- eoName :: Lens' ElectionOfficial (Maybe Text)
- eoOfficePhoneNumber :: Lens' ElectionOfficial (Maybe Text)
- eoEmailAddress :: Lens' ElectionOfficial (Maybe Text)
- eoTitle :: Lens' ElectionOfficial (Maybe Text)
- data RepresentativeInfoData
- representativeInfoData :: RepresentativeInfoData
- ridOfficials :: Lens' RepresentativeInfoData [Official]
- ridDivisions :: Lens' RepresentativeInfoData (Maybe RepresentativeInfoDataDivisions)
- ridOffices :: Lens' RepresentativeInfoData [Office]
- data Source
- source :: Source
- sName :: Lens' Source (Maybe Text)
- sOfficial :: Lens' Source (Maybe Bool)
- data DivisionRepresentativeInfoRequest
- divisionRepresentativeInfoRequest :: DivisionRepresentativeInfoRequest
- drirContextParams :: Lens' DivisionRepresentativeInfoRequest (Maybe ContextParams)
- data ElectoralDistrict
- electoralDistrict :: ElectoralDistrict
- edKgForeignKey :: Lens' ElectoralDistrict (Maybe Text)
- edName :: Lens' ElectoralDistrict (Maybe Text)
- edScope :: Lens' ElectoralDistrict (Maybe Text)
- edId :: Lens' ElectoralDistrict (Maybe Text)
- data VoterInfoRequest
- voterInfoRequest :: VoterInfoRequest
- virVoterInfoSegmentResult :: Lens' VoterInfoRequest (Maybe VoterInfoSegmentResult)
- virContextParams :: Lens' VoterInfoRequest (Maybe ContextParams)
- data SimpleAddressType
- simpleAddressType :: SimpleAddressType
- satLine2 :: Lens' SimpleAddressType (Maybe Text)
- satState :: Lens' SimpleAddressType (Maybe Text)
- satLine3 :: Lens' SimpleAddressType (Maybe Text)
- satZip :: Lens' SimpleAddressType (Maybe Text)
- satCity :: Lens' SimpleAddressType (Maybe Text)
- satLine1 :: Lens' SimpleAddressType (Maybe Text)
- satLocationName :: Lens' SimpleAddressType (Maybe Text)
- data ContextParams
- contextParams :: ContextParams
- cpClientProFile :: Lens' ContextParams (Maybe Text)
- data PostalAddress
- postalAddress :: PostalAddress
- paAdministrativeAreaName :: Lens' PostalAddress (Maybe Text)
- paRecipientName :: Lens' PostalAddress (Maybe Text)
- paLanguageCode :: Lens' PostalAddress (Maybe Text)
- paSortingCode :: Lens' PostalAddress (Maybe Text)
- paPremiseName :: Lens' PostalAddress (Maybe Text)
- paPostalCodeNumberExtension :: Lens' PostalAddress (Maybe Text)
- paCountryNameCode :: Lens' PostalAddress (Maybe Text)
- paDependentThoroughfaresConnector :: Lens' PostalAddress (Maybe Text)
- paThoroughfareLeadingType :: Lens' PostalAddress (Maybe Text)
- paSubAdministrativeAreaName :: Lens' PostalAddress (Maybe Text)
- paThoroughfareTrailingType :: Lens' PostalAddress (Maybe Text)
- paPostBoxNumber :: Lens' PostalAddress (Maybe Text)
- paThoroughfarePreDirection :: Lens' PostalAddress (Maybe Text)
- paLocalityName :: Lens' PostalAddress (Maybe Text)
- paDependentThoroughfaresType :: Lens' PostalAddress (Maybe Text)
- paThoroughfarePostDirection :: Lens' PostalAddress (Maybe Text)
- paIsDisputed :: Lens' PostalAddress (Maybe Bool)
- paDependentThoroughfarePreDirection :: Lens' PostalAddress (Maybe Text)
- paThoroughfareNumber :: Lens' PostalAddress (Maybe Text)
- paDependentThoroughfaresIndicator :: Lens' PostalAddress (Maybe Text)
- paDependentLocalityName :: Lens' PostalAddress (Maybe Text)
- paFirmName :: Lens' PostalAddress (Maybe Text)
- paCountryName :: Lens' PostalAddress (Maybe Text)
- paDependentThoroughfareTrailingType :: Lens' PostalAddress (Maybe Text)
- paDependentThoroughfareName :: Lens' PostalAddress (Maybe Text)
- paDependentThoroughfarePostDirection :: Lens' PostalAddress (Maybe Text)
- paAddressLines :: Lens' PostalAddress [Text]
- paPostalCodeNumber :: Lens' PostalAddress (Maybe Text)
- paThoroughfareName :: Lens' PostalAddress (Maybe Text)
- paSubPremiseName :: Lens' PostalAddress (Maybe Text)
- paDependentThoroughfareLeadingType :: Lens' PostalAddress (Maybe Text)
- data AdministrationRegion
- administrationRegion :: AdministrationRegion
- arLocalJurisdiction :: Lens' AdministrationRegion (Maybe AdministrationRegion)
- arSources :: Lens' AdministrationRegion [Source]
- arName :: Lens' AdministrationRegion (Maybe Text)
- arElectionAdministrationBody :: Lens' AdministrationRegion (Maybe AdministrativeBody)
- arId :: Lens' AdministrationRegion (Maybe Text)
- data ElectionsQueryResponse
- electionsQueryResponse :: ElectionsQueryResponse
- eqrKind :: Lens' ElectionsQueryResponse Text
- eqrElections :: Lens' ElectionsQueryResponse [Election]
- data Official
- official :: Official
- offPhotoURL :: Lens' Official (Maybe Text)
- offURLs :: Lens' Official [Text]
- offChannels :: Lens' Official [Channel]
- offAddress :: Lens' Official [SimpleAddressType]
- offPhones :: Lens' Official [Text]
- offName :: Lens' Official (Maybe Text)
- offEmails :: Lens' Official [Text]
- offParty :: Lens' Official (Maybe Text)
Service Configuration
civicInfoService :: ServiceConfig 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
type CivicInfoAPI = ElectionsVoterInfoQueryResource :<|> (ElectionsElectionQueryResource :<|> (DivisionsSearchResource :<|> (RepresentativesRepresentativeInfoByDivisionResource :<|> RepresentativesRepresentativeInfoByAddressResource))) Source #
Represents the entirety of the methods and resources available for the Google Civic Information API service.
Resources
civicinfo.divisions.search
civicinfo.elections.electionQuery
civicinfo.elections.voterInfoQuery
civicinfo.representatives.representativeInfoByAddress
civicinfo.representatives.representativeInfoByDivision
Types
RepresentativeInfoResponseDivisions
data RepresentativeInfoResponseDivisions Source #
Political geographic divisions that contain the requested address.
See: representativeInfoResponseDivisions
smart constructor.
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
data VoterInfoResponse Source #
The result of a voter info lookup query.
See: voterInfoResponse
smart constructor.
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
data RepresentativesRepresentativeInfoByDivisionLevels Source #
A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.
ADMINISTRATIVEAREA1 | administrativeArea1 |
ADMINISTRATIVEAREA2 | administrativeArea2 |
Country | country |
International | international |
Locality | locality |
Regional | regional |
Special | special |
SUBLOCALITY1 | subLocality1 |
SUBLOCALITY2 | subLocality2 |
GeographicDivision
data GeographicDivision Source #
Describes a political geography.
See: geographicDivision
smart constructor.
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:
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
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:
cPhone :: Lens' Candidate (Maybe Text) Source #
The voice phone number for the candidate's campaign office.
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. If this is a joint ticket it will indicate the name of the candidate at the top of a ticket followed by a / and that name of candidate at the bottom of the ticket. e.g. "Mitt Romney / Paul Ryan"
cParty :: Lens' Candidate (Maybe Text) Source #
The full name of the party the candidate is a member of.
RepresentativesRepresentativeInfoByAddressLevels
data RepresentativesRepresentativeInfoByAddressLevels Source #
A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.
RRIBALADMINISTRATIVEAREA1 | administrativeArea1 |
RRIBALADMINISTRATIVEAREA2 | administrativeArea2 |
RRIBALCountry | country |
RRIBALInternational | international |
RRIBALLocality | locality |
RRIBALRegional | regional |
RRIBALSpecial | special |
RRIBALSUBLOCALITY1 | subLocality1 |
RRIBALSUBLOCALITY2 | subLocality2 |
Office
Information about an Office held by one or more Officials.
See: office
smart constructor.
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.
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
data RepresentativesRepresentativeInfoByDivisionRoles Source #
A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.
DeputyHeadOfGovernment | deputyHeadOfGovernment |
ExecutiveCouncil | executiveCouncil |
GovernmentOfficer | governmentOfficer |
HeadOfGovernment | headOfGovernment |
HeadOfState | headOfState |
HighestCourtJudge | highestCourtJudge |
Judge | judge |
LegislatorLowerBody | legislatorLowerBody |
LegislatorUpperBody | legislatorUpperBody |
SchoolBoard | schoolBoard |
SpecialPurposeOfficer | specialPurposeOfficer |
ElectionsQueryRequest
data ElectionsQueryRequest Source #
electionsQueryRequest :: ElectionsQueryRequest Source #
Creates a value of ElectionsQueryRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
Channel
A social media or web channel for a candidate.
See: channel
smart constructor.
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
Information about the election that was queried.
See: election
smart constructor.
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).
RepresentativeInfoResponse
data RepresentativeInfoResponse Source #
The result of a representative info lookup query.
See: representativeInfoResponse
smart constructor.
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.
VoterInfoSegmentResult
voterInfoSegmentResult :: VoterInfoSegmentResult Source #
Creates a value of VoterInfoSegmentResult
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
DivisionSearchResult
data DivisionSearchResult Source #
Represents a political geographic division that matches the requested query.
See: divisionSearchResult
smart constructor.
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.
dsrOcdId :: Lens' DivisionSearchResult (Maybe Text) Source #
The unique Open Civic Data identifier for this division.
DivisionSearchRequest
data DivisionSearchRequest Source #
A search request for political geographies.
See: divisionSearchRequest
smart constructor.
divisionSearchRequest :: DivisionSearchRequest Source #
Creates a value of DivisionSearchRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
AdministrativeBody
data AdministrativeBody Source #
Information about an election administrative body (e.g. County Board of Elections).
See: administrativeBody
smart constructor.
administrativeBody :: AdministrativeBody Source #
Creates a value of AdministrativeBody
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
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.
RepresentativeInfoRequest
data RepresentativeInfoRequest Source #
A request for political geography and representative information for an address.
See: representativeInfoRequest
smart constructor.
representativeInfoRequest :: RepresentativeInfoRequest Source #
Creates a value of RepresentativeInfoRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
Contest
Information about a contest that appears on a voter's ballot.
See: contest
smart constructor.
Creates a value of Contest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
conReferendumPassageThreshold
conRoles
conReferendumURL
conReferendumEffectOfAbstain
conReferendumSubtitle
conNumberVotingFor
conOffice
conReferendumConStatement
conSources
conReferendumProStatement
conReferendumBallotResponses
conNumberElected
conSpecial
conReferendumText
conPrimaryParty
conId
conType
conElectorateSpecifications
conReferendumBrief
conDistrict
conLevel
conCandidates
conReferendumTitle
conBallotPlacement
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'.
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.
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. 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'. For Retention contests this will typically be 'Retention'.
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".
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
data DivisionSearchResponse Source #
The result of a division search query.
See: divisionSearchResponse
smart constructor.
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
data RepresentativeInfoDataDivisions Source #
Political geographic divisions that contain the requested address.
See: representativeInfoDataDivisions
smart constructor.
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
data RepresentativesRepresentativeInfoByAddressRoles Source #
A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.
RRIBARDeputyHeadOfGovernment | deputyHeadOfGovernment |
RRIBARExecutiveCouncil | executiveCouncil |
RRIBARGovernmentOfficer | governmentOfficer |
RRIBARHeadOfGovernment | headOfGovernment |
RRIBARHeadOfState | headOfState |
RRIBARHighestCourtJudge | highestCourtJudge |
RRIBARJudge | judge |
RRIBARLegislatorLowerBody | legislatorLowerBody |
RRIBARLegislatorUpperBody | legislatorUpperBody |
RRIBARSchoolBoard | schoolBoard |
RRIBARSpecialPurposeOfficer | specialPurposeOfficer |
ElectionOfficial
data ElectionOfficial Source #
Information about individual election officials.
See: electionOfficial
smart constructor.
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.
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.
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
Contains information about the data source for the element containing it.
See: source
smart constructor.
sOfficial :: Lens' Source (Maybe Bool) Source #
Whether this data comes from an official government source.
DivisionRepresentativeInfoRequest
data DivisionRepresentativeInfoRequest Source #
A request to look up representative information for a single division.
See: divisionRepresentativeInfoRequest
smart constructor.
divisionRepresentativeInfoRequest :: DivisionRepresentativeInfoRequest Source #
Creates a value of DivisionRepresentativeInfoRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ElectoralDistrict
data ElectoralDistrict Source #
Describes the geographic scope of a contest.
See: electoralDistrict
smart constructor.
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:
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.
VoterInfoRequest
data VoterInfoRequest Source #
A request for information about a voter.
See: voterInfoRequest
smart constructor.
voterInfoRequest :: VoterInfoRequest Source #
Creates a value of VoterInfoRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
SimpleAddressType
data SimpleAddressType Source #
A simple representation of an address.
See: simpleAddressType
smart constructor.
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:
satState :: Lens' SimpleAddressType (Maybe Text) Source #
The US two letter state abbreviation of 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.
ContextParams
data ContextParams Source #
contextParams :: ContextParams Source #
Creates a value of ContextParams
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
PostalAddress
data PostalAddress Source #
postalAddress :: PostalAddress Source #
Creates a value of PostalAddress
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
paAdministrativeAreaName
paRecipientName
paLanguageCode
paSortingCode
paPremiseName
paPostalCodeNumberExtension
paCountryNameCode
paDependentThoroughfaresConnector
paThoroughfareLeadingType
paSubAdministrativeAreaName
paThoroughfareTrailingType
paPostBoxNumber
paThoroughfarePreDirection
paLocalityName
paDependentThoroughfaresType
paThoroughfarePostDirection
paIsDisputed
paDependentThoroughfarePreDirection
paThoroughfareNumber
paDependentThoroughfaresIndicator
paDependentLocalityName
paFirmName
paCountryName
paDependentThoroughfareTrailingType
paDependentThoroughfareName
paDependentThoroughfarePostDirection
paAddressLines
paPostalCodeNumber
paThoroughfareName
paSubPremiseName
paDependentThoroughfareLeadingType
paFirmName :: Lens' PostalAddress (Maybe Text) Source #
AdministrationRegion
data AdministrationRegion Source #
Describes information about a regional election administrative area.
See: administrationRegion
smart constructor.
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.
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
data ElectionsQueryResponse Source #
The list of elections available for this version of the API.
See: electionsQueryResponse
smart constructor.
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
Information about a person holding an elected office.
See: official
smart constructor.
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:
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.