-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
99 lines (60 loc) · 3.17 KB
/
README
File metadata and controls
99 lines (60 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Resolve a crid
example: http://services.notu.be/resolver
See Project Baird (spec:
http://projectbaird.com/specs/draft-mcroberts-uri-resolver.html) for an
explanation. It currently works only for BBC content, and in some cases
only for the West regional variations. It's not yet complete with
respect to the specification. You can find crids from newer versions of
MythTV (programid in the program table). They are not the same as the
crids in the BBC backstage data
Example queries using curl are below.
Limitations
* Only today's data is available
* Duration is not implemented
* BBC-related channels only
* Regional variations are for the West
* There are probably a bunch of bugs
Examples using Curl
Crids
If a url that's a crid is present, just go ahead and look up that,
resolve to /programmes version.
curl "http://services.notu.be/resolve?uri\[\]=crid://fp.bbc.co.uk/5a6s49&fmt=rdf"
if you don't set the format using the accept header or fmt=rdf it
resolves to the html version of the page, which itself is then resolved
by the /programmes site to the Episode (rather than the Version) - you
could equally use:
curl -H 'Accept: application/rdf+xml'
The same but following the redirect
curl -L "http://services.notu.be/resolve?uri\[\]=crid://fp.bbc.co.uk/5a6s49&fmt=rdf"
Result: 301, http://www.bbc.co.uk/programmes/b00tk8lm#programme
Dvb urls
If there's no crid, if there's a dvb url in the query, look up that,
resolve to programmes
These follow the format:
dvb://<original_network_id>.<transport_stream_id>.<service_id>;event_id~start-time--duration
curl "http://services.notu.be/resolve?uri\[\]=dvb://233a.1041.1041;cde9~20100825T233500Z--PT00H05M00S&fmt=rdf"
Result: 301, http://www.bbc.co.uk/programmes/b00tk8lm#programme
Host and start time
If there's no dvb url and if the host header is present and matches the
TVDNS format, and start is available as a parameter, resolve to
programmes
curl -H "Host: 3098.1041.1041.233a.dvb.tvdns.net" "http://services.notu.be/resolve?start=2010-08-26T19:00:00Z"
Similarly, a transmisisonTime can be set, including defauling to now:
curl -H "Host: 3098.1041.1041.233a.dvb.tvdns.net" "http://services.notu.be/resolve?transmissionTime="
Eventid and Serviceid
If crid, dvb urls and start are not available, but eventid and serviceid
are both present as parameters, resolve to programmes
curl "http://services.notu.be/resolve?serviceid=1041&eventid=cde9"
Result: 301, http://www.bbc.co.uk/programmes/b00tk8lm#programme
No Redirect
If you don't want it to redirect use noredirect=true as a parameter:
curl "http://services.notu.be/resolve?uri\[\]=crid://fp.bbc.co.uk/5a6s49&noredirect=true"
Programmes and Pips
These do not resolve, but just return the crid and dvb urls if
available. Note that both versions and episodes will resolve.
Example of a working version programmes url
curl "http://services.notu.be/resolve?uri\[\]=http://www.bbc.co.uk/programmes/b00tk8lm#programme"
Example of a working programme Episode url
curl "http://services.notu.be/resolve?uri\[\]=http://www.bbc.co.uk/programmes/b00tk8my#programme"
Example of a tag url
curl "http://services.notu.be/resolve?uri\[\]=tag:feeds.bbc.co.uk,2008:PIPS:b00tk8lm"