google_api_civic_info v0.1.0 GoogleApi.CivicInfo.V2.Api.Representatives View Source
API calls for all endpoints tagged Representatives
.
Link to this section Summary
Functions
Looks up political geography and representative information for a single address
Looks up representative information for a single geographic division
Link to this section Functions
Link to this function
civicinfo_representatives_representative_info_by_address(connection, opts \\ [])
View Source
civicinfo_representatives_representative_info_by_address( Tesla.Env.client(), keyword() ) :: {:ok, GoogleApi.CivicInfo.V2.Model.RepresentativeInfoResponse.t()} | {:error, Tesla.Env.t()}
Looks up political geography and representative information for a single address.
Parameters
- connection (GoogleApi.CivicInfo.V2.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :address (String.t): The address to look up. May only be specified if the field ocdId is not given in the URL.
- :includeOffices (boolean()): Whether to return information about offices and officials. If false, only the top-level district information will be returned.
- :levels ([String.t]): 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.
- :roles ([String.t]): 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.
- :body (RepresentativeInfoRequest):
Returns
{:ok, %GoogleApi.CivicInfo.V2.Model.RepresentativeInfoResponse{}} on success {:error, info} on failure
Link to this function
civicinfo_representatives_representative_info_by_division(connection, ocd_id, opts \\ [])
View Source
civicinfo_representatives_representative_info_by_division( Tesla.Env.client(), String.t(), keyword() ) :: {:ok, GoogleApi.CivicInfo.V2.Model.RepresentativeInfoData.t()} | {:error, Tesla.Env.t()}
Looks up representative information for a single geographic division.
Parameters
- connection (GoogleApi.CivicInfo.V2.Connection): Connection to server
- ocd_id (String.t): The Open Civic Data division identifier of the division to look up.
opts (KeywordList): [optional] Optional parameters
- :alt (String.t): Data format for the response.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- :userIp (String.t): Deprecated. Please use quotaUser instead.
- :levels ([String.t]): 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.
- :recursive (boolean()): 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.
- :roles ([String.t]): 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.
- :body (DivisionRepresentativeInfoRequest):
Returns
{:ok, %GoogleApi.CivicInfo.V2.Model.RepresentativeInfoData{}} on success {:error, info} on failure