The Schedule RSS feed, linked from the dashboard, provides information about a channel’s upcoming schedule in RSS (XML) format. There are a few options about how much data to have this service return.
To get the schedule for a specific channel as XML, you can pass the Channel ID, for example:
Substitute your server’s hostname, domain, or IP address for myserver. Optional parameters are show in brackets .
Examples of valid URL parameters and what they return:
Testing different feed parameters can be done with a web browser. The /xml/program_schedule_feed URL displays a basic RSS 2.0 feed of the channel schedule.
In your browser, go to http://myserver/xml/program_schedule_feed/ (substitute the hostname of your server).
The date is presented in RFC 2822 format, commonly used in email formatting. This format contains both relative time (that is, modified by time zone), and the timezone information (represented as +/- Greenwich Mean Time). The example below uses GMT -5, or Eastern Standard Time. The timezone information is placed at the end of the title string after a ” – ” separator.
In all programming languages, to get the desired date format:
PHP’s strtotime() function can read RFC2822 directly. That converts it to a Unix timestamp (seconds since the epoch). Other PHP date functions then take that timestamp directly. For example, Date takes a date format string to return just “10:00 PM” in this example string.
Here is an example RSS feed XML response:
<rss xmlns:psg=”http://192.168.41.126:80/psg_namespace/” version=”2.0″>
<description>Broadcast Channel 1</description>
<title>Ad Council – Energy Efficiency</title>
<pubDate>Thu, 07 Mar 2019 17:00:00 -0500</pubDate>
<psg:end_datetime>Thu, 07 Mar 2019 17:00:30 -0500</psg:end_datetime>
New PSAs released in 2011 encourage homeowners to save energy by taking actions around the home. The PSAs offer practical ideas for reducing household energy consumption, and saving money in the process.
Several key fields of the content metadata are made available, including the Program field (in the title element), the description, the thumbnail, and duration.
A Note on What “Title” Contains in the RSS. For each content file, if you fill in the “Program” metadata field, then “Program” is the string presented as “title” in the RSS. Otherwise, the filename is presented in the RSS. The fields Program Code, Episode, and Episode Code have no impact here. The RSS title will be “Program” or, if Program is blank, the filename.
<?xml version=”1.0″ encoding=”UTF-8″?>
<errors>There were problems with your schedule query parameters. An invalid channel was specified.</errors>