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 representative information for a single geographic division.
See: Google Civic Information API Reference for civicinfo.representatives.representativeInfoByDivision
.
Synopsis
- type RepresentativesRepresentativeInfoByDivisionResource = "civicinfo" :> ("v2" :> ("representatives" :> (Capture "ocdId" Text :> (QueryParams "roles" RepresentativesRepresentativeInfoByDivisionRoles :> (QueryParam "recursive" Bool :> (QueryParams "levels" RepresentativesRepresentativeInfoByDivisionLevels :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] DivisionRepresentativeInfoRequest :> Get '[JSON] RepresentativeInfoData))))))))
- representativesRepresentativeInfoByDivision :: DivisionRepresentativeInfoRequest -> Text -> RepresentativesRepresentativeInfoByDivision
- data RepresentativesRepresentativeInfoByDivision
- rribdRoles :: Lens' RepresentativesRepresentativeInfoByDivision [RepresentativesRepresentativeInfoByDivisionRoles]
- rribdPayload :: Lens' RepresentativesRepresentativeInfoByDivision DivisionRepresentativeInfoRequest
- rribdRecursive :: Lens' RepresentativesRepresentativeInfoByDivision (Maybe Bool)
- rribdOcdId :: Lens' RepresentativesRepresentativeInfoByDivision Text
- rribdLevels :: Lens' RepresentativesRepresentativeInfoByDivision [RepresentativesRepresentativeInfoByDivisionLevels]
REST Resource
type RepresentativesRepresentativeInfoByDivisionResource = "civicinfo" :> ("v2" :> ("representatives" :> (Capture "ocdId" Text :> (QueryParams "roles" RepresentativesRepresentativeInfoByDivisionRoles :> (QueryParam "recursive" Bool :> (QueryParams "levels" RepresentativesRepresentativeInfoByDivisionLevels :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] DivisionRepresentativeInfoRequest :> Get '[JSON] RepresentativeInfoData)))))))) Source #
A resource alias for civicinfo.representatives.representativeInfoByDivision
method which the
RepresentativesRepresentativeInfoByDivision
request conforms to.
Creating a Request
representativesRepresentativeInfoByDivision Source #
Creates a value of RepresentativesRepresentativeInfoByDivision
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data RepresentativesRepresentativeInfoByDivision Source #
Looks up representative information for a single geographic division.
See: representativesRepresentativeInfoByDivision
smart constructor.
Instances
Request Lenses
rribdRoles :: Lens' RepresentativesRepresentativeInfoByDivision [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.
rribdPayload :: Lens' RepresentativesRepresentativeInfoByDivision DivisionRepresentativeInfoRequest Source #
Multipart request metadata.
rribdRecursive :: Lens' RepresentativesRepresentativeInfoByDivision (Maybe Bool) Source #
If true, information about all divisions contained in the division requested will be included as well. For example, if querying ocd-division/country:us/district:dc, this would also return all DC's wards and ANCs.
rribdOcdId :: Lens' RepresentativesRepresentativeInfoByDivision Text Source #
The Open Civic Data division identifier of the division to look up.
rribdLevels :: Lens' RepresentativesRepresentativeInfoByDivision [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.