GoogleApi.Places.V1.Api.Places (google_api_places v0.11.0)
View SourceAPI calls for all endpoints tagged Places
.
Summary
Functions
Returns predictions for the given input.
Get the details of a place based on its resource name, which is a string in the places/{place_id}
format.
Get a photo media with a photo reference string.
Search for places near locations.
Text query based place search.
Functions
@spec places_places_autocomplete(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Returns predictions for the given input.
Parameters
-
connection
(type:GoogleApi.Places.V1.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type: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
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesResponse{}}
on success -
{:error, info}
on failure
@spec places_places_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Get the details of a place based on its resource name, which is a string in the places/{place_id}
format.
Parameters
-
connection
(type:GoogleApi.Places.V1.Connection.t
) - Connection to server -
name
(type:String.t
) - Required. The resource name of a place, in theplaces/{place_id}
format. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type: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
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:languageCode
(type:String.t
) - Optional. Place details will be displayed with the preferred language if available. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport. -
:regionCode
(type:String.t
) - Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported. -
:sessionToken
(type:String.t
) - Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If thesession_token
parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: Use session tokens for all Place Autocomplete calls. Generate a fresh token for each session. Using a version 4 UUID is recommended. Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place{}}
on success -
{:error, info}
on failure
@spec places_places_photos_get_media( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PhotoMedia.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Get a photo media with a photo reference string.
Parameters
-
connection
(type:GoogleApi.Places.V1.Connection.t
) - Connection to server -
name
(type:String.t
) - Required. The resource name of a photo media in the format:places/{place_id}/photos/{photo_reference}/media
. The resource name of a photo as returned in a Place object'sphotos.name
field comes with the formatplaces/{place_id}/photos/{photo_reference}
. You need to append/media
at the end of the photo resource to get the photo media resource name. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type: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
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:maxHeightPx
(type:integer()
) - Optional. Specifies the maximum desired height, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned. At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned. -
:maxWidthPx
(type:integer()
) - Optional. Specifies the maximum desired width, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned. At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned. -
:skipHttpRedirect
(type:boolean()
) - Optional. If set, skip the default HTTP redirect behavior and render a text format (for example, in JSON format for HTTP use case) response. If not set, an HTTP redirect will be issued to redirect the call to the image media. This option is ignored for non-HTTP requests.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PhotoMedia{}}
on success -
{:error, info}
on failure
@spec places_places_search_nearby(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchNearbyResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Search for places near locations.
Parameters
-
connection
(type:GoogleApi.Places.V1.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type: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
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchNearbyRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchNearbyResponse{}}
on success -
{:error, info}
on failure
@spec places_places_search_text(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Text query based place search.
Parameters
-
connection
(type:GoogleApi.Places.V1.Connection.t
) - Connection to server -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type: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
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:body
(type:GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextResponse{}}
on success -
{:error, info}
on failure