summaryrefslogtreecommitdiff
path: root/lib/web/templates/page/api.html.eex
blob: 03dfa6bea3970803cbe00f08e1cf9a91d5d4c7fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<h1>sys.115ans.net/api</h1>

<h2>Icecast Status</h2>

<h3>GET /api/icecast.json</h3>

<p>
  Content-Type: <code>application/json</code>
</p>

<pre><code>
{
  "np": String,
  "genre": null | String,
  "live": false | true
}
</pre></code>

<h3>GET /api/icecast.sse</h3>
<p>
  Content-Type: <code>text/event-stream</code>
</p>

<p>
  Stream of:
</p>

  <ul>
    <li><strong>icecast</strong> events (same format as <code>/api/icecast.json</code>)</li>
    <li><strong>ping</strong> events (to keep-alive connection. You can safely ignore them)</li>
  </ul>
<p>
  On client connection, the server sends the latest <code>icecast</code> status known.
</p>