Get a photo media with a photo reference string.
HTTP request
GET https://places.googleapis.com/v1/{name=places/*/photos/*/media}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Required. The resource name of a photo media in the format: The resource name of a photo as returned in a Place object's |
Query parameters
Parameters | |
---|---|
max |
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 maxHeightPx and maxWidthPx 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 maxHeightPx or maxWidthPx needs to be specified. If neither maxHeightPx nor maxWidthPx is specified, an INVALID_ARGUMENT error will be returned. |
max |
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 maxHeightPx and maxWidthPx 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 maxHeightPx or maxWidthPx needs to be specified. If neither maxHeightPx nor maxWidthPx is specified, an INVALID_ARGUMENT error will be returned. |
skip |
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. |
Request body
The request body must be empty.
Response body
A photo media from Places API.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "name": string, "photoUri": string } |
Fields | |
---|---|
name |
The resource name of a photo media in the format: |
photo |
A short-lived uri that can be used to render the photo. |