mx3 API documentation
Transcription
mx3 API documentation
Mx3.ch API Documentation Mx3.ch API Documentation Version 1.0 Author ! ! ! ! ! ! ! ! Sébastien Hugues Associate Director Easybox Technologies [email protected] 1 Mx3.ch API Documentation Overview!.....................................................................................................5 Encoding!....................................................................................................5 Getting started!...........................................................................................5 How to create a request!............................................................................5 Response!...................................................................................................6 Pagination!..................................................................................................6 Status codes!..............................................................................................7 Listening a single!......................................................................................7 mx3.band.get_info!.....................................................................................7 Parameters!...............................................................................................................7 Example query!.........................................................................................................7 Response!..................................................................................................................7 mx3.radio.get_info !..................................................................................10 Parameters!.............................................................................................................10 Example query!.......................................................................................................10 Response!................................................................................................................10 mx3.playlist.get_info !...............................................................................12 Parameters!.............................................................................................................12 Example query!.......................................................................................................12 Response!................................................................................................................12 mx3.band.get_comments!.......................................................................14 Parameters!.............................................................................................................14 Example query!.......................................................................................................14 Response!................................................................................................................14 mx3.radio.get_comments!.......................................................................15 ! 2 Mx3.ch API Documentation Parameters!.............................................................................................................15 Example query!.......................................................................................................15 Response!................................................................................................................16 mx3.playlist.get_comments!...................................................................16 Parameters!.............................................................................................................16 Example query!.......................................................................................................16 Response!................................................................................................................16 mx3.band.get_gigs!..................................................................................16 Parameters!.............................................................................................................16 Example query!.......................................................................................................16 Response!................................................................................................................16 mx3.band.get_videos !..............................................................................17 Parameters!.............................................................................................................17 Example query!.......................................................................................................17 Response!................................................................................................................17 mx3.band.get_playlists!...........................................................................18 Parameters!.............................................................................................................18 Example query!.......................................................................................................18 Response!................................................................................................................18 mx3.radio.get_playlists!...........................................................................19 Parameters!.............................................................................................................19 Example query!.......................................................................................................19 Response!................................................................................................................19 mx3.categories.get_list!...........................................................................19 Parameters!.............................................................................................................19 Example query!.......................................................................................................19 ! 3 Mx3.ch API Documentation Response!................................................................................................................19 mx3.band.listen!.......................................................................................20 Parameters!.............................................................................................................20 Example query!.......................................................................................................20 Response!................................................................................................................20 mx3.single.listen!......................................................................................21 Parameters!.............................................................................................................21 Example query!.......................................................................................................21 Response!................................................................................................................21 mx3.playlist.listen!....................................................................................21 Parameters!.............................................................................................................21 Example query!.......................................................................................................21 Response!................................................................................................................21 mx3.single.get_token!..............................................................................21 Parameters!.............................................................................................................21 Example query!.......................................................................................................21 Response!................................................................................................................22 mx3.single.stream!...................................................................................22 Parameters!.............................................................................................................22 Example query!.......................................................................................................22 Response!................................................................................................................22 ! 4 Mx3.ch API Documentation Overview Mx3.ch is the swiss music portal. This document describes how to automatically retrieve all available data on mx3.ch through the use of a web service (Application Programming Interface - API). Data are exchanged in XML format. This API uses the REST paradigm. Encoding Some API methods take optional or requisite parameters. Three things to keep in mind when making requests with parameters: 1. 2. 3. Parameter values should be converted to UTF-8 and URL-encoded. The page parameter begins at 1, not 0. All HTTP requests are GET requests. Getting started In order to use the Mx3 API, you must be provided with an Application Key and a Shared Key: I. II. Application Key is to authenticate your application to see if you have the rights to make API calls Shared Key is to authorize your application. This key must be kept secret To obtain these informations, ask mx3.ch. How to create a request Each request must have at least three arguments : - app_key: The application key given to you by Mx3 (e.g.: 10000) - req_sig: The MD5 string obtained by computing the hash of the string building that way: I. Let’s say you have this array of parameters [key1 => value1, key2 => value2] II. The app_key and the method parameter must be a member of this array III. Sort all parameters in alphabetical order (first letter of key in the couple key =>value) IV. Join your array to build this string : key2value2key1value V. Append your Shared Key at the beginning : 99d212g33703461af739523c8d73b162811c8919key2value2key1value1 - method : describes which method you want to execute ! 5 Mx3.ch API Documentation Example of complete request: http://www.mx3.ch/services/rest? app_key=10000&req_sig=e95e4a3adbd1493d655ce6e64e57360b&method=mx3. gigs.get_by_state&state_code=vd Response All responses are in XML format encoded in UTF-8 and have the same structure : <?xml version="1.0" encoding="UTF-8"?> <response status="Ok" code="0"> ! ! ... </response> Status can have the following values: Ok or Err. See below to know what values can have code. For instance, when an application calls this method mx3.band.get_info, you have all the band data in XML format: <?xml version="1.0" encoding="UTF-8"?> <response status="Ok" code="0"> ! <band> ! ! <city>Lausanne</city> ! ! <name>Allozane</name> ! ! <categories> ! ! ! <category>Easy listening - Film score</category> ! ! </categories> ! ! <state>Vaud</state> ! ! <permalink>/artist/allozane</permalink> ! </band> </response> Pagination Several methods (e.g.: *.get_comments) are paginated. The answer always start with this XML tag (the tag is named with the kind of class that is paginated, here itʼs comments) : <comments total-entries="0" current-page="1" per-page="10" /> Total entries is the total number of items (comments in that case). Current page is the the page number of the asked page. By default, the first page is returned. Per page is the total numbers of items (here itʼs comment) per page. ! 6 Mx3.ch API Documentation To ask a given page, just add the page parameter and the page number you want to your request. Status codes Here is the list of values status code can have: ! ! ! ! ! ! ! ! 0 = Everything is ok 1 = Method not found 2 = Object type not found 3 = Missing parameter 4 = Object not found 5 = Application key not found or invalid 6 = Bad request signature 7 = Not implemented yet Listening a single To help protection against robbery of singles, a mechanism of token has been implemented. To receive a singleʼs mp3, the client of the API must ask for a token first t h r o u g h t h e mx3.single.get_token m e t h o d , t h e n c a l l t h e m e t h o d mx3.single.stream to actually get the mp3. The token can be used only once. It becomes invalid as soon as the client starts to receive the mp3. See documentation below for further information. mx3.band.get_info Get all information on the given band. Parameters - uid (required) the id of the band you want information on Example query http://www.mx3.ch/services/rest/? method=mx3.band.get_info&app_key=623564&uid=146&req_sig=ec1165b23c 77079df1ac41de3771efc Response <response code="0" status="Ok"> <band> <address>Association brainless Case postale 53 1030 Bussigny-Lausanne Suisse</address> ! 7 Mx3.ch API Documentation <city>Lausanne</city> <country nil="true"></country> <created-at type="datetime">2006-08-28T23:12:06+02:00</ created-at> <email>[email protected]</email> <is-broadcasted type="boolean">true</is-broadcasted> <listening-count type="integer">9726</listening-count> <listening-count-last-period type="integer">51</listeningcount-last-period> <name>brainless</name> <playlists-count type="integer">0</playlists-count> <profile-views-count type="integer">11392</profile-viewscount> <singles-count type="integer">9</singles-count> <url-for-image-thumb>http://www.mx3.ch/abstract_user/image/ 0000/0146/thumb/couverture_brainless_web.jpg</url-for-image-thumb> <url-for-image-head>http://www.mx3.ch/abstract_user/image/ 0000/0146/head_band/couverture_brainless_web.jpg</url-for-imagehead> <url-for-image-list>http://www.mx3.ch/abstract_user/image/ 0000/0146/list_band/couverture_brainless_web.jpg</url-for-imagelist> <url-for-comments>http://www.mx3.ch/artist/ brainless#comments</url-for-comments> <performances type="array"> <performance> <name>Vernissage du nouvel album de brainless à la Radio Suisse Romande</name> </performance> <performance> <name>brainless in wonderland </name> </performance> </performances> <links type="array"> <link> <href>http://www.brainless.ch</href> <name>Site web</name> </link> <link> <href>http://www.myspace.com/brainlessswissfunk</href> <name>My space</name> </link> <link> <href>http://itunes.apple.com/ch/album/la-promenade-dumicocoulier-rose/id333549622</href> <name>iTunes</name> </link> </links> <biographies type="array"> ! 8 Mx3.ch API Documentation <biography> <description> BRAINLESS IN WONDERLAND On les a connus dans un funk déjanté, portés par des vibrations aussi fraîches qu'explosives. Les dix musiciens de brainless reviennent nous en mettre plein la vue avec un nouvel opus au son chaud, riche et surprenant. La magie qui émane de leurs compositions nous entraine dans un univers que le funk suisse n'avait encore jamais exploité... </description> <language-code>FR</language-code> </biography> <biography> <description>Brainless « La promenade du micocoulier rose » Neues Album einer Schweizer Funkgruppe aus der Romandie. Kraftvoll, phantasiereich, authentisch, der Funk von Brainless zeichnet sich durch seine Frische aus. </description> <language-code>DE</language-code> </biography> <biography> <description>Brainless « La promenade du micocoulier rose » This is the album debut of a main group on the Swiss French band stand. Powerful, authentic, full of amazing fun, Brainless' funk is known for his great coolness. Produced in the Studio du Flon in Lausanne, Switzerland, and mastered by Sterling sound in New York, this album proves that brainless doesn't make half-measured work. </description> <language-code>RM</language-code> </biography> </biographies> <tags type="array"> <tag> <name>brainless</name> </tag> <tag> <name>funk</name> </tag> </tags> <categories type="array"> <category> <name>Funk R&B Soul</name> ! 9 Mx3.ch API Documentation </category> </categories> <uid>146</uid> <permalink>http://www.mx3.ch/artist/brainless</permalink> <permalink-name>brainless</permalink-name> <language-code>FR</language-code> <image>http://www.mx3.ch/abstract_user/image/0000/0146/ head_band/couverture_brainless_web.jpg</image> </band> </response> mx3.radio.get_info Parameters - uid (required) the id of the radio you want information on Example query http://www.mx3.ch/services/rest/? method=mx3.radio.get_info&app_key=623564&uid=12259&req_sig=48946b1 88e286aaebf7a54e426f8509 Response <response code="0" status="Ok"> <radio> <address nil="true"></address> <city nil="true"></city> <country nil="true"></country> <created-at type="datetime">2007-05-22T02:24:36+02:00</ created-at> <email nil="true"></email> <name>Couleur3</name> <playlists-count type="integer">1</playlists-count> <profile-views-count type="integer">54234</profile-viewscount> <proposed-band-id type="integer">17509</proposed-band-id> <url-for-image-thumb>http://www.mx3.ch/abstract_user/image/ 0001/2259/thumb/Couleur3.gif</url-for-image-thumb> <url-for-image-head>http://www.mx3.ch/abstract_user/image/ 0001/2259/head_band/Couleur3.gif</url-for-image-head> <url-for-image-list>http://www.mx3.ch/abstract_user/image/ 0001/2259/list_band/Couleur3.gif</url-for-image-list> <url-for-comments>http://www.mx3.ch/radio/couleur3#comments</ url-for-comments> <links type="array"> <link> ! 10 Mx3.ch API Documentation <href>http://www.couleur3.ch</href> <name>Site web</name> </link> <link> <href>http://www.myspace.com/rsrcouleur3</href> <name>My space</name> </link> <link> <href>http://www.rsr.ch</href> <name>rsr.ch</name> </link> </links> <biographies type="array"> <biography> <description>Créée en 1982, Couleur 3 est devenue une chaîne de référence dans le paysage audiovisuel suisse et francophone. Elle a fait le choix d’un programme musical, mais aussi axé sur les enjeux de la société actuelle. l’élégance, en un mot, de l’émotion.</ description> <language-code>FR</language-code> </biography> <biography> <description>Couleur 3 besteht seit 1982 und ist heute in der französischsprachigen Radiolandschaft der Schweiz ein Begriff. Couleur 3 ist sowie von einer lockerenWorten auf Emotionen.</description> <language-code>DE</language-code> </biography> <biography> <description>Nata nel 1982, Couleur 3 è diventata la rete di riferimento nel panorama audiovisivo svizzero e francofono. Couleur 3, insomma, scommette sull’audacia, la sorpresa, e l’eleganza – in una parola, sull’emozione.</description> <language-code>IT</language-code> </biography> </biographies> <tags type="array"> <tag> <name>rock</name> </tag> <tag> <name>alternative</name> </tag> </tags> <categories type="array" /> <uid>12259</uid> ! 11 Mx3.ch API Documentation <permalink>http://www.mx3.ch/radio/couleur3</permalink> <permalink-name>couleur3</permalink-name> <language-code>FR</language-code> <image>http://www.mx3.ch/abstract_user/image/0001/2259/ head_band/Couleur3.gif</image> </radio> </response> mx3.playlist.get_info Parameters - uid (required) the id of the playlist you want information on Example query http://www.mx3.ch/services/rest/? method=mx3.playlist.get_info&app_key=623564&uid=11&req_sig=d4ba935 783faea2146db07af0c8598f Response <response code="0" status="Ok"> <playlist> <id type="integer">11</id> <name> 2 HUMANS & THE COSMOS</name> <embed-code-for-cube><object width="324" height="324"> <param name="movie" value="http://www.mx3.ch/cube/ get_swf?id=11&amp;face=song&amp;auto=1"></param> <param name="play" value=""></param> <param name="allowScriptAccess" value="always" /> <embed src="http://www.mx3.ch/cube/get_swf? id=11&amp;face=song&amp;auto=1" type="application/xshockwave-flash" width="324" height="324" allowScriptAccess="always" play="true"> </embed> </object></embed-code-for-cube> <url-for-playlist>http://www.mx3.ch/playlist/band/ 2_humans_the_cosmos/2humansthecosmos</url-for-playlist> <owner> <id type="integer">6</id> <name> 2 HUMANS & THE COSMOS</name> <user-type>band</user-type> </owner> <singles type="array"> <single> <album>can you hear my call?</album> <id type="integer">15537</id> ! 12 Mx3.ch API Documentation <label>Geska Records</label> <length type="float">320.853</length> <rating-count type="float">0.0</rating-count> <title>cold vapour smoke was coming from his mouth</title> <on-air type="boolean">true</on-air> <url-for-download nil="true"></url-for-download> <url-for-purchase>http://www.cede.ch/en/music-cd/frames/ frameset.cfm?aobj=474638</url-for-purchase> <url-for-image-thumb>http://www.mx3.ch/single/image/ 0001/5537/thumb/Cover.jpg</url-for-image-thumb> <url-for-image-head>http://www.mx3.ch/single/image/ 0001/5537/head_single/Cover.jpg</url-for-image-head> <url-for-image-list>http://www.mx3.ch/single/image/ 0001/5537/list_single/Cover.jpg</url-for-image-list> <band> <id type="integer">7457</id> <name>stendeck</name> <url-for-image-thumb>http://www.mx3.ch/abstract_user/ image/0000/7457/thumb/eye.jpg</url-for-image-thumb> <url-for-image-head>http://www.mx3.ch/abstract_user/ image/0000/7457/head_band/eye.jpg</url-for-image-head> <url-for-image-list>http://www.mx3.ch/abstract_user/ image/0000/7457/list_band/eye.jpg</url-for-image-list> <categories type="array"> <category> <id type="integer">6</id> <name>Electro trip hop - ambient</name> </category> </categories> </band> <category> <id type="integer">6</id> <name>Electro trip hop - ambient</name> </category> </single> <single> <album>Fauve</album> <id type="integer">12360</id> <label>Gentlemen records</label> <length type="float">172.993</length> <rating-count type="float">0.0</rating-count> <title>The Analyst</title> <on-air type="boolean">false</on-air> <url-for-download nil="true"></url-for-download> <url-for-purchase>http://www.fnacmusic.com/</url-forpurchase> <url-for-image-thumb>http://www.mx3.ch/single/image/ 0001/2360/thumb/fauvecover.jpg</url-for-image-thumb> ! 13 Mx3.ch API Documentation <url-for-image-head>http://www.mx3.ch/single/image/ 0001/2360/head_single/fauvecover.jpg</url-for-image-head> <url-for-image-list>http://www.mx3.ch/single/image/ 0001/2360/list_single/fauvecover.jpg</url-for-image-list> <band> <id type="integer">311</id> <name>Fauve</name> <url-for-image-thumb>http://www.mx3.ch/abstract_user/ image/0000/0311/thumb/elvis.jpg</url-for-image-thumb> <url-for-image-head>http://www.mx3.ch/abstract_user/ image/0000/0311/head_band/elvis.jpg</url-for-image-head> <url-for-image-list>http://www.mx3.ch/abstract_user/ image/0000/0311/list_band/elvis.jpg</url-for-image-list> <categories type="array"> <category> <id type="integer">46</id> <name>Pop</name> </category> </categories> </band> <category> <id type="integer">46</id> <name>Pop</name> </category> </single> </singles> </playlist> </response> mx3.band.get_comments Parameters - uid (required) the id of the band you want comments of Example query http://www.mx3.ch/services/rest/? method=mx3.band.get_comments&app_key=623564&uid=146&req_sig=658938 95a5543cd037846a2658cc10 Response <response code="0" status="Ok"> <comments total-entries="66" current-page="1" per-page="10"> <comment> <content>Hei! ! 14 Mx3.ch API Documentation On se réjouit de vous voir à l'Hacienda! Faites groover nos murs ! Colorblind - NEW ALBUM OUT NOW www.myspace.com/colorblindforever</content> <created-at type="datetime">2009-11-03T16:13:41+01:00</ created-at> <id type="integer">101373</id> <sticky type="boolean">false</sticky> <commentable> <commentable_type>Band</commentable_type> <commentable_id>146</commentable_id> </commentable> <author> <name>colorblind</name> <image>http://www.mx3.ch/abstract_user/image/0000/6990/ Cover_Anywhere_200.jpg</image> </author> </comment> <comment> <content>Excellente music et quelles voix! Au plaisir de vous retrouver sur scène prochainement. </content> <created-at type="datetime">2009-03-13T22:25:13+01:00</ created-at> <id type="integer">83839</id> <sticky type="boolean">false</sticky> <commentable> <commentable_type>Band</commentable_type> <commentable_id>146</commentable_id> </commentable> <author> <name>Twenty-one Ghosts...</name> <image>http://www.mx3.ch/abstract_user/image/0003/1192/ cool-cars-and-girls-desktop-wallpapers-2.jpg</image> </author> </comment> </comments> </response> mx3.radio.get_comments Parameters - uid (required) the id of the radio you want comments of Example query ! 15 Mx3.ch API Documentation http://www.mx3.ch/services/rest/? method=mx3.radio.get_comments&app_key=623564&uid=12259&req_sig=1cf 0d0cd66a254d7439b9de72263447 Response Same response as mx3.band.get_comments mx3.playlist.get_comments Parameters - uid (required) the id of the playlist you want comments of Example query http://www.mx3.ch/services/rest/? method=mx3.playlist.get_comments&app_key=623564&uid=11&req_sig=b36 b80873e0db71ba389b72935d1509 Response Same response as mx3.band.get_comments mx3.band.get_gigs Parameters - uid (required) the id of the band you want gigs of Example query http://www.mx3.ch/services/rest/? method=mx3.band.get_gigs&app_key=623564&uid=146&req_sig=c33db8b76f 1925a35b53fb20f77524d Response <response code="0" status="Ok"> <performances> <performance> <date type="datetime">2009-12-05T15:00:00+01:00</date> <location>FNAC Lausanne</location> <location-url>http://www.fnac.ch/rendezvous.php?shop=211</ location-url> <name>Présentation de l'album et showcase d'une heure à la FNAC Lausanne</name> ! 16 Mx3.ch API Documentation <shopping-url></shopping-url> </performance> <performance> <date type="datetime">2009-12-12T21:00:00+01:00</date> <location>Sierre</location> <location-url>http://www.funandfloor.ch/clubnight/ index.html</location-url> <name>Présentation du nouvel album en Valais à Sierre</name> <shopping-url>https://www.petzitickets.ch/ detail_evenement.php?id_evenement=13682</shopping-url> </performance> <performance> <date type="datetime">2009-12-19T21:00:00+01:00</date> <location>Montreux</location> <location-url>http://www.ned.ch/</location-url> <name>brainless in wonderland </name> <shopping-url></shopping-url> </performance> <performance> <date type="datetime">2009-12-19T21:00:00+01:00</date> <location>Montreux</location> <location-url>http://www.ned.ch/</location-url> <name>brainless in wonderland </name> <shopping-url></shopping-url> </performance> </performances> </response> mx3.band.get_videos Parameters - uid (required) the id of the band you want gigs of Example query http://www.mx3.ch/services/rest/? method=mx3.band.get_videos&app_key=623564&uid=766&req_sig=bfd922a3 7ae2a248714a87ac1c41519 Response <response code="0" status="Ok"> <videos> <video> <abstract-user-id type="integer">766</abstract-user-id> <dailymotion-uid nil="true"></dailymotion-uid> ! 17 Mx3.ch API Documentation <embed><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ cZT9N4l60rI&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/cZT9N4l60rI&hl=en&fs=1" type="application/x-shockw</embed> <id type="integer">4686</id> <name>Puppet Master at Paleo</name> <sf-uid nil="true"></sf-uid> <youtube-uid>cZT9N4l60rI&hl=en&fs=1</youtube-uid> </video> <video> <abstract-user-id type="integer">766</abstract-user-id> <dailymotion-uid nil="true"></dailymotion-uid> <embed><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ B9zPJ7oSwLk&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/B9zPJ7oSwLk&hl=en&fs=1" type="application/x-shockw</embed> <id type="integer">4834</id> <name>Hotel California at Paleo</name> <sf-uid nil="true"></sf-uid> <youtube-uid>B9zPJ7oSwLk&hl=en&fs=1</youtube-uid> </video> </videos> </response> mx3.band.get_playlists Parameters - uid (required) the id of the band you want playlists of Example query http://www.mx3.ch/services/rest/? method=mx3.band.get_playlists&app_key=623564&uid=766&req_sig=01050 84769add7b4ec26ee1762530b2 Response <response code="0" status="Ok"> <playlists> ! <playlist> ! ! Same answer as mx3.playlist.get_info ! </playlist> ! <playlist> ! 18 Mx3.ch API Documentation ! ! ! ! Same answer as mx3.playlist.get_info </playlist> ... </playlists> mx3.radio.get_playlists Parameters - uid (required) the id of the radio you want playlists of Example query http://www.mx3.ch/services/rest/? method=mx3.radio.get_playlists&app_key=623564&uid=12259&req_sig=4e 31c176e5ab9bc462b39c79003c1d Response Same response as mx3.band.get_playlists mx3.categories.get_list List all music categories available on mx3.ch Parameters None Example query http://www.mx3.ch/services/rest/? method=mx3.categories.get_lists&app_key=623564&req_sig=9a16a2f1d1f5d773ac94512 25524e85 Response <response code="0" status="Ok"> <categories> <category> <id type="integer">1</id> <name>Chanson</name> <short>Chanson</short> </category> <category> <id type="integer">6</id> ! 19 Mx3.ch API Documentation <name>Electro trip hop - ambient</name> <short>Electro</short> </category> <category> <id type="integer">11</id> <name>Folk country blues</name> <short>Folk/Country</short> </category> <category> <id type="integer">16</id> <name>Funk R&B Soul</name> <short>Funk</short> </category> <category> <id type="integer">21</id> <name>Metal Punk HxC</name> <short>Metal/Punk</short> </category> <category> <id type="integer">31</id> <name>Jazz - musiques improvisées</name> <short>Jazz</short> </category> <category> <id type="integer">36</id> <name>Reggae ragga ska dub</name> <short>Reggae</short> </category> </categories> </response> mx3.band.listen Generate a playlist with all singles of the band Parameters - uid (required) the id of the band you want to listen to Example query http://www.mx3.ch/services/rest/? method=mx3.band.listen&app_key=623564&uid=146&req_sig=027bd7c943e6 177311fcee1a4fd1763 Response Same response as mx3.playlist.get_info ! 20 Mx3.ch API Documentation mx3.single.listen Generate a playlist with only one single Parameters - uid (required) the id of the single you want to listen to Example query http://www.mx3.ch/services/rest/? method=mx3.single.listen&app_key=623564&uid=146&req_sig=027bd7c943 e61077311fcee1a4fd176 Response Same response as mx3.playlist.get_info mx3.playlist.listen Generate a playlist. Parameters - uid (required) the id of the playlist you want to listen to Example query http://www.mx3.ch/services/rest/? method=mx3.playlist.listen&app_key=623564&uid=146&req_sig=027bd7c9 43e61077311fcee1a4fd176 Response Same response as mx3.playlist.get_info mx3.single.get_token In order to listen to a single, client must ask for its token first. Parameters - uid (required) the id of the single you want the token of Example query ! 21 Mx3.ch API Documentation http://www.mx3.ch/services/rest/? method=mx3.single.get_token&app_key=623564&uid=12360&req_sig=7fc30 1ca2509cb2c35cc8a74569c7b8 Response <response code="0" status="Ok"> <token> <value>2c696e60c87de8fb981e4b79b6ce0c4</value> </token> </response> mx3.single.stream Given the token returned by mx3.single.get_token method, this method streams the singleʼs mp3 file. Parameters - token (required) the previously received token - hash (required) An MD5 has of the following string : ! “SHARED_KEY--TOKEN” where you replace SHARED_KEY and TOKEN by their value. Donʼt forget the two dash between them. Example query http://www.mx3.ch/services/rest/? req_sig=cdc819d1998ea81ac96d2c577a53380d&method=mx3.single.stream& token=2c696e60c87de8fb981e4b7d9b6c0c4&hash=33be009458897b83daaa771 8b027d4c&app_key=623564 Response The mp3ʼs file. ! 22