Creates a new local post associated with the specified location, and returns it.

Required Scalar Argument

  • <parent> (string)
    • The name of the location in which to create this local post.

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:

LocalPost:
  alert-type: string
  call-to-action:
    action-type: string
    url: string
  create-time: string
  event:
    schedule:
      end-date:
        day: integer
        month: integer
        year: integer
      end-time:
        hours: integer
        minutes: integer
        nanos: integer
        seconds: integer
      start-date:
        day: integer
        month: integer
        year: integer
      start-time:
        hours: integer
        minutes: integer
        nanos: integer
        seconds: integer
    title: string
  language-code: string
  name: string
  offer:
    coupon-code: string
    redeem-online-url: string
    terms-conditions: string
  search-url: string
  state: string
  summary: string
  topic-type: string
  update-time: 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 . alert-type=diam
    • The type of alert the post is created for. This field is only applicable for posts of topic_type Alert, and behaves as a sub-type of Alerts.
  • call-to-action action-type=est
    • The type of action that will be performed.
  • url=sit

    • The URL the user will be directed to upon clicking. This field should be left unset for Call CTA.
  • .. create-time=sed

    • Output only. Time of the creation of the post.
  • event.schedule.end-date day=26
    • Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.
  • month=45
    • Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day.
  • year=84

    • Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.
  • ..end-time hours=86

    • Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
  • minutes=82
    • Minutes of hour of day. Must be from 0 to 59.
  • nanos=76
    • Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  • seconds=33

    • Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
  • ..start-date day=91

    • Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.
  • month=27
    • Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day.
  • year=24

    • Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.
  • ..start-time hours=17

    • Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
  • minutes=61
    • Minutes of hour of day. Must be from 0 to 59.
  • nanos=50
    • Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  • seconds=78

    • Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
  • ... title=amet

    • Name of the event.
  • .. language-code=erat

    • The language of the local post.
  • name=dolores
    • Output only. Google identifier for this local post in the form: accounts/{account_id}/locations/{location_id}/localPosts/{local_post_id}
  • offer coupon-code=erat
    • Optional. Offer code that is usable in store or online.
  • redeem-online-url=accusam
    • Optional. Online link to redeem offer.
  • terms-conditions=sea

    • Optional. Offer terms and conditions.
  • .. search-url=takimata

    • Output only. The link to the local post in Google search. This link can be used to share the post via social media, email, text, etc.
  • state=lorem
    • Output only. The state of the post, indicating what part of its lifecycle it is in.
  • summary=et
    • Description/body of the local post.
  • topic-type=at
    • Required. The topic type of the post: standard, event, offer, or alert.
  • update-time=dolor
    • Output only. Time of the last modification of the post made by the user.

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").