mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-25 07:07:48 +01:00
129 lines
4.8 KiB
HTML
129 lines
4.8 KiB
HTML
<q-card-section>
|
|
To use this extension you need a Spotify client ID and client secret. You get
|
|
these by creating an app in the Spotify developers dashboard
|
|
<a
|
|
style="color: #43a047"
|
|
href="https://developer.spotify.com/dashboard/applications"
|
|
>here
|
|
</a>
|
|
<br /><br />Select the playlists you want people to be able to pay for, share
|
|
the frontend page, profit :) <br /><br />
|
|
Made by,
|
|
<a style="color: #43a047" href="https://twitter.com/arcbtc">benarc</a>.
|
|
Inspired by,
|
|
<a
|
|
style="color: #43a047"
|
|
href="https://twitter.com/pirosb3/status/1056263089128161280"
|
|
>pirosb3</a
|
|
>.
|
|
</q-card-section>
|
|
|
|
<q-expansion-item
|
|
group="extras"
|
|
icon="swap_vertical_circle"
|
|
label="API info"
|
|
:content-inset-level="0.5"
|
|
>
|
|
<q-btn flat label="Swagger API" type="a" href="../docs#/jukebox"></q-btn>
|
|
|
|
<q-expansion-item group="api" dense expand-separator label="List jukeboxes">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code><span class="text-blue">GET</span> /jukebox/api/v1/jukebox</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <admin_key>}</code><br />
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 200 OK (application/json)
|
|
</h5>
|
|
<code>[<jukebox_object>, ...]</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url }}jukebox/api/v1/jukebox -H
|
|
"X-Api-Key: {{ user.wallets[0].adminkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
<q-expansion-item group="api" dense expand-separator label="Get jukebox">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span>
|
|
/jukebox/api/v1/jukebox/<juke_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <admin_key>}</code><br />
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 200 OK (application/json)
|
|
</h5>
|
|
<code><jukebox_object></code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url
|
|
}}jukebox/api/v1/jukebox/<juke_id> -H "X-Api-Key: {{
|
|
user.wallets[0].adminkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
<q-expansion-item
|
|
group="api"
|
|
dense
|
|
expand-separator
|
|
label="Create/update track"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-green">POST/PUT</span>
|
|
/jukebox/api/v1/jukebox/</code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <admin_key>}</code><br />
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 200 OK (application/json)
|
|
</h5>
|
|
<code><jukbox_object></code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X POST {{ request.base_url }}jukebox/api/v1/jukebox/ -d
|
|
'{"user": <string, user_id>, "title": <string>,
|
|
"wallet":<string>, "sp_user": <string,
|
|
spotify_user_account>, "sp_secret": <string,
|
|
spotify_user_secret>, "sp_access_token": <string,
|
|
not_required>, "sp_refresh_token": <string, not_required>,
|
|
"sp_device": <string, spotify_user_secret>, "sp_playlists":
|
|
<string, not_required>, "price": <integer, not_required>}'
|
|
-H "Content-type: application/json" -H "X-Api-Key:
|
|
{{user.wallets[0].adminkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
<q-expansion-item group="api" dense expand-separator label="Delete jukebox">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-red">DELETE</span>
|
|
/jukebox/api/v1/jukebox/<juke_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <admin_key>}</code><br />
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 200 OK (application/json)
|
|
</h5>
|
|
<code><jukebox_object></code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X DELETE {{ request.base_url
|
|
}}jukebox/api/v1/jukebox/<juke_id> -H "X-Api-Key: {{
|
|
user.wallets[0].adminkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item></q-expansion-item
|
|
>
|