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 political geography and representative information for a single address.
See: Google Civic Information API Reference for civicinfo.representatives.representativeInfoByAddress
.
Synopsis
- type RepresentativesRepresentativeInfoByAddressResource = "civicinfo" :> ("v2" :> ("representatives" :> (QueryParams "roles" RepresentativesRepresentativeInfoByAddressRoles :> (QueryParam "address" Text :> (QueryParam "includeOffices" Bool :> (QueryParams "levels" RepresentativesRepresentativeInfoByAddressLevels :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] RepresentativeInfoRequest :> Get '[JSON] RepresentativeInfoResponse))))))))
- representativesRepresentativeInfoByAddress :: RepresentativeInfoRequest -> RepresentativesRepresentativeInfoByAddress
- data RepresentativesRepresentativeInfoByAddress
- rribaRoles :: Lens' RepresentativesRepresentativeInfoByAddress [RepresentativesRepresentativeInfoByAddressRoles]
- rribaAddress :: Lens' RepresentativesRepresentativeInfoByAddress (Maybe Text)
- rribaPayload :: Lens' RepresentativesRepresentativeInfoByAddress RepresentativeInfoRequest
- rribaIncludeOffices :: Lens' RepresentativesRepresentativeInfoByAddress Bool
- rribaLevels :: Lens' RepresentativesRepresentativeInfoByAddress [RepresentativesRepresentativeInfoByAddressLevels]
REST Resource
type RepresentativesRepresentativeInfoByAddressResource = "civicinfo" :> ("v2" :> ("representatives" :> (QueryParams "roles" RepresentativesRepresentativeInfoByAddressRoles :> (QueryParam "address" Text :> (QueryParam "includeOffices" Bool :> (QueryParams "levels" RepresentativesRepresentativeInfoByAddressLevels :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] RepresentativeInfoRequest :> Get '[JSON] RepresentativeInfoResponse)))))))) Source #
A resource alias for civicinfo.representatives.representativeInfoByAddress
method which the
RepresentativesRepresentativeInfoByAddress
request conforms to.
Creating a Request
representativesRepresentativeInfoByAddress Source #
Creates a value of RepresentativesRepresentativeInfoByAddress
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data RepresentativesRepresentativeInfoByAddress Source #
Looks up political geography and representative information for a single address.
See: representativesRepresentativeInfoByAddress
smart constructor.
Instances
Request Lenses
rribaRoles :: Lens' RepresentativesRepresentativeInfoByAddress [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.
rribaAddress :: Lens' RepresentativesRepresentativeInfoByAddress (Maybe Text) Source #
The address to look up. May only be specified if the field ocdId is not given in the URL.
rribaPayload :: Lens' RepresentativesRepresentativeInfoByAddress RepresentativeInfoRequest Source #
Multipart request metadata.
rribaIncludeOffices :: Lens' RepresentativesRepresentativeInfoByAddress Bool Source #
Whether to return information about offices and officials. If false, only the top-level district information will be returned.
rribaLevels :: Lens' RepresentativesRepresentativeInfoByAddress [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.