~hristoast/mousikofidi

ref: mousikofidi.info mousikofidi/site/api.html -rw-r--r-- 3.5 KiB
d1c22b44Hristos N. Triantafillou Clean out old info, update config reference (#139) 21 days ago
                                                                                
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<h1>
  API Documentation
</h1>

<p>
  The MousikóFídi API is a work-in-progress. Eventually, all functionality will be exposed via the API.
</p>

<div id="toc"></div>

<p>
  Examples shown using <a href="https://httpie.org/">HTTPie</a>.
</p>

<h2><code>/api/v1/metadata/:filepath</code></h2>

<p>
  Return metadata for the given track.
</p>

<pre><code>https --body "demo.mousikofidi.info/api/v1/metadata/srv/music/JaB/JaB - Web City Vol 2- Tha 7th Healer/02 - 7th%20Healer.mp3"
{
    "album": "Web City Vol. 2- Tha 7th Healer",
    "artist": "Ja.B.",
    "comment": "DatPiff.com",
    "date": null,
    "encoded_by": null,
    "genre": "Hip-Hop",
    "length": "3:35",
    "lyrics": "DatPiff",
    "title": "7th Healer",
    "title_mobile": "7th Healer",
    "track": "02",
    "tracktotal": "05"
}
</code></pre>

<h2><code>/api/v1/playlist/:name</code></h2>

<p>
  Return the contents of the given playlist.
</p>
<pre><code>https --body "demo.mousikofidi.info/api/v1/playlist/From freemusicarchive.org"
{
    "audio": [
        "srv/music/from_freemusicarchive.org/Black_Ant_-_01_-_Fater_Lee.mp3",
        "srv/music/from_freemusicarchive.org/BoxCat_Games_-_10_-_Epic_Song.mp3",
        "srv/music/from_freemusicarchive.org/Checkie_Brown_-_09_-_Mary_Roose_CB_36.mp3",
        "srv/music/from_freemusicarchive.org/Derek_Clegg_-_12_-_Annalise.mp3",
        "srv/music/from_freemusicarchive.org/Jahzzar_-_01_-_The_last_ones.mp3",
        "srv/music/from_freemusicarchive.org/Jason_Shaw_-_RUNNING_WATERS.mp3",
        "srv/music/from_freemusicarchive.org/Kai_Engel_-_04_-_Moonlight_Reprise.mp3",
        "srv/music/from_freemusicarchive.org/Latch_Swing_-_01_-_Hungaria.mp3",
        "srv/music/from_freemusicarchive.org/Lobo_Loco_-_01_-_Brain_ID_1270.mp3",
        "srv/music/from_freemusicarchive.org/Podington_Bear_-_Starling.mp3",
        "srv/music/from_freemusicarchive.org/Punk_Rock_Opera_-_14_-_1945.mp3",
        "srv/music/from_freemusicarchive.org/Quantum_Jazz_-_02_-_If_I_Cant_Dance_Its_Not_My_Revolution.mp3",
        "srv/music/from_freemusicarchive.org/Revolution_Void_-_07_-_How_Exciting.mp3",
        "srv/music/from_freemusicarchive.org/Stephan_Siebert_-_07_-_when.mp3",
        "srv/music/from_freemusicarchive.org/The_Ghost_in_Your_Piano_-_02_-_Flux.mp3",
        "srv/music/from_freemusicarchive.org/The_Kyoto_Connection_-_09_-_Hachiko_The_Faithtful_Dog.mp3",
        "srv/music/from_freemusicarchive.org/Urbano_A_Zafra_-_01_-_Danza_Filipina.mp3"
    ],
    "error": null,
    "video": []
}
</code></pre>

<h2><code>/api/v1/playlists</code></h2>

<p>
  Return all playlists.
</p>

<pre><code>https --body demo.mousikofidi.info/api/v1/playlists
[
    {
        "count": 17,
        "filename": "From freemusicarchive.org.m3u",
        "name": "From freemusicarchive.org"
    },
    {
        "count": 12,
        "filename": "JaB Mixtapes.m3u",
        "name": "JaB Mixtapes"
    },
    {
        "count": 74,
        "filename": "OC Remix: FF6 Balance And Ruin.m3u",
        "name": "OC Remix: FF6 Balance And Ruin"
    },
    {
        "count": 45,
        "filename": "OC Remix: FF7 Voices Of The Lifestream.m3u",
        "name": "OC Remix: FF7 Voices Of The Lifestream"
    },
    {
        "count": 4,
        "filename": "Public Domain Videos from utoob.m3u",
        "name": "Public Domain Videos from utoob"
    }
]
</code></pre>

<h2><code>/api/v1/queue/:cmd</code></h2>

<p>
  For saving the current queue as a file. The only command available is <code>save</code>.
</p>

<pre><code>https name="My Cool Playlist" demo.mousikofidi.info/api/v1/playlists/save
</code></pre>