Updates metadata of the specified media item. This can only be used to update the Category of a media item, with the exception that the new category cannot be COVER or PROFILE.

Required Scalar Argument

  • <name> (string)
    • The name of the media item to be updated.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

MediaItem:
  attribution:
    profile-name: string
    profile-photo-url: string
    profile-url: string
    takedown-url: string
  create-time: string
  data-ref:
    resource-name: string
  description: string
  dimensions:
    height-pixels: integer
    width-pixels: integer
  google-url: string
  insights:
    view-count: int64
  location-association:
    category: string
    price-list-item-id: string
  media-format: string
  name: string
  source-url: string
  thumbnail-url: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .attribution profile-name=dolore
    • The user name to attribute the media item to.
  • profile-photo-url=amet
    • URL of the attributed user's profile photo thumbnail.
  • profile-url=ut
    • The URL of the attributed user's Google Maps profile page.
  • takedown-url=at

    • The URL of the takedown page, where the media item can be reported if it is inappropriate.
  • .. create-time=sit

    • Output only. Creation time of this media item.
  • data-ref resource-name=vero

    • The unique ID for this media item's binary data. Used to upload the photo data with [UpdateMedia] and when creating a new media item from those bytes with CreateMediaItem.

      Example of uploading bytes: curl -X POST -T{path_to_file} &#34;http://mybusiness.googleapis.com/upload/v1/media/{resource_name}?upload_type=media&#34;

      For CreateMediaItem calls, set this as the MediaItem data_ref.

  • .. description=duo

    • Description for this media item. Descriptions cannot be modified through the My Business API, but can be set when creating a new media item that is not a cover photo.
  • dimensions height-pixels=56
    • Height of the media item, in pixels.
  • width-pixels=14

    • Width of the media item, in pixels.
  • .. google-url=rebum.

    • Output only. Google-hosted URL for this media item. This URL is not static since it may change over time. For video this will be a preview image with an overlaid play icon.
  • insights view-count=-70

    • Output only. The number of times the media item has been viewed.
  • ..location-association category=kasd

    • The category that this location photo belongs to.
  • price-list-item-id=sadipscing

    • The ID of a price list item that this location photo is associated with.
  • .. media-format=tempor

    • The format of this media item. Must be set when the media item is created, and is read-only on all other requests. Cannot be updated.
  • name=sea
    • The resource name for this media item. accounts/{account_id}/locations/{location_id}/media/{media_key}
  • source-url=et
    • A publicly accessible URL where the media item can be retrieved from.

      When creating one of this or data_ref must be set to specify the source of the media item.

      If source_url was used when creating a media item, it will be populated with that source URL when the media item is retrieved.

      This field cannot be updated. * thumbnail-url=lorem - Output only. Where provided, the URL of a thumbnail image for this media item.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p update-mask=string
    • The specific fields to update. If no mask is specified, then this is treated as a full update and all editable fields are set to the values passed in.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • 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.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • 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.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").