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 |
Looks up information relevant to a voter based on the voter's registered address.
See: Google Civic Information API Reference for civicinfo.elections.voterInfoQuery
.
- type ElectionsVoterInfoQueryResource = "civicinfo" :> ("v2" :> ("voterinfo" :> (QueryParam "address" Text :> (QueryParam "returnAllAvailableData" Bool :> (QueryParam "electionId" (Textual Int64) :> (QueryParam "officialOnly" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] VoterInfoRequest :> Get '[JSON] VoterInfoResponse))))))))
- electionsVoterInfoQuery :: Text -> VoterInfoRequest -> ElectionsVoterInfoQuery
- data ElectionsVoterInfoQuery
- eviqReturnAllAvailableData :: Lens' ElectionsVoterInfoQuery Bool
- eviqElectionId :: Lens' ElectionsVoterInfoQuery Int64
- eviqAddress :: Lens' ElectionsVoterInfoQuery Text
- eviqPayload :: Lens' ElectionsVoterInfoQuery VoterInfoRequest
- eviqOfficialOnly :: Lens' ElectionsVoterInfoQuery Bool
REST Resource
type ElectionsVoterInfoQueryResource = "civicinfo" :> ("v2" :> ("voterinfo" :> (QueryParam "address" Text :> (QueryParam "returnAllAvailableData" Bool :> (QueryParam "electionId" (Textual Int64) :> (QueryParam "officialOnly" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] VoterInfoRequest :> Get '[JSON] VoterInfoResponse)))))))) Source #
A resource alias for civicinfo.elections.voterInfoQuery
method which the
ElectionsVoterInfoQuery
request conforms to.
Creating a Request
electionsVoterInfoQuery Source #
Creates a value of ElectionsVoterInfoQuery
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data ElectionsVoterInfoQuery Source #
Looks up information relevant to a voter based on the voter's registered address.
See: electionsVoterInfoQuery
smart constructor.
Request Lenses
eviqReturnAllAvailableData :: Lens' ElectionsVoterInfoQuery Bool Source #
If set to true, the query will return the success codeand include any partial information when it is unable to determine a matching address or unable to determine the election for electionId=0 queries.
eviqElectionId :: Lens' ElectionsVoterInfoQuery Int64 Source #
The unique ID of the election to look up. A list of election IDs can be obtained at https://www.googleapis.com/civicinfo/{version}/elections
eviqAddress :: Lens' ElectionsVoterInfoQuery Text Source #
The registered address of the voter to look up.
eviqPayload :: Lens' ElectionsVoterInfoQuery VoterInfoRequest Source #
Multipart request metadata.
eviqOfficialOnly :: Lens' ElectionsVoterInfoQuery Bool Source #
If set to true, only data from official state sources will be returned.