This is Inside RadioTime, a website that gives Broadcasters, Developers, OEMs and Advertisers looking for the 411 on the RadioTime guide.

getMediaURI

Summary

Resolves a station or episode to a specific stream URL.

Input

Parameter Description
id An ID of the form “s123″ (for stations), or “t123″ for episodes
<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <credentials xmlns="http://www.sonos.com/Services/1.1">
      <deviceId>0A:23:32:5B:9E:DC</deviceId>
      <deviceProvider>YourProduct</deviceProvider>
    </credentials>
  </soap:Header>
  <soap:Body>
    <getMediaURI xmlns="http://www.sonos.com/Services/1.1">
      <id>s32500</id>
    </getMediaURI>
  </soap:Body>
</soap:Envelope>

Output

A single string in the element <getMediaURIResult> with the URL of the stream.

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <getMediaURIResponse xmlns="http://www.sonos.com/Services/1.1">
      <getMediaURIResult>http://opml.radiotime.com/Tune.ashx?id=s32500</getMediaURIResult>
    </getMediaURIResponse>
  </soap:Body>
</soap:Envelope>