4

Both text and html fields of a timeline item render the content of a timeline card. What happens if I populate both timelineItem.text and timelineItem.html fields?

e.g.

POST /mirror/v1/timeline HTTP/1.1
Host: www.googleapis.com
Authorization: Bearer {auth token}
Content-Type: application/json
Content-Length: 26

{ "text": "Hello world",
"html": "I am a kitty" }
J Wang
  • 2,075
  • 1
  • 20
  • 26

1 Answers1

7

Your value for timelineItem.html will trump the value supplied for timelineItem.text.

This is explained in more detail in the timelineItem resource reference documentation:

If both text and html are provided for an item, the html will be rendered in the timeline.

mimming
  • 13,974
  • 3
  • 45
  • 74
  • This makes sense. However, I created a timeline item with both fields populated and I noticed that when I shared this timeline item on Google+, Google+ took the text rather than the html. – J Wang Jun 19 '13 at 01:11
  • 2
    Ahh, now I understand why you asked. That's a bit more complicated. When a timeline card is shared, the receiving Glassware has access to all fields on the item. It's up to that Glassware (in this case G+) to decide what fields it wants to use and how. In this case it sounds like the G+ Glassware is behaving unexpectedly, but it does illustrate why it is important for both values to have the same meaning (if you decide to supply both). – mimming Jun 19 '13 at 01:14