The Atlas data model revolves around Items and Playlists. Simple.
Items represent individual pieces of content, including all the standard pieces of metadata that you’d expect. Here’s an annotated overview of the JSON returned by a request for an episode of Peep Show:
Use these attributes to identify the content, the URI is our best guess at the canonical identifier of the content, this is the only value that should be persisted as all others are liable to change.
uri: "http://www.channel4.com/programmes/peep-show/4od#2921979",
aliases: [
"http://bit.ly/28Nml"
],
curie: "c4:peep-show_2921979",
These attributes descrie the item
description: "Despite being bullied on the street..."
title: "Series 1 Episode 1",
publisher: "channel4.com",
image: "http://www.channel4.com/assets/programmes/.../625x352.jpg",
thumbnail: "http://www.channel4.com/assets/programmes/.../200x113.jpg",
genres:[
"http://www.channel4.com/programmes/tags/comedy",
"http://www.channel4.com/programmes/tags/entertainment",
"http://ref.atlasapi.org/genres/atlas/comedy",
"http://ref.atlasapi.org/genres/atlas/entertainment"
],
This Item is also an Episode, which means it is part of a Brand. These attributes outlines this Episode’s position within its Brand. If the Item is not an Episode these attributes will not be present
episode_number: 1,
series_number: 1,
brand: {
uri: "http://www.channel4.com/programmes/peep-show",
curie: "c4:peep-show",
title: "Peep Show"
},
Each location represents a way to play the content. In this example there is a simple ‘link’ location, which means you can link to this content at the URI given.
locations: [
{
"duration":1436,
"rating":"http://ref.atlasapi.org/ratings/simple/adult",
"rating_text":"Strong language",
"availability_start":"Jun 24, 2009 12:00:00 AM",
"transport_type":"link",
"uri":"http://www.channel4.com/programmes/peep-show/4od#2921979",
"available":true
}
],
Each Item contains the various different ways you can get your metaphorical hands on the media. These are called Locations and provide all the information about how to access the content, who can access it, where it is, and so on. This is an example Location (the full schema is quite large, but you get the idea):
{
duration: 28*60,
publishedDuration: 30*60,
transmissionTime: DATETIME,
available: true,
availablityStart: DATETIME,
uri: "http://link.to/the/actual/media",
embedCode: "<embed>simple html for you to embed</embed>",
transportType: "embed",
...
}
Playlists represent collections of Items and Playlists. This could be anything, from a particular Brand (say, The Wire), to a broadcaster’s top picks (like Channel 4’s), or even currently trending Playlists and Items (such as currently hot on Twitter).
Playlists, in-fact, look very similar to Items”:#items in their core attributes but differ in that Items”:#items contain the physical media Locations, while Playlists contain Items”:#items and other Playlists:
{
title: "The Item's Title",
description: "A nice description about the Item",
uri: "http://canonical.uri/of/the/playlist",
curie: "namespaced:id",
aliases: ["http://different.uris", "http://that.the/item/is/known/as"],
publisher: "broadcaster.com",
items: [...],
playlists: [....]
}