Places API (New) . places . photos

Instance Methods

close()

Close httplib2 connections.

getMedia(name, maxHeightPx=None, maxWidthPx=None, skipHttpRedirect=None, x__xgafv=None)

Get a photo media with a photo reference string.

Method Details

close()
Close httplib2 connections.
getMedia(name, maxHeightPx=None, maxWidthPx=None, skipHttpRedirect=None, x__xgafv=None)
Get a photo media with a photo reference string.

Args:
  name: string, 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's `photos.name` field comes with the format `places/{place_id}/photos/{photo_reference}`. You need to append `/media` at the end of the photo resource to get the photo media resource name. (required)
  maxHeightPx: 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: 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: 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.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A photo media from Places API.
  "name": "A String", # The resource name of a photo media in the format: `places/{place_id}/photos/{photo_reference}/media`.
  "photoUri": "A String", # A short-lived uri that can be used to render the photo.
}