Creates a new media item for the location.

Required Scalar Argument

  • <parent> (string)
    • The resource name of the location where this media item will be created.

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:

    profile-name: string
    profile-photo-url: string
    profile-url: string
    takedown-url: string
  create-time: string
    resource-name: string
  description: string
    height-pixels: integer
    width-pixels: integer
  google-url: string
    view-count: int64
    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=rebum.
    • The user name to attribute the media item to.
  • profile-photo-url=dolor
    • URL of the attributed user's profile photo thumbnail.
  • profile-url=lorem
    • The URL of the attributed user's Google Maps profile page.
  • takedown-url=justo

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

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

    • 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;{resource_name}?upload_type=media&#34;

      For CreateMediaItem calls, set this as the MediaItem data_ref.

  • .. description=nonumy

    • 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=58
    • Height of the media item, in pixels.
  • width-pixels=88

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

    • 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=-58

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

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

    • 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=dolore
    • The resource name for this media item. accounts/{account_id}/locations/{location_id}/media/{media_key}
  • source-url=eos
    • 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=amet. - 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 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").