Profile: tweet

Profile Schema

A tweet document indicates an asset that represents a linked Tweet.

The tweet profile is intended to be used as a “type” profile.

Structure

A tweet document has one required attribute: tweetId. This is the ID used to identify the Tweet to Twitter’s API; the link to the Tweet itself can be constructed using this ID, as well as embeds. For more information, see Twitter’s official API documentation.

A tweet can optionally contain a userId attribute; this can be used to construct additional URLs to the Tweet itself or to the user’s profile.

A tweet can optionally contain a displaySize attribute; this defines the size the tweet should be rendered as. This is a string enum with possible values small, medium, large, or x-large. The client should choose a default value if one is not provided.

A tweet can optionally contain a shouldHideMedia attribute; this is a param passed to twitters api that defines if media should be rendered with the tweet. The client should choose a default value if one is not provided.

Example tweet document

{
  "id": "12345",
  "profiles": [
    {
      "href": "/v1/profiles/tweet",
      "rels": [
        "type"
      ]
    },
    {
      "href": "/v1/profiles/document"
    }
  ],

  "tweetId": "1425498549094133761",
  "displaySize": "small",
  "shouldHideMedia": false
}

© 2024 npr