Class: Google::Apis::MirrorV1::TimelineItem
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::MirrorV1::TimelineItem
 
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/mirror_v1/classes.rb,
 generated/google/apis/mirror_v1/representations.rb,
 generated/google/apis/mirror_v1/representations.rb
Overview
Each item in the user's timeline is represented as a TimelineItem JSON structure, described below.
Instance Attribute Summary collapse
- 
  
    
      #attachments  ⇒ Array<Google::Apis::MirrorV1::Attachment> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A list of media attachments associated with this item. 
- 
  
    
      #bundle_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The bundle ID for this item. 
- 
  
    
      #canonical_url  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A canonical URL pointing to the canonical/high quality version of the data represented by the timeline item. 
- 
  
    
      #created  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The time at which this item was created, formatted according to RFC 3339. 
- 
  
    
      #creator  ⇒ Google::Apis::MirrorV1::Contact 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A person or group that can be used as a creator or a contact. 
- 
  
    
      #display_time  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The time that should be displayed when this item is viewed in the timeline, formatted according to RFC 3339. 
- 
  
    
      #etag  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    ETag for this item. 
- 
  
    
      #html  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    HTML content for this item. 
- 
  
    
      #id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The ID of the timeline item. 
- 
  
    
      #in_reply_to  ⇒ 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. 
- 
  
    
      #is_bundle_cover  ⇒ Boolean 
    
    
      (also: #is_bundle_cover?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    Whether this item is a bundle cover. 
- 
  
    
      #is_deleted  ⇒ Boolean 
    
    
      (also: #is_deleted?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    When true, indicates this item is deleted, and only the ID property is set. 
- 
  
    
      #is_pinned  ⇒ Boolean 
    
    
      (also: #is_pinned?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    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. 
- 
  
    
      #kind  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The type of resource. 
- 
  
    
      #location  ⇒ Google::Apis::MirrorV1::Location 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A geographic location that can be associated with a timeline item. 
- 
  
    
      #menu_items  ⇒ Array<Google::Apis::MirrorV1::MenuItem> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A list of menu items that will be presented to the user when this item is selected in the timeline. 
- 
  
    
      #notification  ⇒ Google::Apis::MirrorV1::NotificationConfig 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Controls how notifications for a timeline item are presented to the user. 
- 
  
    
      #pin_score  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    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. 
- 
  
    
      #recipients  ⇒ Array<Google::Apis::MirrorV1::Contact> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A list of users or groups that this item has been shared with. 
- 
  
    
      #self_link  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A URL that can be used to retrieve this item. 
- 
  
    
      #source_item_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Opaque string you can use to map a timeline item to data in your own service. 
- 
  
    
      #speakable_text  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The speakable version of the content of this item. 
- 
  
    
      #speakable_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    A speakable description of the type of this item. 
- 
  
    
      #text  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Text content of this item. 
- 
  
    
      #title  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The title of this item. 
- 
  
    
      #updated  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The time at which this item was last modified, formatted according to RFC 3339. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ TimelineItem 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of TimelineItem. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TimelineItem
Returns a new instance of TimelineItem
| 942 943 944 | # File 'generated/google/apis/mirror_v1/classes.rb', line 942 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#attachments ⇒ Array<Google::Apis::MirrorV1::Attachment>
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: where attachment_index is the 0-based index of this array. 
- cid: where attachment_id is the ID of the attachment. Corresponds to the JSON property attachments
| 756 757 758 | # File 'generated/google/apis/mirror_v1/classes.rb', line 756 def @attachments end | 
#bundle_id ⇒ String
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
| 762 763 764 | # File 'generated/google/apis/mirror_v1/classes.rb', line 762 def bundle_id @bundle_id end | 
#canonical_url ⇒ 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
| 768 769 770 | # File 'generated/google/apis/mirror_v1/classes.rb', line 768 def canonical_url @canonical_url end | 
#created ⇒ DateTime
The time at which this item was created, formatted according to RFC 3339.
Corresponds to the JSON property created
| 773 774 775 | # File 'generated/google/apis/mirror_v1/classes.rb', line 773 def created @created end | 
#creator ⇒ Google::Apis::MirrorV1::Contact
A person or group that can be used as a creator or a contact.
Corresponds to the JSON property creator
| 778 779 780 | # File 'generated/google/apis/mirror_v1/classes.rb', line 778 def creator @creator end | 
#display_time ⇒ DateTime
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
| 787 788 789 | # File 'generated/google/apis/mirror_v1/classes.rb', line 787 def display_time @display_time end | 
#etag ⇒ String
ETag for this item.
Corresponds to the JSON property etag
| 792 793 794 | # File 'generated/google/apis/mirror_v1/classes.rb', line 792 def etag @etag end | 
#html ⇒ 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
| 817 818 819 | # File 'generated/google/apis/mirror_v1/classes.rb', line 817 def html @html end | 
#id ⇒ String
The ID of the timeline item. This is unique within a user's timeline.
Corresponds to the JSON property id
| 822 823 824 | # File 'generated/google/apis/mirror_v1/classes.rb', line 822 def id @id end | 
#in_reply_to ⇒ 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
| 829 830 831 | # File 'generated/google/apis/mirror_v1/classes.rb', line 829 def in_reply_to @in_reply_to end | 
#is_bundle_cover ⇒ Boolean Also known as: is_bundle_cover?
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
| 842 843 844 | # File 'generated/google/apis/mirror_v1/classes.rb', line 842 def is_bundle_cover @is_bundle_cover end | 
#is_deleted ⇒ Boolean Also known as: is_deleted?
When true, indicates this item is deleted, and only the ID property is set.
Corresponds to the JSON property isDeleted
| 848 849 850 | # File 'generated/google/apis/mirror_v1/classes.rb', line 848 def is_deleted @is_deleted end | 
#is_pinned ⇒ Boolean Also known as: is_pinned?
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
| 857 858 859 | # File 'generated/google/apis/mirror_v1/classes.rb', line 857 def is_pinned @is_pinned end | 
#kind ⇒ String
The type of resource. This is always mirror#timelineItem.
Corresponds to the JSON property kind
| 863 864 865 | # File 'generated/google/apis/mirror_v1/classes.rb', line 863 def kind @kind end | 
#location ⇒ Google::Apis::MirrorV1::Location
A geographic location that can be associated with a timeline item.
Corresponds to the JSON property location
| 868 869 870 | # File 'generated/google/apis/mirror_v1/classes.rb', line 868 def location @location end | 
#menu_items ⇒ Array<Google::Apis::MirrorV1::MenuItem>
A list of menu items that will be presented to the user when this item is
selected in the timeline.
Corresponds to the JSON property menuItems
| 874 875 876 | # File 'generated/google/apis/mirror_v1/classes.rb', line 874 def @menu_items end | 
#notification ⇒ Google::Apis::MirrorV1::NotificationConfig
Controls how notifications for a timeline item are presented to the user.
Corresponds to the JSON property notification
| 879 880 881 | # File 'generated/google/apis/mirror_v1/classes.rb', line 879 def notification @notification end | 
#pin_score ⇒ Fixnum
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
| 886 887 888 | # File 'generated/google/apis/mirror_v1/classes.rb', line 886 def pin_score @pin_score end | 
#recipients ⇒ Array<Google::Apis::MirrorV1::Contact>
A list of users or groups that this item has been shared with.
Corresponds to the JSON property recipients
| 891 892 893 | # File 'generated/google/apis/mirror_v1/classes.rb', line 891 def recipients @recipients end | 
#self_link ⇒ String
A URL that can be used to retrieve this item.
Corresponds to the JSON property selfLink
| 896 897 898 | # File 'generated/google/apis/mirror_v1/classes.rb', line 896 def self_link @self_link end | 
#source_item_id ⇒ String
Opaque string you can use to map a timeline item to data in your own service.
Corresponds to the JSON property sourceItemId
| 901 902 903 | # File 'generated/google/apis/mirror_v1/classes.rb', line 901 def source_item_id @source_item_id end | 
#speakable_text ⇒ 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
| 912 913 914 | # File 'generated/google/apis/mirror_v1/classes.rb', line 912 def speakable_text @speakable_text end | 
#speakable_type ⇒ 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
| 925 926 927 | # File 'generated/google/apis/mirror_v1/classes.rb', line 925 def speakable_type @speakable_type end | 
#text ⇒ String
Text content of this item.
Corresponds to the JSON property text
| 930 931 932 | # File 'generated/google/apis/mirror_v1/classes.rb', line 930 def text @text end | 
#title ⇒ String
The title of this item.
Corresponds to the JSON property title
| 935 936 937 | # File 'generated/google/apis/mirror_v1/classes.rb', line 935 def title @title end | 
#updated ⇒ DateTime
The time at which this item was last modified, formatted according to RFC 3339.
Corresponds to the JSON property updated
| 940 941 942 | # File 'generated/google/apis/mirror_v1/classes.rb', line 940 def updated @updated end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | # 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 |