Feature
Migration from Version 1 to Version 2 of the API for features has a slightly different workflow.
Previously in Version 1 the following request would be made.
curl http://tv.api.press.net/v1/feature?tag=feature:nowtv-entertainment&start=2018-09-01
This request would provide you with a list of feature items available on that date.
{
"limit": 100,
"offset": 0,
"hasNext": false,
"hasPrevious": false,
"items": [
{
"id": "26c23910-220b-38fb-a306-e02a6a321f0d",
"date": "2018-09-01",
"scheduleDateTime": "2018-09-02T00:00:00+0000",
"channel": {
"id": "ea60fb3b-e672-3c38-8cb0-d8a4c8ca5fa4",
"title": "Sky Witness",
"type": "tv",
"hd": false,
"regional": false,
"media": [
{
"kind": "picture:logo",
"rendition": {
"default": {
"href": "http://tv.static.press.net/logo/p402232.png"
},
"transparent-light": {
"href": "http://tv.static.press.net/logo/p220180806122.png"
},
"transparent-dark": {
"href": "http://tv.static.press.net/logo/p120180806122.png"
}
}
}
],
"subject": [
{
"code": "channel:patv:122",
"profile": "channel"
}
]
},
"tag": [
{
"id": "service:ondemand",
"name": "OnDemand Service Feature"
},
{
"id": "feature:nowtv-entertainment",
"name": "NowTV Entertainment"
},
{
"id": "feature:monthly",
"name": "Monthly"
}
],
"asset": {
"id": "b5c89a11-02e1-3821-90a8-aa18ebd0e48c",
"title": "Nanny Dearest",
"type": "episode",
"number": 21,
"total": 24,
"relatedAsset": {
"series": {
"id": "180eedfc-d3cc-3226-972a-b2e0a710778d",
"title": "Criminal Minds",
"tag": [],
"media": [],
"subject": [
{
"code": "asset:patv:81100",
"profile": "asset"
}
]
},
"season": {
"id": "4f28e764-462b-38d7-9567-04186a94659f",
"title": "Criminal Minds Season 8",
"number": 8,
"tag": [],
"media": [],
"subject": [
{
"code": "asset:patv:24717",
"profile": "asset"
}
]
}
},
"tag": [
{
"id": "genre:detective",
"name": "Detective"
},
{
"id": "genre:thriller",
"name": "Thriller"
}
],
"summary": {
"short": "The team investigates a murderer striking on the same date each year.",
"medium": "The team investigates a murderer who has been abducting and killing childminders on the same day each year, selecting victims from parks across California.",
"long": "The team investigates a murderer who has been abducting and killing childminders on the same day each year, selecting victims from parks across California. As the dreaded anniversary nears, the BAU tracks down a hostage who escaped and may prove essential in finding the culprit."
},
"media": [
{
"kind": "picture:episode",
"copyright": "© 2012 American Broadcasting Companies, Inc. All rights reserved.",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXcrimminds8e21.jpg"
}
}
},
{
"kind": "picture:season",
"copyright": "© 2013 American Broadcasting Companies, Inc. All rights reserved.",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXCriminalMindsGroup.jpg"
}
}
},
{
"kind": "picture:series",
"copyright": "©Sky",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXcriminalmindsGroup.jpg"
}
}
}
],
"subject": [
{
"code": "asset:patv:1798733",
"profile": "asset"
}
]
}
},
{
"id": "e33453c8-8739-3219-9a12-42a7c461a82e",
"date": "2018-09-01",
"scheduleDateTime": "2018-09-01T22:05:00+0000",
"channel": {
"id": "db7e1d4b-dbc7-3990-99e7-d15251a3ce3a",
"title": "Sky One",
"type": "tv",
"hd": false,
"regional": false,
"media": [
{
"kind": "picture:logo",
"rendition": {
"default": {
"href": "http://tv.static.press.net/logo/p349605.png"
},
"transparent-light": {
"href": "http://tv.static.press.net/logo/p220171027222.png"
},
"transparent-dark": {
"href": "http://tv.static.press.net/logo/p120171027222.png"
}
}
}
],
"subject": [
{
"code": "channel:patv:222",
"profile": "channel"
}
]
},
"tag": [
{
"id": "service:ondemand",
"name": "OnDemand Service Feature"
},
{
"id": "feature:nowtv-entertainment",
"name": "NowTV Entertainment"
},
{
"id": "feature:monthly",
"name": "Monthly"
}
],
"asset": {
"id": "21324f0e-4e28-33f9-b973-393524e1c7fa",
"title": "Daley/Johnson-Thompson/Ranganathan",
"type": "episode",
"number": 7,
"total": 13,
"relatedAsset": {
"series": {
"id": "cfbc9b7b-6c82-368c-a69f-e9298f2aaf8f",
"title": "A League of Their Own",
"tag": [],
"media": [],
"subject": [
{
"code": "asset:patv:116271",
"profile": "asset"
}
]
},
"season": {
"id": "5066ed76-d3ce-3ec3-9d5f-1486f1611131",
"title": "A League of Their Own Season 9",
"number": 9,
"tag": [],
"media": [],
"subject": [
{
"code": "asset:patv:40275",
"profile": "asset"
}
]
}
},
"tag": [
{
"id": "genre:game-show",
"name": "Game Show"
},
{
"id": "genre:quiz",
"name": "Quiz"
},
{
"id": "genre:contest",
"name": "Contest"
}
],
"summary": {
"short": "With Tom Daley, Katarina Johnson-Thompson and Romesh Ranganathan.",
"medium": "Diver Tom Daley, heptathlete Katarina Johnson-Thompson and comedian Romesh Ranganathan join regulars Andrew Flintoff, Jamie Redknapp and Jack Whitehall on the comedy quiz.",
"long": "Olympic medal-winning diver Tom Daley, heptathlete Katarina Johnson-Thompson and comedian Romesh Ranganathan join regulars Andrew Flintoff, Jamie Redknapp and Jack Whitehall on the sports-based comedy quiz. James Corden asks the questions."
},
"media": [
{
"kind": "picture:episode",
"copyright": "©Justin Downing for Sky 1 30.11.14",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXleagueown97.jpg"
}
}
},
{
"kind": "picture:season",
"copyright": "©Matt Frost for Sky 1 05.12.14",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXalotos9.jpg"
}
}
},
{
"kind": "picture:series",
"copyright": "©Jack Barnes for Sky1",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXAlototrioser.jpg"
}
}
}
],
"subject": [
{
"code": "asset:patv:2156500",
"profile": "asset"
}
]
}
}
]
}
The problem with this is that there was no concept of availability range, so making a request for a monthly feature using a date in the middle of the month would not return you back any results.
In Version 2 we have changed how this works.
A list of available feature types can be found using the Feature Type Collection endpoint.
By selecting the namespace from the features you are interested in you then make a request to the Feature Collection endpoint.
This response provides you with a collection of available features including there date ranges for example, weekly or monthly.
The following example shows what the top level response object looks like.
{
"hasNext": false,
"total": 1,
"item": [
{
"id": "52f983bd-679e-5ba1-8e9e-c28ce51d601f",
"start": "2018-08-31T23:00:00.000Z",
"end": "2018-09-30T22:59:59.999Z",
"type": "monthly-now-tv-entertainment",
"selection": [...]
}
]
}
From this response you have two options either select a feature item from the list you are interested in based on the start and end date and extract the items from the selection array, or call the Feature Detail endpoint with the id of the feature you are interested in to get the single feature item.
The Feature asset item comparison to v1.
{
"id": "e33453c8-8739-3219-9a12-42a7c461a82e",
"date": "2018-09-01",
"scheduleDateTime": "2018-09-01T22:05:00+0000",
"channel": {
"title": "Sky One",
"id": "db7e1d4b-dbc7-3990-99e7-d15251a3ce3a",
"type": "tv",
"hd": false,
"regional": false,
"media": [
{
"kind": "picture:logo",
"rendition": {
"default": {
"href": "http://tv.static.press.net/logo/p349605.png"
},
"transparent-light": {
"href": "http://tv.static.press.net/logo/p220171027222.png"
},
"transparent-dark": {
"href": "http://tv.static.press.net/logo/p120171027222.png"
}
}
}
],
"subject": [
{
"code": "channel:patv:222",
"profile": "channel"
}
]
},
"asset": {
"id": "21324f0e-4e28-33f9-b973-393524e1c7fa",
"type": "episode",
"number": 7,
"title": "Daley/Johnson-Thompson/Ranganathan",
"summary": {
"short": "With Tom Daley, Katarina Johnson-Thompson and Romesh Ranganathan.",
"medium": "Diver Tom Daley, heptathlete Katarina Johnson-Thompson and comedian Romesh Ranganathan join regulars Andrew Flintoff, Jamie Redknapp and Jack Whitehall on the comedy quiz.",
"long": "Olympic medal-winning diver Tom Daley, heptathlete Katarina Johnson-Thompson and comedian Romesh Ranganathan join regulars Andrew Flintoff, Jamie Redknapp and Jack Whitehall on the sports-based comedy quiz. James Corden asks the questions."
},
"media": [
{
"kind": "picture:episode",
"copyright": "©Justin Downing for Sky 1 30.11.14",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXleagueown97.jpg"
}
}
},
{
"kind": "picture:season",
"copyright": "©Matt Frost for Sky 1 05.12.14",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXalotos9.jpg"
}
}
},
{
"kind": "picture:series",
"copyright": "©Jack Barnes for Sky1",
"expiryDate": "2018-09-22",
"rendition": {
"default": {
"href": "http://tv.static.press.net/asset/webANXAlototrioser.jpg"
}
}
}
],
"total": 13,
"relatedAsset": {
"series": {
"id": "cfbc9b7b-6c82-368c-a69f-e9298f2aaf8f",
"title": "A League of Their Own",
"tag": [],
"media": [],
"subject": [
{
"code": "asset:patv:116271",
"profile": "asset"
}
]
},
"season": {
"id": "5066ed76-d3ce-3ec3-9d5f-1486f1611131",
"title": "A League of Their Own Season 9",
"number": 9,
"tag": [],
"media": [],
"subject": [
{
"code": "asset:patv:40275",
"profile": "asset"
}
]
}
},
"tag": [
{
"id": "genre:game-show",
"name": "Game Show"
},
{
"id": "genre:quiz",
"name": "Quiz"
},
{
"id": "genre:contest",
"name": "Contest"
}
],
"subject": [
{
"code": "asset:patv:2156500",
"profile": "asset"
}
]
},
"tag": [
{
"id": "service:ondemand",
"name": "OnDemand Service Feature"
},
{
"id": "feature:nowtv-entertainment",
"name": "NowTV Entertainment"
},
{
"id": "feature:monthly",
"name": "Monthly"
}
]
}
{
"available": "2018-09-01T22:05:00.000Z",
"summary": {},
"attribute": [],
"channel": {
"title": "Sky One",
"id": "37f6c091-46bc-51f2-b7ca-d8f2a2a361e8"
},
"asset": {
"id": "a974cf13-0c7b-5199-9015-3826cda55f44",
"type": "episode",
"number": 7,
"title": "Daley/Johnson-Thompson/Ranganathan",
"certification": {},
"meta": {
"episode": "7"
},
"category": [
{
"code": "movie-drama",
"name": "Movie/Drama"
},
{
"code": "movie-drama:comedy",
"name": "Comedy",
"dvb": "1400"
}
],
"attribute": [],
"summary": {
"short": "With Tom Daley, Katarina Johnson-Thompson and Romesh Ranganathan",
"medium": "Diver Tom Daley, heptathlete Katarina Johnson-Thompson and comedian Romesh Ranganathan join regulars Andrew Flintoff, Jamie Redknapp and Jack Whitehall on the comedy quiz",
"long": "Olympic medal-winning diver Tom Daley, heptathlete Katarina Johnson-Thompson and comedian Romesh Ranganathan join regulars Andrew Flintoff, Jamie Redknapp and Jack Whitehall on the sports-based comedy quiz. James Corden asks the questions"
},
"media": [],
"related": [
{
"type": "season",
"id": "1ac02dea-567c-5102-893d-e88b539dced6",
"title": "A League of Their Own Season 9",
"number": 9,
"media": []
},
{
"type": "series",
"id": "b2fc038e-aa10-5f4b-9320-d9b9da346df3",
"title": "A League of Their Own",
"media": []
}
],
"link": [
{
"rel": "contributor",
"href": "https://tv.api.pressassociation.io/v2/asset/a974cf13-0c7b-5199-9015-3826cda55f44/contributor"
}
]
}
}
New | Previous | Description |
---|---|---|
$.available | The date time of when the asset is available for viewing. | |
$.summary | Editorial about the feature. properties: 'long' | |
$.attribute | A list of attributes for the feature item. |
Updated about 6 years ago