Creek API - Version 1
Version 1 of the Creek API.
Using API paths
To access the API endpoints in this guide, just add the station's domain.
Example: GET /api/station
becomes http://xray.fm/api/station
Station
Basic information about the station itself, including its title and main stream addresses.
Request
GET /api/station
Example
{
"station_name": "BFF.fm",
"time_zone": "America\/Los_Angeles",
"streams": {
"main": {
"purpose": "main",
"url": "http:\/\/stream.bff.fm\/listen.mp3",
"format": "mp3",
"codec": "",
"bitrate": "",
"channels": "2"
},
"website": {
"purpose": "main",
"url": "http:\/\/stream.bff.fm\/listen.mp3",
"format": "mp3",
"codec": "",
"bitrate": "",
"channels": "2"
},
"archiver": {
"purpose": "main",
"url": "http:\/\/stream.bff.fm\/listen.mp3",
"format": "mp3",
"codec": "",
"bitrate": "",
"channels": "2"
},
"apps": {
"purpose": "main",
"url": "http:\/\/stream.bff.fm\/listen.mp3",
"format": "mp3",
"codec": "",
"bitrate": "",
"channels": "2"
},
"tune_in": {
"purpose": "main",
"url": "http:\/\/stream.bff.fm\/listen.mp3",
"format": "mp3",
"codec": "",
"bitrate": "",
"channels": "2"
}
}
}
Currently Broadcasting
Request
GET /api/broadcasting
Shows
All shows
Request
GET /api/shows
GET /api/shows?category=123
GET Parameters
-
category
— ID of category. -
plain_text
— Removes mark-up from the description.
Single Show
Request
GET /api/show/123
GET Parameters
-
category
— ID of category. -
plain_text
— Removes mark-up from the description.
Weekly Schedule
GET /api/schedule
Broadcasts
All Broadcasts
GET /api/broadcasts
GET /api/broadcasts?show=short-name-of-show
Parameters
-
plain_text
— Removes mark-up from the description. -
show
— ID of show.
Single Broadcast
/api/broadcast/123
-
plain_text
— Removes mark-up from the description.
Tracks
All Tracks
GET /api/tracks
Current Track
GET /api/tracks/current
Add New Track
- Adds a track to the current Broadcast.
- Or, if there is a current Show but no current Broadcast, then it will automatically create a Broadcast.
POST /api/tracks/add
GET /api/tracks/add
Parameters
Available for both GET (query string) and POST (post data).
-
key
-
title
-
artist
-
album
-
label
-
year
Problems with adding tracks?
- Check your API key.
- Make sure that there is a current show. This API will do nothing if there is no current Show.
- If your API key is a User API Key, for a single user account, then make sure that the current Show belongs to this user.
Podcasts
iTunes-compatible XML feed.
All shows
GET /podcasts
GET /podcasts.xml
Both return a podcast feed in XML format.
Single shows
GET /podcasts/short-name-of-show
GET /podcasts/short-name-of-show.xml
Both return a podcast feed in XML format.
Posts
All Posts
GET /api/posts
Parameters
-
category
— ID of category. -
plain_text
— Removes mark-up from the description.
Single Post
GET /api/post/123
Parameters
-
plain_text
— Removes mark-up from the description.