Cette api permet l'accès aux informations de la base de données MPDb.tv via des systèmes de requêtes simples et des retours dans un format facilement utilisable par vos applications. (XML uniquement pour le moment)
Vous devez disposer d'une clé API pour pouvoir utiliser la base de MPDb.tv. Cette clé ne doit en aucun cas être diffusée en clair dans votre application.
Pour en faire la demande https://forum.mpdb.tv/index.php?action=pm;sa=send;u=1
En plus de la clef API qui identifie votre application, vos utilisateurs devront être abonnés pour pouvoir accéder aux informations de la base. Afin de ne pas faire transiter en clair ces identifiants, ceux-ci seront transmis sous la forme d'un "hashcode". Aussi, pour utiliser la version sécurisée de l'api, vous remplacerez les champs B64USERNAME et SUBSCRIPTIONKEY respectivement par :
$Username = base64_encode($login);
$Password = sha1($key);
import base64
Username = base64.b64encode( "login" )
import sha Password = sha.new( "key" ).hexdigest()
l'API accepte les paramètres GET, POST soit via le chemin (path)
Paramètres GET : skey=xxx&user=xxx&apikey=xxx
Les paramètres passés en POST peuvent être encodés soit en JSON, soit au format HTML FORM (param1=val1¶m2=val2&...)
La fonction Search permet de faire une recherche sur la base.
La recherche ne décompte pas le quota et seule une affiche est proposée.
http://mpdb.tv/api/v1/search/APIKEY/B64USERNAME/SUBSCRIPTIONKEY/movies/QUERY?language=LANG&saga=MS&_format=FORMAT
<response>
<item>
<id>12701</id>
<original_title>Big Buck Bunny</original_title>
<title>Big Buck Bunny</title>
<alternative/>
<year>2008</year>
<id_allocine>145448</id_allocine>
<id_imdb>tt1254207</id_imdb>
<id_tmdb/>
<status>APPROVED</status>
<url>/movie/12701/view</url>
<posterUrl>http://mpdb.tv/artwork/movieposter/thumbnail/67196-000030-9db2d6508e70ccec2fbfa5cfbdacdd88.png</posterUrl>
</item>
<item>
<id>1201</id>
<original_title>Big House Bunny</original_title>
<title>Big House Bunny</title>
<alternative/>
<year>1950</year>
<id_allocine>172201</id_allocine>
<id_imdb>tt0042248</id_imdb>
<id_tmdb/>
<status>APPROVED</status>
<url>/movie/1201/view</url>
<posterUrl>http://mpdb.tv/img/no-poster.png</posterUrl>
</item>
</response>
La fonction Movies permet de récupérer la fiche d'un film dans la base.
http://mpdb.tv/api/v1/movies/APIKEY/B64USERNAME/SUBSCRIPTIONKEY/ID?language=LANG&typeId=TYPEID&_format=FORMAT
<response>
<id>3193</id>
<original_title>Star Wars: Clone Wars </original_title>
<runtime>0</runtime>
<budget/>
<saga_id/>
<saga_order/>
<views>2206</views>
<created_at>2016-06-22 07:01:49</created_at>
<updated>2016-06-22 07:01:49</updated>
<rating>7.7</rating>
<rating_votes>9</rating_votes>
<created_by>1</created_by>
<status>APPROVED</status>
<pendingMod>0</pendingMod>
<id_allocine>55310</id_allocine>
<id_imdb>tt0361243</id_imdb>
<id_tmdb/>
<title>Star Wars : La Guerre des Clones </title>
<tagline/>
<plot>Les événements survenus durant la Guerre des Clones, située entre les événéments de Star wars : épisode 2 - L'Attaque des clones et Star wars : épisode 3 - La Revanche des Sith.</plot>
<translations>
<item>
<language_id>en_us</language_id>
<language>Anglais (États-Unis)</language>
<title>Star Wars: Clone Wars</title>
<tagline/>
<plot/>
</item>
</translations>
<firstRelease>2003</firstRelease>
<releases>
<item>
<country_id>FR</country_id>
<country_name>France</country_name>
<country_name_en>France</country_name_en>
<year>2003</year>
<certification>U</certification>
<description>Tout public</description>
</item>
<item>
<country_id>US</country_id>
<country_name>États-Unis</country_name>
<country_name_en>United States</country_name_en>
<year/>
<certification/>
<description/>
</item>
</releases>
<countries/>
<genres>
<item>
<id>2</id>
<mediatype>movie</mediatype>
<name>Action</name>
</item>
<item>
<id>25</id>
<mediatype>movie</mediatype>
<name>Guerre</name>
</item>
<item>
<id>35</id>
<mediatype>movie</mediatype>
<name>Science-Fiction</name>
</item>
</genres>
<studios>
<item>
<id>336</id>
<name>Lucasfilm</name>
</item>
<item>
<id>1030</id>
<name>Cartoon Network</name>
</item>
<item>
<id>2619</id>
<name>Rough Draft Studios</name>
</item>
</studios>
<saga/>
<sorttitle/>
<directors>
<item>
<id>6967</id>
<name>Genndy Tartakovsky</name>
<departement_id>2</departement_id>
<departement>Réalisation</departement>
<role/>
<language_id/>
<thumb/>
</item>
</directors>
<producers>
<item>
<id>6967</id>
<name>Genndy Tartakovsky</name>
<departement_id>4</departement_id>
<departement>Production</departement>
<role/>
<language_id/>
<thumb/>
</item>
</producers>
<actors>
<item>
<id>26257</id>
<name>Cree Summer</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Luminara Unduli</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>53248</id>
<name>André Sogliuzzo</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Capitaine ARC / Droïde de Combat / Clonetrooper / Capitaine Trypho / Commandant Cody / Capitaine For</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>112504</id>
<name>Daran Morris</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Durge / Ki-Adi-Mundi / Maitre Barrek / Even Piell</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>4244</id>
<name>John Di Maggio</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Grievous / Un padawan</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>112505</id>
<name>Mat Lucas</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role/>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>53647</id>
<name>James Arnold Taylor</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role/>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>970</id>
<name>Anthony Daniels</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role/>
<language_id>fr_fr</language_id>
<thumb>http://mpdb.tv/artwork/movieartist/original/155565-000030-af67b8629cb263375effe45f71602554.jpg</thumb>
</item>
<item>
<id>27332</id>
<name>Tom Kane</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role/>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>31666</id>
<name>Terrence "T.C." Carson</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Mace Windu / Saesee Tiin (voix)</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>82560</id>
<name>Tatyana Yassukovich</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Barriss Offee (voix)</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>6842</id>
<name>Corey Burton</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>San Hill / Comte Dooku (voix)</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>60291</id>
<name>Richard McGonagle</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Kit Fisto (voix)</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>7176</id>
<name>Grey Delisle</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Padmé Amidala / Asajj Ventress / Shaak Ti (voix)</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
<item>
<id>4147</id>
<name>Kevin Michael Richardson</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>K'Kruhk (voix)</role>
<language_id>fr_fr</language_id>
<thumb>http://mpdb.tv/artwork/movieartist/original/156558-000030-e5dd9a3791cdb954954e6dd2e951947c.jpg</thumb>
</item>
<item>
<id>26834</id>
<name>Nick Jameson</name>
<departement_id>1</departement_id>
<departement>Acteurs</departement>
<role>Palpatine / Dark Sidious (voix)</role>
<language_id>fr_fr</language_id>
<thumb/>
</item>
</actors>
<posters>
<item>
<id>21799</id>
<user_id>1</user_id>
<filename>d52ef0e3178a6057ec197f641e0a8dbc.jpg</filename>
<width>347</width>
<height>500</height>
<image_type>2</image_type>
<languages/>
<rating/>
<votes>0</votes>
<type>Posters</type>
<original>http://mpdb.tv/artwork/movieposter/original/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.jpg</original>
<preview>http://mpdb.tv/artwork/movieposter/preview/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.png</preview>
<thumbnail>http://mpdb.tv/artwork/movieposter/thumbnail/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.png</thumbnail>
</item>
<item>
<id>21800</id>
<user_id>1</user_id>
<filename>5bf97222d4137067596e6edc7409c12d.jpeg</filename>
<width>400</width>
<height>600</height>
<image_type>2</image_type>
<languages/>
<rating/>
<votes>0</votes>
<type>Posters</type>
<original>http://mpdb.tv/artwork/movieposter/original/21800-2f47a5fb8019c46c065dbd46fce1a7e0.jpeg?userId=000030</original>
<preview>http://mpdb.tv/artwork/movieposter/preview/21800-000030-2f47a5fb8019c46c065dbd46fce1a7e0.png</preview>
<thumbnail>http://mpdb.tv/artwork/movieposter/thumbnail/21800-000030-2f47a5fb8019c46c065dbd46fce1a7e0.png</thumbnail>
</item>
</posters>
<fanarts/>
<discarts/>
<hdlogos/>
<hdcleararts/>
<trailers/>
</response>
{"id":3193,"original_title":"Star Wars: Clone Wars ","runtime":0,"budget":null,"saga_id":null,"saga_order":null,"views":2206,"created_at":"2016-06-22 07:01:49","updated":"2016-06-22 07:01:49","rating":7.7,"rating_votes":9,"created_by":1,"status":"APPROVED","pendingMod":0,"id_allocine":"55310","id_imdb":"tt0361243","id_tmdb":null,"title":"Star Wars : La Guerre des Clones ","tagline":null,"plot":"Les événements survenus durant la Guerre des Clones, située entre les événéments de Star wars : épisode 2 - L'Attaque des clones et Star wars : épisode 3 - La Revanche des Sith.","translations":[{"language_id":"en_us","language":"Anglais (États-Unis)","title":"Star Wars: Clone Wars","tagline":null,"plot":null}],"firstRelease":2003,"releases":[{"country_id":"FR","country_name":"France","country_name_en":"France","year":2003,"certification":"U","description":"Tout public"},{"country_id":"US","country_name":"États-Unis","country_name_en":"United States","year":null,"certification":null,"description":null}],"countries":[],"genres":[{"id":2,"mediatype":"movie","name":"Action"},{"id":25,"mediatype":"movie","name":"Guerre"},{"id":35,"mediatype":"movie","name":"Science-Fiction"}],"studios":[{"id":336,"name":"Lucasfilm"},{"id":1030,"name":"Cartoon Network"},{"id":2619,"name":"Rough Draft Studios"}],"saga":null,"sorttitle":null,"directors":[{"id":6967,"name":"Genndy Tartakovsky","departement_id":2,"departement":"Réalisation","role":null,"language_id":null,"thumb":null}],"producers":[{"id":6967,"name":"Genndy Tartakovsky","departement_id":4,"departement":"Production","role":null,"language_id":null,"thumb":null}],"actors":[{"id":26257,"name":"Cree Summer","departement_id":1,"departement":"Acteurs","role":"Luminara Unduli","language_id":"fr_fr","thumb":null},{"id":53248,"name":"André Sogliuzzo","departement_id":1,"departement":"Acteurs","role":"Capitaine ARC / Droïde de Combat / Clonetrooper / Capitaine Trypho / Commandant Cody / Capitaine For","language_id":"fr_fr","thumb":null},{"id":112504,"name":"Daran Morris","departement_id":1,"departement":"Acteurs","role":"Durge / Ki-Adi-Mundi / Maitre Barrek / Even Piell","language_id":"fr_fr","thumb":null},{"id":4244,"name":"John Di Maggio","departement_id":1,"departement":"Acteurs","role":"Grievous / Un padawan","language_id":"fr_fr","thumb":null},{"id":112505,"name":"Mat Lucas","departement_id":1,"departement":"Acteurs","role":null,"language_id":"fr_fr","thumb":null},{"id":53647,"name":"James Arnold Taylor","departement_id":1,"departement":"Acteurs","role":null,"language_id":"fr_fr","thumb":null},{"id":970,"name":"Anthony Daniels","departement_id":1,"departement":"Acteurs","role":null,"language_id":"fr_fr","thumb":"http://mpdb.tv/artwork/movieartist/original/155565-000030-af67b8629cb263375effe45f71602554.jpg"},{"id":27332,"name":"Tom Kane","departement_id":1,"departement":"Acteurs","role":null,"language_id":"fr_fr","thumb":null},{"id":31666,"name":"Terrence \"T.C.\" Carson","departement_id":1,"departement":"Acteurs","role":"Mace Windu / Saesee Tiin (voix)","language_id":"fr_fr","thumb":null},{"id":82560,"name":"Tatyana Yassukovich","departement_id":1,"departement":"Acteurs","role":"Barriss Offee (voix)","language_id":"fr_fr","thumb":null},{"id":6842,"name":"Corey Burton","departement_id":1,"departement":"Acteurs","role":"San Hill / Comte Dooku (voix)","language_id":"fr_fr","thumb":null},{"id":60291,"name":"Richard McGonagle","departement_id":1,"departement":"Acteurs","role":"Kit Fisto (voix)","language_id":"fr_fr","thumb":null},{"id":7176,"name":"Grey Delisle","departement_id":1,"departement":"Acteurs","role":"Padmé Amidala / Asajj Ventress / Shaak Ti (voix)","language_id":"fr_fr","thumb":null},{"id":4147,"name":"Kevin Michael Richardson","departement_id":1,"departement":"Acteurs","role":"K'Kruhk (voix)","language_id":"fr_fr","thumb":"http://mpdb.tv/artwork/movieartist/original/156558-000030-e5dd9a3791cdb954954e6dd2e951947c.jpg"},{"id":26834,"name":"Nick Jameson","departement_id":1,"departement":"Acteurs","role":"Palpatine / Dark Sidious (voix)","language_id":"fr_fr","thumb":null}],"posters":[{"id":21799,"user_id":1,"filename":"d52ef0e3178a6057ec197f641e0a8dbc.jpg","width":347,"height":500,"image_type":2,"languages":[],"rating":null,"votes":0,"type":"Posters","original":"http://mpdb.tv/artwork/movieposter/original/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.jpg","preview":"http://mpdb.tv/artwork/movieposter/preview/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.png","thumbnail":"http://mpdb.tv/artwork/movieposter/thumbnail/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.png"},{"id":21800,"user_id":1,"filename":"5bf97222d4137067596e6edc7409c12d.jpeg","width":400,"height":600,"image_type":2,"languages":[],"rating":null,"votes":0,"type":"Posters","original":"http://mpdb.tv/artwork/movieposter/original/21800-2f47a5fb8019c46c065dbd46fce1a7e0.jpeg?userId=000030","preview":"http://mpdb.tv/artwork/movieposter/preview/21800-000030-2f47a5fb8019c46c065dbd46fce1a7e0.png","thumbnail":"http://mpdb.tv/artwork/movieposter/thumbnail/21800-000030-2f47a5fb8019c46c065dbd46fce1a7e0.png"}],"fanarts":[],"discarts":[],"hdlogos":[],"hdcleararts":[],"trailers":[]}
La fonction Movies/NFO permet de récupérer le NFO d'un film dans la base. (standard KODI)
http://mpdb.tv/api/v1/movies/APIKEY/B64USERNAME/SUBSCRIPTIONKEY/nfo/QUERY?language=LANG&typeId=TYPEID&_format=FORMAT
<movie>
<title>Star Wars : La Guerre des Clones </title>
<originaltitle>Star Wars: Clone Wars </originaltitle>
<year>2003</year>
<tagline/>
<plot>Les événements survenus durant la Guerre des Clones, située entre les événéments de Star wars : épisode 2 - L'Attaque des clones et Star wars : épisode 3 - La Revanche des Sith.</plot>
<outline>Les événements survenus durant la Guerre des Clones, située entre les événéments de Star wars : épisode 2 - L'Attaque des clones et Star wars : épisode 3 - La Revanche des Sith.</outline>
<runtime>0</runtime>
<mpaa>France:U</mpaa>
<id>tt0361243</id>
<rating>7.7</rating>
<votes>9</votes>
<genre>Action</genre>
<genre>Guerre</genre>
<genre>Science-Fiction</genre>
<studio>Lucasfilm</studio>
<studio>Cartoon Network</studio>
<studio>Rough Draft Studios</studio>
<director>Genndy Tartakovsky</director>
<credits>Genndy Tartakovsky</credits>
<actor>
<name>Cree Summer</name>
<role>Luminara Unduli</role>
</actor>
<actor>
<name>André Sogliuzzo</name>
<role>Capitaine ARC / Droïde de Combat / Clonetrooper / Capitaine Trypho / Commandant Cody / Capitaine For</role>
</actor>
<actor>
<name>Daran Morris</name>
<role>Durge / Ki-Adi-Mundi / Maitre Barrek / Even Piell</role>
</actor>
<actor>
<name>John Di Maggio</name>
<role>Grievous / Un padawan</role>
</actor>
<actor>
<name>Mat Lucas</name>
<role/>
</actor>
<actor>
<name>James Arnold Taylor</name>
<role/>
</actor>
<actor>
<name>Anthony Daniels</name>
<role/>
<thumb>http://mpdb.tv/artwork/movieartist/original/155565-000030-af67b8629cb263375effe45f71602554.jpg</thumb>
</actor>
<actor>
<name>Tom Kane</name>
<role/>
</actor>
<actor>
<name>Terrence "T.C." Carson</name>
<role>Mace Windu / Saesee Tiin (voix)</role>
</actor>
<actor>
<name>Tatyana Yassukovich</name>
<role>Barriss Offee (voix)</role>
</actor>
<actor>
<name>Corey Burton</name>
<role>San Hill / Comte Dooku (voix)</role>
</actor>
<actor>
<name>Richard McGonagle</name>
<role>Kit Fisto (voix)</role>
</actor>
<actor>
<name>Grey Delisle</name>
<role>Padmé Amidala / Asajj Ventress / Shaak Ti (voix)</role>
</actor>
<actor>
<name>Kevin Michael Richardson</name>
<role>K'Kruhk (voix)</role>
<thumb>http://mpdb.tv/artwork/movieartist/original/156558-000030-e5dd9a3791cdb954954e6dd2e951947c.jpg</thumb>
</actor>
<actor>
<name>Nick Jameson</name>
<role>Palpatine / Dark Sidious (voix)</role>
</actor>
<thumb preview="http://mpdb.tv/artwork/movieposter/preview/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.png">http://mpdb.tv/artwork/movieposter/original/21799-000030-3bb886ff1d84d4b50dcb092b69a83839.jpg</thumb>
<thumb preview="http://mpdb.tv/artwork/movieposter/preview/21800-000030-2f47a5fb8019c46c065dbd46fce1a7e0.png">http://mpdb.tv/artwork/movieposter/original/21800-2f47a5fb8019c46c065dbd46fce1a7e0.jpeg?userId=000030</thumb>
<fanart/>
<discart/>
<hdclearart/>
<hdlogo/>
</movie>
La fonction Movies/last-update permet de récupérer la date de la dernière modification d'une fiche de film.
Cette fonction ne comptabilise pas de scrap.
http://mpdb.tv/api/v1/movies/APIKEY/B64USERNAME/SUBSCRIPTIONKEY/last-update/ID?language=LANG&typeId=TYPEID&_format=FORMAT
<response>
<id>12701</id>
<title>Big Buck Bunny</title>
<lastUpdate>2016-07-08 22:25:35</lastUpdate>
</response>
La fonction User/Info permet de récupérer des infos de base sur l'utilisateur.
http://mpdb.tv/api/v1/user/APIKEY/B64USERNAME/SUBSCRIPTIONKEY/info?_format=FORMAT
<response>
<id>48</id>
<username>BIPBIP</username>
<avatarUrl>http://mpdb.tv/img/no-avatar.jpg</avatarUrl>
<preferredLanguage>fr_fr</preferredLanguage>
<preferredCountry>FR</preferredCountry>
<displayName>BIPBIP</displayName>
<activeSubscription>
<type>ABO</type>
<title>Abonnement MPDB</title>
<dateStart>2016-07-31T15:05:00</dateStart>
<dateEnd>2017-07-31T15:05:00</dateEnd>
<totalQuota>973</totalQuota>
<baseQuota>973</baseQuota>
<moreQuota/>
<moreQuotaExpiration/>
</activeSubscription>
</response>