Metadata are JSON objects conforming to the TTNinjs schema. Since TTNinjs is the primary format this description show that. The description is the same for TTNewsML but the actual representation is different. Differences showed here in paranteses.
Every object is uniquely identified by the uri
property. It
has the form http://tt.se/media/<mediaType>/<id>
where mediaType
is something like text
, image
, etc., and id
is a unique string
whose format depends on the mediaType.
(NOTE: The primary purpose is to show how the uri's work. You can click on the "links" but if you can see the items depend on your rights.
Examples:
Note that while mediaType is tightly coupled with the TTNinjs type
property they are not the same thing, and differ for some types.
(In NewsML the uri is found in the guid
attribute of the item.)
The uri
property is primarily a unique resource identifier and not meant for
navigation. That said, it is still possible to use an uri
as an URL; you
will be redirected to the details page for that object on the TT website.
Since the media API is mapped to the /media
endpoint, you can also
append .json
to the uri
for a handy shortcut to fetch the metadata
of an object:
This also works with other types of content qualifiers; see the media API for details:
Renditions are binary representations of the object; .jpg, .pdf, .eps files that can be downloaded with the proper access credentials. So a ttninjs for a picture will have a number of renditions. But a text with one or more images will have the images listed in the associations part. See Associations.
Every rendition for a given object can be uniquely identified by its
variant
, usage
and mimetype
. For example, a regular image might
have the following renditions:
Normal
, Hires
, image/jpeg
)Normal
, Preview
, image/jpeg
)Watermarked
, Preview
, image/jpeg
)Normal
, Thumbnail
, image/jpeg
)While a graphics object might have similar preview and thumbnail renditions but multiple alternative hire renditions:
Normal
, Hires
, application/postscript
)Normal
, Hires
, application/pdf
)BlackAndWhite
, Hires
, application/pdf
)Normal
, Preview
, image/jpeg
)Watermarked
, Preview
, image/jpeg
)Normal
, Thumbnail
, image/jpeg
)The exact combination of renditions vary between media types, but most
objects have at least a Normal Preview
and a Normal Thumbnail
rendition.
Name | Description |
---|---|
Normal | An unmodified image or video |
Watermarked | A watermarked image, usually a Preview or Lores |
Cropped | A cropped quadratic image, usually a Thumbnail or Preview |
BlackAndWhite | A black and white vector image |
Framegrab | A video framegrab, usually a Preview |
Web |
Name | Description |
---|---|
Hires | High resolution image, or standard quality video |
Hidef | High definition video (1080p) |
Preview | Medium resoltion image, usually 1024x1024 px |
Thumbnail | Low resolution image, usually 512x512 px |
Field | Description |
---|---|
href | An URL where the binary content may be downloaded |
height | The display height of an image or video, if available |
width | The display width of an image or video, if available |
unit | The unit for width/height. Either px or mm |
bitrate | Video bitrate, if applicable |
duration | Video clip duration in seconds |
printsize | Calculated size of a 300 dpi upsampled image |
This is how the renditions section might look for a regular image
object. As the renditions
property is an object rather than an
array, each rendition has a unique numbered key prefixed with an
r
.
{
...
"renditions": {
"r00": {
"usage": "Hires",
"variant": "Normal",
"mimetype": "image/jpeg",
"href": "https://beta.tt.se/media/image/sdltdb3dffd_NormalHires.jpg",
"sizeinbytes": 2892339,
"width": 5000,
"height": 3337,
"printsize": 50055000
},
"r01": {
"usage": "Preview",
"variant": "Normal",
"mimetype": "image/jpeg",
"href": "https://beta.tt.se/media/image/sdltdb3dffd_NormalPreview.jpg",
"sizeinbytes": 190405,
"width": 1024,
"height": 683
},
"r02": {
"usage": "Preview",
"variant": "Watermark",
"mimetype": "image/jpeg",
"href": "https://beta.tt.se/media/image/sdltdb3dffd_WatermarkPreview.jpg",
"width": 1024,
"height": 683
},
"r03": {
"usage": "Thumbnail",
"variant": "Normal",
"mimetype": "image/jpeg",
"href": "https://beta.tt.se/media/image/sdltdb3dffd_NormalThumbnail.jpg",
"sizeinbytes": 18851,
"width": 256,
"height": 171
}
}
}
(In TTNewsML renditions are listed in the media
-group of the packageItem with one newsItem per object and one remoteContent for each rendition.)
TTNinjs objects may contain other associated objects. The most common example is text objects that contain images, graphic objects or videos.
Associated objects are themselves TTNinjs objects, but only a subset of the fields are used:
uri
type
representationtype
(usually incomplete
, indicating that this is
not a standalone TTNinjs object)mimetype
renditions
byline
As with renditions, the associations
property is an
object with a numeric key, prefixed with an a
. This example
association is an image with its own renditions.
{
...
"associations": {
"a001": {
"renditions": {
"r03": {
"height": 171,
"width": 256,
"sizeinbytes": 11381,
"href": "https://beta.tt.se/media/text/190308-maggiobayside-899214/a001_NormalThumbnail.jpg",
"mimetype": "image/jpeg",
"variant": "Normal",
"usage": "Thumbnail"
},
"r02": {
"height": 683,
"width": 1024,
"href": "https://beta.tt.se/media/text/190308-maggiobayside-899214/a001_WatermarkPreview.jpg",
"mimetype": "image/jpeg",
"variant": "Watermark",
"usage": "Preview"
},
"r01": {
"height": 683,
"width": 1024,
"sizeinbytes": 81999,
"href": "https://beta.tt.se/media/text/190308-maggiobayside-899214/a001_NormalPreview.jpg",
"mimetype": "image/jpeg",
"variant": "Normal",
"usage": "Preview"
},
"r00": {
"printsize": 62005248,
"height": 3712,
"width": 5568,
"sizeinbytes": 8978519,
"href": "https://beta.tt.se/media/text/190308-maggiobayside-899214/a001_NormalHires.jpg",
"mimetype": "image/jpeg",
"variant": "Normal",
"usage": "Hires"
}
},
"uri": "http://tt.se/media/image/sdltbf05f3b",
"type": "picture",
"representationtype": "incomplete",
"mimetype": "image/jpeg",
"description_text": "Veronica Maggio kommer till nystartade festivalen i Helsingborg. Arkivbild",
"byline": "Fredrik Sandberg/TT"
}
}
}
A text object may go through multiple revisions, but TT do not overwrite existing objects.
Instead, each revision gets its own unique uri
, and the revisions
property of each new object is updated.
The revisions
property is discuseed in detail here.
Other types of objects do not follow this revisions procedure. They keep their uri. Events and plannings have a version
property in TTNinjs and that version-number is incremented when changes are published. So a higher version number will alway be more relevant than any lower numbered version of the same event or planning. Images, videos etc are not marked with a version number. The latest version is the valid one.
Metadata object can have one or more body_*
fields, depending on the
media type. A body_
contains a representation of the object as a whole, or
additional type-specific details.
Field | Media type | Description |
---|---|---|
body_text |
text , feature , planning , event |
A pure text representation of the object contents with minimal formattting. |
body_html5 |
text , feature , planning , event |
HTML5 representation of the object contents. |
body_richhtml5 |
text , feature , planning , event |
Rich HTML5 representation of the object contents. |
body_event |
event |
Event details in JSON format. |
body_pages |
page |
Page details in JSON format. |
description_text
hold the first 250 characters from the text.
(In TTNewsML it can be found in the description-element with the role caption
.)
description_usage
contain editorial notes from TT to the customers for their internal use. Not to be shown to end consumers. Description_usage is deprecated from version 1.3 and will be replaced with ednote. Both will be used in parallell for some time.
(In TTNewsML this can be found in the edNote-element of itemMeta.)
The property byline, if present, have the displayable byline of the text. The bylines for each photo is located under each image association. These bylines are also in the bodytext and bodyhtml-properties. The bylines array is an array of byline objects for all persons involved in the production of the item. This data is not meant to be published.
(In TTNewsML the byline to publish is included in the html5 text. The property itself is not in a specific element. The bylines array is in a TT-namespaced byline-element extension to NewsML.)
For a complete list of metadata properties and descriptions please look in the TTNinjs ('TT News In JSON') schema
A fixture, also known as a story-tag, is a grouping metadata for many items of different kind. It is broader than the slug, but narrower than a media-topic. All items can have a fixture. An example could be the "Eurovision2020". This can be used to identify the event item and the planning item, and then identify text items being produced. The media-topic would be arts and entertainment
. And text items can have very different slug's, depending on what part of the whole Eurovision project they cover.