Radio

From DriveCast Wiki

Jump to: navigation, search

GET

  URL:        https://drivecast.eu/api/1.0/radio
  Methods:    GET
  Returns:    200 OK + object containing the arrays of the recordings
              401 Unauthorized
  Formats:    json (default), xml, plist

Returns the list of the available radios

curl --user username:password "https://drivecast.eu/api/1.0/radio?apikey=ABCDEFGHILMNOPQ"

{"statuscode":"200",
"statusdesc":"OK",
"radio":[{"uid":"A=N=",
        "radio_name":"RaiRadio1",
        "country_code":"IT",
        "language_code":"IT"},
        {"uid":"j=Mg",
        "radio_name":"KossuthRadio",
        "country_code":"HU",
        "language_code":"HU"}]}
curl --user username:password "https://drivecast.eu/api/1.0/radio?fmt=xml&apikey=ABCDEFGHILMNOPQ"

<?xml version="1.0" encoding="UTF-8"?>
<statuscode>200</statuscode>
<statusdesc>OK</statusdesc>
<radio>
   <uid>A=N=</uid>
   <radio_name>RaiRadio1</radio_name>
   <country_code>IT</country_code>
   <language_code>IT</language_code>
</radio>
<radio>
   <uid>j=Mg</uid>
   <radio_name>KossuthRadio</radio_name>
   <country_code>HU</country_code>
   <language_code>HU</language_code>
</radio>
curl --user username:password "https://drivecast.eu/api/1.0/radio?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>radio</key>
   <array>
     <uid>A=N=</uid>
     <radio_name>RaiRadio1</radio_name>
     <country_code>IT</country_code>
     <language_code>IT</language_code>
     <uid>j=Mg</uid>
     <radio_name>KossuthRadio</radio_name>
     <country_code>HU</country_code>
     <language_code>HU</language_code>
   </array>
  </dict>
</plist>



GET detail

  URL:        https://drivecast.eu/api/1.0/radio/<UID>
  Methods:    GET
  Returns:    200 OK + object with the info about the item identified by the UID
              401 Unauthorized
              404 podcast 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/radio/<UID>?apikey=ABCDEFGHILMNOPQ"

{"statuscode":"200",
"statusdesc":"OK",
"radio_idname":"KossuthRadio",
"radio_fullname":"Kossuth Radio",
"country_code":"HU",
"language_code":"HU",
"timezone":"Europe/Budapest",
"homepage":"http://www.mr1-kossuth.hu/",
"schedule":"http://www.mr1-kossuth.hu/index.php?option=com_content&task=blogsection&id=4&Itemid=95&limitstart=8",
"logo":"http://drivecast.eu/ir_images/KossuthRadio.jpg",
"cloud_recordable":"yes",
"usb_recordable":"yes"}


curl --user username:password "https://drivecast.eu/api/1.0/radio/<UID>?fmt=xml&apikey=ABCDEFGHILMNOPQ"

<?xml version="1.0" encoding="UTF-8"?>
<statuscode>200</statuscode>
<statusdesc>OK</statusdesc>
<radio_idname>KossuthRadio</radio_idname>
<radio_fullname>Kossuth Radio</radio_fullname>
<country_code>HU</country_code>
<language_code>HU</language_code>
<timezone>Europe/Budapest</timezone>
<homepage>http://www.mr1-kossuth.hu/</homepage>
<schedule>http://www.mr1-kossuth.hu/index.php?option=com_content&task=blogsection&id=4&Itemid=95&limitstart=8</schedule>
<logo>http://drivecast.eu/ir_images/KossuthRadio.jpg</logo>
<cloud_recordable>yes</cloud_recordable>
<usb_recordable>yes</usb_recordable>
curl --user username:password "https://drivecast.eu/api/1.0/radio/<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>radio_idname</key>
   <string>KossuthRadio</string>
   <key>radio_fullname</key>
   <string>Kossuth Radio</string>
   <key>country_code</key>
   <string>HU</string>
   <key>language_code</key>
   <string>HU</string>
   <key>timezone</key>
   <string>Europe/Budapest</string>
   <key>homepage</key>
   <string>http://www.mr1-kossuth.hu/</string>
   <key>schedule</key>
   <string>http://www.mr1-kossuth.hu/index.php?option=com_content&task=blogsection&id=4&Itemid=95&limitstart=8</string>
   <key>logo</key>
   <string>https://drivecast.eu/ir_images/KossuthRadio.jpg</string>
   <key>cloud_recordable</key>
   <string>yes</string>
   <key>usb_recordable</key>
   <string>yes</string>
 </dict>
</plist>
Personal tools