class Google::Apis::MirrorV1::TimelineItem
Each item in the user's timeline is represented as a TimelineItem JSON structure, described below.
Attributes
A list of media attachments associated with this item. As a convenience, you can refer to attachments in your HTML payloads with the attachment or cid scheme. For example:
-
attachment: <img src=“attachment:attachment_index”> where attachment_index
is the 0-based index of this array.
-
cid: <img src=“cid:attachment_id”> where attachment_id is the ID of the
attachment. Corresponds to the JSON property `attachments` @return [Array<Google::Apis::MirrorV1::Attachment>]
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. Corresponds to the JSON property `bundleId` @return [String]
A canonical URL pointing to the canonical/high quality version of the data represented by the timeline item. Corresponds to the JSON property `canonicalUrl` @return [String]
The time at which this item was created, formatted according to RFC 3339. Corresponds to the JSON property `created` @return [DateTime]
A person or group that can be used as a creator or a contact. Corresponds to the JSON property `creator` @return [Google::Apis::MirrorV1::Contact]
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. Corresponds to the JSON property `displayTime` @return [DateTime]
ETag for this item. Corresponds to the JSON property `etag` @return [String]
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. Corresponds to the JSON property `html` @return [String]
The ID of the timeline item. This is unique within a user's timeline. Corresponds to the JSON property `id` @return [String]
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. Corresponds to the JSON property `inReplyTo` @return [String]
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
Corresponds to the JSON property `isBundleCover` @return [Boolean]
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
Corresponds to the JSON property `isBundleCover` @return [Boolean]
When true, indicates this item is deleted, and only the ID property is set. Corresponds to the JSON property `isDeleted` @return [Boolean]
When true, indicates this item is deleted, and only the ID property is set. Corresponds to the JSON property `isDeleted` @return [Boolean]
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. Corresponds to the JSON property `isPinned` @return [Boolean]
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. Corresponds to the JSON property `isPinned` @return [Boolean]
The type of resource. This is always mirror#timelineItem. Corresponds to the JSON property `kind` @return [String]
A geographic location that can be associated with a timeline item. Corresponds to the JSON property `location` @return [Google::Apis::MirrorV1::Location]
Controls how notifications for a timeline item are presented to the user. Corresponds to the JSON property `notification` @return [Google::Apis::MirrorV1::NotificationConfig]
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. Corresponds to the JSON property `pinScore` @return [Fixnum]
A list of users or groups that this item has been shared with. Corresponds to the JSON property `recipients` @return [Array<Google::Apis::MirrorV1::Contact>]
A URL that can be used to retrieve this item. Corresponds to the JSON property `selfLink` @return [String]
Opaque string you can use to map a timeline item to data in your own service. Corresponds to the JSON property `sourceItemId` @return [String]
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. Corresponds to the JSON property `speakableText` @return [String]
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. Corresponds to the JSON property `speakableType` @return [String]
Text content of this item. Corresponds to the JSON property `text` @return [String]
The title of this item. Corresponds to the JSON property `title` @return [String]
The time at which this item was last modified, formatted according to RFC 3339. Corresponds to the JSON property `updated` @return [DateTime]
Public Class Methods
# File generated/google/apis/mirror_v1/classes.rb, line 942 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/mirror_v1/classes.rb, line 947 def update!(**args) @attachments = args[:attachments] if args.key?(:attachments) @bundle_id = args[:bundle_id] if args.key?(:bundle_id) @canonical_url = args[:canonical_url] if args.key?(:canonical_url) @created = args[:created] if args.key?(:created) @creator = args[:creator] if args.key?(:creator) @display_time = args[:display_time] if args.key?(:display_time) @etag = args[:etag] if args.key?(:etag) @html = args[:html] if args.key?(:html) @id = args[:id] if args.key?(:id) @in_reply_to = args[:in_reply_to] if args.key?(:in_reply_to) @is_bundle_cover = args[:is_bundle_cover] if args.key?(:is_bundle_cover) @is_deleted = args[:is_deleted] if args.key?(:is_deleted) @is_pinned = args[:is_pinned] if args.key?(:is_pinned) @kind = args[:kind] if args.key?(:kind) @location = args[:location] if args.key?(:location) @menu_items = args[:menu_items] if args.key?(:menu_items) @notification = args[:notification] if args.key?(:notification) @pin_score = args[:pin_score] if args.key?(:pin_score) @recipients = args[:recipients] if args.key?(:recipients) @self_link = args[:self_link] if args.key?(:self_link) @source_item_id = args[:source_item_id] if args.key?(:source_item_id) @speakable_text = args[:speakable_text] if args.key?(:speakable_text) @speakable_type = args[:speakable_type] if args.key?(:speakable_type) @text = args[:text] if args.key?(:text) @title = args[:title] if args.key?(:title) @updated = args[:updated] if args.key?(:updated) end