-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.html
58 lines (53 loc) · 1.78 KB
/
api.html
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
</head>
<body>
<h1>hpye: Client-Server API</h1>
<p>This is currently a non-adversarial API. hype_server may currently not
correctly handle mal-formed or erroneous messages; it is the client's
responsibility to send correct messages or risk server process crashing.
</p>
<h3>Search Queries</h3>
<ul>
<li><b><tt>search <i>query</i></b></tt></li>
<li>Returns a (stringified) json list of songid, artist, song pairs.
<ul>
<li>Example: <tt>"[['1m9n2', 'Kesha', 'Blow (some remix)'],
['3enz3', 'Ke$ha', 'Take It Off (In da club rmx)']]"</tt></li>
</ul>
</li>
</ul>
<h3>Play Song From Query Result</h3>
<ul>
<li><b><tt>play <i>songid</i></tt></b></li>
<li>Plays the song with song ID <tt>songid</tt>, forgoing the play
queue.</li>
<li>Returns "<tt>OK</tt>" if successfully parsed query and retrieving song;
"ERROR_REMOVED" if the song was removed and thus cannot be played;
"ERROR" if there was an error.</li>
</ul>
<h3>Pause / Resume Playback</h3>
<ul>
<li><b><tt>pauseresume</tt></b></li>
<li>Returns <tt>OK_PAUSED</tt> if the song was paused, or
<tt>OK_RESUMED</tt> if the song was resumed.</li>
</ul>
<h3>Quit Client</h3>
<ul>
<li><b><tt>quit</tt></b></li>
<li>Lets the server know that this client is quitting. Stops playback
and clears song queue.</li>
<li>Returns "<tt>OK</tt>".
</ul>
<!--
<h3>Play Song From Query Result</h3>
<ul>
<li><b><tt>play #<i>num</i></b></tt> (num between 0 and 19)</li>
<li>Plays the song at location <i>num</i> in the returned results list
from the prior search query.</li>
<li>Returns "<tt>OK</tt>" if successfully parsed query and retrieving song;
"ERROR" if there was an error.</li>
</ul>
-->
</body>
</html>