Library
From DriveCast Wiki
GET
URL: https://drivecast.eu/api/1.0/library
Methods: GET
Returns: 200 OK + object containing the arrays of the playlists
401 Unauthorized
Formats: json (default), xml, plist
Returns the list of the UID in the library
curl --user username:password "https://drivecast.eu/api/1.0/library?apikey=ABCDEFGHILMNOPQ"
{"statuscode":"200",
"statusdesc":"OK",
"uid":["ERYTYPDLI","ERYTYPDLII","ERYTYPDLIII","ERYTYPDLIV","ERYTYPDLV","ERYTYPDLVI"]
}
curl --user username:password "https://drivecast.eu/api/1.0/library?fmt=xml&apikey=ABCDEFGHILMNOPQ" <?xml version="1.0" encoding="UTF-8"?> <statuscode>200</statuscode> <statusdesc>OK</statusdesc> <uid>ERYTYPDLI</uid> <uid>ERYTYPDLII</uid> <uid>ERYTYPDLIII</uid> <uid>ERYTYPDLIV</uid> <uid>ERYTYPDLV</uid> <uid>ERYTYPDLVI</uid>
curl --user username:password "https://drivecast.eu/api/1.0/library?fmt=plist&apikey=ABCDEFGHILMNOPQ"
<?xml version="1.0" encoding="UTF-8"?>
<plist>
<dict>
<key>statuscode</key>
<string>200</string>
<key>statusdesc</key>
<string>OK</string>
<key>uid</key>
<array>
<string>ERYTYPDLI</string>
<string>ERYTYPDLII</string>
<string>ERYTYPDLIII</string>
<string>ERYTYPDLIV</string>
<string>ERYTYPDLV</string>
<string>ERYTYPDLVI</string>
</array>
</dict>
</plist>
GET detail
URL: https://drivecast.eu/api/1.0/library/<UID>
Methods: GET
Returns: 200 OK + object with the info about the item identified by the UID
401 Unauthorized
404 UID does not exist
Formats: json (default), xml, plist
With GET detail returns the item detail as a single UID object
curl --user username:password "https://drivecast.eu/api/1.0/library/<UID>?apikey=ABCDEFGHILMNOPQ"
{"statuscode":"200",
"statusdesc":"OK",
"author":"Slager Radio",
"title":"Salger Este (29)",
"description":"Bela Szasz reserved CarCast Radio Recording",
"playlist_string":["Slager","Kossuth"],
"enclosure_url":"http://fb1.drivecast.eu/Fb00010004/03/06/MJJ05mVqrPPGkJFHW0wsoqOD5zBB/SlagerRadio-20090518190000_145.mp3",
"length":"94683264",
"type":"audio/mpeg"}
curl --user username:password "https://drivecast.eu/api/1.0/library/<UID>?fmt=xml&apikey=ABCDEFGHILMNOPQ" <?xml version="1.0" encoding="UTF-8"?> <statuscode>200</statuscode> <statusdesc>OK</statusdesc> <author>Slager Radio</author> <title>Salger Este (29)</title> <description>Bela Szasz reserved CarCast Radio Recording</description> <playlist_string>Slager</playlist_string> <playlist_string>Kossuth</playlist_string> <enclosure_url>http://fb1.drivecast.eu/Fb00010004/03/06/MJJ05mVqrPPGkJFHW0wsoqOD5zBB/SlagerRadio-20090518190000_145.mp3</enclosure_url> <length>94683264</length> <type>audio/mpeg</type>
curl --user username:password "https://drivecast.eu/api/1.0/library/<UID>?fmt=plist&apikey=ABCDEFGHILMNOPQ"
<?xml version="1.0" encoding="UTF-8"?>
<plist>
<dict>
<key>statuscode</key>
<string>200</string>
<key>statusdesc</key>
<string>OK</string>
<key>author</key>
<string>Slager Radio</string>
<key>title</key>
<string>Salger Este (29)</string>
<key>description</key>
<string>Bela Szasz reserved CarCast Radio Recording</string>
<key>playlist_string</key>
<array>
<string>Slager</string>
<string>Kossuth</string>
</array>
<key>enclosure_url</key>
<string>http://fb1.drivecast.eu/Fb00010004/03/06/MJJ05mVqrPPGkJFHW0wsoqOD5zBB/SlagerRadio-20090518190000_145.mp3</string>
<key>length</key>
<string>94683264</string>
<key>type</key>
<string>audio/mpeg</string>
</dict>
</plist>
DELETE
URL: https://drivecast.eu/api/1.0/library/<UID>
Methods: DELETE
Returns: 200 OK
401 Unauthorized
404 UID does not exist
Formats: No other data that the HTTP status code is returned
With DELETE the UID is removed
curl --user username:password -X DELETE "https://drivecast.eu/api/1.0/library/<UID>?apikey=ABCDEFGHILMNOPQ"
{"statuscode":"200",
"statusdesc":"OK"
}
curl --user username:password -X DELETE "https://drivecast.eu/api/1.0/library/<UID>?fmt=xml&apikey=ABCDEFGHILMNOPQ" <?xml version="1.0" encoding="UTF-8"?> <statuscode>200</statuscode> <statusdesc>OK</statusdesc>
curl --user username:password -X DELETE "https://drivecast.eu/api/1.0/library/<UID>?fmt=plist&apikey=ABCDEFGHILMNOPQ" <?xml version="1.0" encoding="UTF-8"?> <plist> <dict> <key>statuscode</key> <string>200</string> <key>statusdesc</key> <string>OK</string> </dict> </plist>
PUT
With PUT a UID is updated on the base of the object in the posted data
URL: https://drivecast.eu/api/1.0/library/<UID>
Methods: PUT
Returns: 200 OK + object containing the UID
401 Unauthorized
404 UID does not exist
Formats: json (default), xml, plist
curl --user username:password -X PUT -d '{"author":"Mofified Author","title":"Modified Title","description":"Modified Description"}' "https://drivecast.eu/api/1.0/library/<UID>?apikey=ABCDEFGHILMNOPQ"
{"statuscode":"200",
"statusdesc":"OK"}
curl --user username:password -X PUT -d '{"author":"Mofified Author","title":"Modified Title","description":"Modified Description"}' "https://drivecast.eu/api/1.0/library/<UID>?fmt=xml&apikey=ABCDEFGHILMNOPQ"
<?xml version="1.0" encoding="UTF-8"?>
<statuscode>200</statuscode>
<statusdesc>OK</statusdesc>
curl --user username:password -X PUT -d '{"author":"Mofified Author","title":"Modified Title","description":"Modified Description"}' "https://drivecast.eu/api/1.0/library/<UID>?fmt=plist&apikey=ABCDEFGHILMNOPQ"
<?xml version="1.0" encoding="UTF-8"?>
<plist>
<dict>
<key>statuscode</key>
<string>200</string>
<key>statusdesc</key>
<string>OK</string>
</dict>
</plist>
