Movie calls¶
We’ve just rolled out a small set of calls for movie data, principally bittorrent tracking data for a set of films and some indentifier data. Note that we only use imdb IDs for identification currently.
Available Movies¶
To retrieve a list of available films and their identifiers, simple call:
http://api.semetric.com/movie/?token=YOURAPIKEYHERE
which will return the available list of movies as a JSON dict. Here’s a small chunk:
{"response": {
"entities": [
{"class": "movie", "name": "West Side Story", "id": "imdb:tt0055614"},
{"class": "movie", "name": "Avatar", "id": "imdb:tt0499549"},
{"class": "movie", "name": "The Last Emperor", "id": "imdb:tt0093389"},
...
{"class": "movie", "name": "Die Hard Dracula", "id": "imdb:tt0162930"},
{"class": "movie", "name": "Los Ojos De Julia (Julia's Eyes)", "id": "imdb:tt1512685"}
]},
"success": true}
Tracked Torrents¶
The following call returns a list of tracked torrents for a given film:
http://api.semetric.com/movie/<movieID>/torrent/?token=YOURAPIKEYHERE
For example, the call:
$curl http://api.semetric.com/movie/imdb:tt0032976/torrent/?token=YOURAPIKEYHERE
returns the following JSON about torrents for the film Rebecca:
{"response": {
"entities": [
{"class": "torrent", "type": "DVDRip", "name": "Rebecca", "id": "rpk:14243"}
]},
"success": true}
Showing the list of known torrents (these are actually aggregates of the same type, so may represent more than one swarm) for the film. The id for each of these torrents can then be used to retrieve timeseries data.
Torrent Timeseries¶
- Torrent timeseries data is fetched in a similar manner as other timeseries data (see Artist Timeseries calls)::
- http://api.semetric.com/torrent/<torrentID>/downloads/bittorrent?token=YOURAPIKEYHERE
which returns a dense formatted timeseries showing the change in swarm size over the time the torrent has been tracked (for most examples that’s about two weeks).
- For example, to gather data about the Rebecca torrent ID’d above, call::
- $curl http://api.semetric.com/torrent/rpk:14243/downloads/bittorrent?token=YOURAPIKEYHERE
which gives something like (numbers will change...):
{"response": {
"start_time": 1306195200,
"end_time": 1306886400,
"data": [161.0, 425.0, 454.0, 440.0, 466.0, 428.0, 414.0, 459.0, 347.0],
"data_format": "dense",
"period": 86400},
"success": true}
(Details about the response fields can be found at Artist Timeseries calls)