API 2.0 feed

From DriveCast Wiki

Jump to: navigation, search

GET
This call returns the different user feeds about:

  • the multimedia content available (the url points to a podcast rss file)
  • the podcast subscribed (the url points to an opml file)
  • the recording criteria (the url point to a specific xml file)
   URL:        https://drivecast.eu/api/2.0/feed
               https://drivecast.eu/api/2.0/feed/<DEVICE_NAME>
               https://drivecast.eu/api/2.0/feed/<DEVICE_NAME>/<SERIAL>
   Methods:    GET
   Returns:    200 OK + object containing the URL to access the general feed or
                        the feed for the specific device
               401 Unauthorized
   Formats:    json (default), xml, plist

<DEVICE_NAME> is the device label for a device that's seen from the computer as a USB memory and it's the same string that's shown by drivecast.eu in the Device section
Where more info about the device is available, a <SERIAL> can be supplied in order to differentiate between multiple device of the same kind

The returned object returning 3 values:
 feedURL:   Url, which returns the rss feed of the user.
 opmlURL:   Url, which returns the opml list containing the users podcasts
 recsURL    Url, which retunrs an xml list containing the users recordings

To better clarify the structure of the feed object here is an example of the JSON object provided by the server:

Examples of calls using curl command from the command line:

curl --user username:password  "https://drivecast.eu/api/2.0/feed/?apikey=ABCDEFGHILMNOPQ"
 
{
  "statuscode":"200",
  "statusdesc":"OK",
  "feedURL":"http://drivecast.eu/rss/rss.php?D=DFGH",
  "opmlURL":"http://drivecast.eu/rss/podcasts.php?podcasts=DFGH",
  "recsURL":"http://drivecast.eu/rss/recordings.php?recordings=DFGH"
}
curl --user username:password "https://drivecast.eu/api/2.0/feed/?fmt=xml&apikey=ABCDEFGHILMNOPQ"

<?xml version="1.0" encoding="UTF-8"?>
<statuscode>200</statuscode>
<statusdesc>OK</statusdesc>
<feedURL>https//drivecast.eu/rss/rss.php?D=DFGH</feedURL>
<opmlURL>http://drivecast.eu/rss/podcasts.php?podcasts=DFGH</opmlURL>
<recsURL>http://drivecast.eu/rss/recordings.php?recordings=DFGH</recsURL>
curl --user username:password "https://drivecast.eu/api/2.0/feed/?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>feedURL</key>
    <string>http://drivecast.eu/rss/rss.php?D=DFGH</string>
    <key>opmlURL</key>
    <string>http://drivecast.eu/rss/podcasts.php?podcasts=DFGH</string>
    <key>recsURL</key>
    <string>http://drivecast.eu/rss/recordings.php?recordings=DFGH</string>
  </dict>
</plist>
Personal tools