Updates a timeline item in place.

Scopes

You will need authorization for at least one of the following scopes to make a valid call:

  • https://www.googleapis.com/auth/glass.location
  • https://www.googleapis.com/auth/glass.timeline

If unset, the scope for this method defaults to https://www.googleapis.com/auth/glass.location. You can set the scope for this method like this: mirror1 --scope <scope> timeline update ...

Required Scalar Argument

  • <id> (string)
    • The ID of the timeline item.

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:

TimelineItem:
  bundle-id: string
  canonical-url: string
  created: string
  creator:
    accept-types: [string]
    display-name: string
    id: string
    image-urls: [string]
    kind: string
    phone-number: string
    priority: integer
    sharing-features: [string]
    source: string
    speakable-name: string
    type: string
  display-time: string
  etag: string
  html: string
  id: string
  in-reply-to: string
  is-bundle-cover: boolean
  is-deleted: boolean
  is-pinned: boolean
  kind: string
  location:
    accuracy: number
    address: string
    display-name: string
    id: string
    kind: string
    latitude: number
    longitude: number
    timestamp: string
  notification:
    delivery-time: string
    level: string
  pin-score: integer
  self-link: string
  source-item-id: string
  speakable-text: string
  speakable-type: string
  text: string
  title: string
  updated: 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 . bundle-id=sea
    • The bundle ID for this item. Services can specify a bundleId to group many items together. They appear under a single top-level item on the device.
  • canonical-url=et
    • A canonical URL pointing to the canonical/high quality version of the data represented by the timeline item.
  • created=at
    • The time at which this item was created, formatted according to RFC 3339.
  • creator accept-types=dolore
    • A list of MIME types that a contact supports. The contact will be shown to the user if any of its acceptTypes matches any of the types of the attachments on the item. If no acceptTypes are given, the contact will be shown for all items.
    • Each invocation of this argument appends the given value to the array.
  • display-name=eirmod
    • The name to display for this contact.
  • id=lorem
    • An ID for this contact. This is generated by the application and is treated as an opaque token.
  • image-urls=accusam
    • Set of image URLs to display for a contact. Most contacts will have a single image, but a "group" contact may include up to 8 image URLs and they will be resized and cropped into a mosaic on the client.
    • Each invocation of this argument appends the given value to the array.
  • kind=amet
    • The type of resource. This is always mirror#contact.
  • phone-number=erat
    • Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
  • priority=32
    • Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
  • sharing-features=erat
    • A list of sharing features that a contact can handle. Allowed values are:
      • ADD_CAPTION
    • Each invocation of this argument appends the given value to the array.
  • source=accusam
    • The ID of the application that created this contact. This is populated by the API
  • speakable-name=sea
    • Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
  • type=takimata

    • The type for this contact. This is used for sorting in UIs. Allowed values are:
      • INDIVIDUAL - Represents a single person. This is the default.
      • GROUP - Represents more than a single person.
  • .. display-time=lorem

    • The time that should be displayed when this item is viewed in the timeline, formatted according to RFC 3339. This user's timeline is sorted chronologically on display time, so this will also determine where the item is displayed in the timeline. If not set by the service, the display time defaults to the updated time.
  • etag=et
    • ETag for this item.
  • html=at

    • HTML content for this item. If both text and html are provided for an item, the html will be rendered in the timeline. Allowed HTML elements - You can use these elements in your timeline cards.

      • Headers: h1, h2, h3, h4, h5, h6
      • Images: img
      • Lists: li, ol, ul
      • HTML5 semantics: article, aside, details, figure, figcaption, footer, header, nav, section, summary, time
      • Structural: blockquote, br, div, hr, p, span
      • Style: b, big, center, em, i, u, s, small, strike, strong, style, sub, sup
      • Tables: table, tbody, td, tfoot, th, thead, tr
        Blocked HTML elements: These elements and their contents are removed from HTML payloads.

      • Document headers: head, title

      • Embeds: audio, embed, object, source, video
      • Frames: frame, frameset
      • Scripting: applet, script
        Other elements: Any elements that aren't listed are removed, but their contents are preserved.
      • id=dolor
        • The ID of the timeline item. This is unique within a user's timeline.
      • in-reply-to=et
        • If this item was generated as a reply to another item, this field will be set to the ID of the item being replied to. This can be used to attach a reply to the appropriate conversation or post.
      • is-bundle-cover=true
        • Whether this item is a bundle cover.

      If an item is marked as a bundle cover, it will be the entry point to the bundle of items that have the same bundleId as that item. It will be shown only on the main timeline — not within the opened bundle.

      On the main timeline, items that are shown are:
      - Items that have isBundleCover set to true
      - Items that do not have a bundleId In a bundle sub-timeline, items that are shown are:
      - Items that have the bundleId in question AND isBundleCover set to false * is-deleted=false - When true, indicates this item is deleted, and only the ID property is set. * is-pinned=true - When true, indicates this item is pinned, which means it's grouped alongside "active" items like navigation and hangouts, on the opposite side of the home screen from historical (non-pinned) timeline items. You can allow the user to toggle the value of this property with the TOGGLE_PINNED built-in menu item. * kind=et - The type of resource. This is always mirror#timelineItem. * location accuracy=0.6976549448756626 - The accuracy of the location fix in meters. * address=sea - The full address of the location. * display-name=consetetur - The name to be displayed. This may be a business name or a user-defined place, such as "Home". * id=sit - The ID of the location. * kind=aliquyam - The type of resource. This is always mirror#location. * latitude=0.5999462320813541 - The latitude, in degrees. * longitude=0.6413061576894121 - The longitude, in degrees. * timestamp=gubergren - The time at which this location was captured, formatted according to RFC 3339.

  • ..notification delivery-time=dolor

    • The time at which the notification should be delivered.
  • level=aliquyam

    • Describes how important the notification is. Allowed values are:
      • DEFAULT - Notifications of default importance. A chime will be played to alert users.
  • .. pin-score=40

    • For pinned items, this determines the order in which the item is displayed in the timeline, with a higher score appearing closer to the clock. Note: setting this field is currently not supported.
  • self-link=amet.
    • A URL that can be used to retrieve this item.
  • source-item-id=ipsum
    • Opaque string you can use to map a timeline item to data in your own service.
  • speakable-text=lorem
    • The speakable version of the content of this item. Along with the READ_ALOUD menu item, use this field to provide text that would be clearer when read aloud, or to provide extended information to what is displayed visually on Glass.

      Glassware should also specify the speakableType field, which will be spoken before this text in cases where the additional context is useful, for example when the user requests that the item be read aloud following a notification. * speakable-type=accusam - A speakable description of the type of this item. This will be announced to the user prior to reading the content of the item in cases where the additional context is useful, for example when the user requests that the item be read aloud following a notification.

      This should be a short, simple noun phrase such as "Email", "Text message", or "Daily Planet News Update".

      Glassware are encouraged to populate this field for every timeline item, even if the item does not contain speakableText or text so that the user can learn the type of the item without looking at the screen. * text=gubergren - Text content of this item. * title=sadipscing - The title of this item. * updated=at - The time at which this item was last modified, formatted according to RFC 3339.

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.

Required Upload Flags

This method supports the upload of data, which requires all of the following flags to be set:

  • -u simple
    • simple - Upload media all at once.
  • -f file
    • Path to file to upload. It must be seekable.

The following flag may be set:

  • -m mime
    • the mime type, like 'application/octet-stream', which is the default

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 alt=string

    • Data format for the response.
  • -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

    • An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
  • -p user-ip=string

    • Deprecated. Please use quotaUser instead.