Diamond Club Official API

Want to build an application or add additional functionality into your application.

Status API (V2)

This is a detailed API to get the information about ALL the streams and who is on what channel. It will tell you the stream ID in our system as well as the name of the stream, and new in this feature it also includes the link to the page with video (we recommend this as we may adjust the url structure in the future, this way it will always be right), as well as if the youtube video is upcoming (if official show), and the title of the youtube live or twitch video. Please if you’re making an app and a stream is on a channel but also yt_upcoming is true, it’s not really live yet, don’t tell people it’s live yet. Outputs in JSON format.

Use: http://diamondclub.tv/api/statusv2.php (no additional arguments)

Channels API (V2)

The channel API is the most popular API. Version 2 adds a lot of functionality and gives you more information about what is live now all in one quick call. It returns JSON data.

Use: http://diamondclub.tv/api/channelsv2.php (no additional arguments)

Live Stream API (Updated)

This is a newer API that is a must if you're making an app for a foreign device. This is a two part call you can request the Channel Avatar icon, or a direct link to an HTML5 friendly stream source. This was originally developed for our Roku channel but others are more than welcome to use it for their programs. UPDATE: November 18th we have rolled out more features for it. It now auto load balances and supports muffincdn features such as instant on/off with nodes.

Variables:

Variable Sample Description
c c=1 sets the channel you're looking for. Channel 0 will return DCTV 24/7 channel.
output output=true stops header redirect just returns text of location to the stream file.
q q=high sets the quality of stream. Defaults to source, options: "low" "high" "source" or empty.
i i=1 returns the image for a channel. Does NOT work for channel 0 (dctv 24/7) HD logo returns when available.

Example Uses:

http://diamondclub.tv/api/hlsredirect.php?c=1 Redirects you to the right m3u8 file for channel 1 (using header location redirect).

http://diamondclub.tv/api/hlsredirect.php?c=1&output=true Returns URL to the right m3u8 file for channel 1 (just returns the text).

http://diamondclub.tv/api/hlsredirect.php?c=1&i=1 Redirects you to the location of channel 1's avatar icon. Will return HD version if available otherwise the smaller one that is shown on the navigation bar. i=1 regardless what channel is.

This works for YouTube, Twitch, and RTMP streams.

Current Viewers API

This is an inaccurate but a low-ball number of those watching the stream. It counts all connections to our streaming server at what mount point.It does NOT count those watching HTML5 stream, it is estimated that 1 in 5 people watch the HTML5 stream.

Example Uses:

http://diamondclub.tv/api/viewers.php Shows all mounting points that have people connected.

http://diamondclub.tv/api/viewers.php?q=nightattack Shows all watching the nightattack mounting point.

©2016 Diamond Club TV | Contact Us