mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-25 23:21:21 +01:00
204 lines
7.1 KiB
HTML
204 lines
7.1 KiB
HTML
<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#/withdraw"></q-btn>
|
|
<q-expansion-item
|
|
group="api"
|
|
dense
|
|
expand-separator
|
|
label="List withdraw links"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code><span class="text-blue">GET</span> /withdraw/api/v1/links</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <invoice_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>[<withdraw_link_object>, ...]</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url }}withdraw/api/v1/links -H
|
|
"X-Api-Key: {{ user.wallets[0].inkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
<q-expansion-item
|
|
group="api"
|
|
dense
|
|
expand-separator
|
|
label="Get a withdraw link"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span>
|
|
/withdraw/api/v1/links/<withdraw_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <invoice_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 201 CREATED (application/json)
|
|
</h5>
|
|
<code>{"lnurl": <string>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url
|
|
}}withdraw/api/v1/links/<withdraw_id> -H "X-Api-Key: {{
|
|
user.wallets[0].inkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
<q-expansion-item
|
|
group="api"
|
|
dense
|
|
expand-separator
|
|
label="Create a withdraw link"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code><span class="text-green">POST</span> /withdraw/api/v1/links</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>
|
|
<code
|
|
>{"title": <string>, "min_withdrawable": <integer>,
|
|
"max_withdrawable": <integer>, "uses": <integer>,
|
|
"wait_time": <integer>, "is_unique": <boolean>,
|
|
"webhook_url": <string>}</code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 201 CREATED (application/json)
|
|
</h5>
|
|
<code>{"lnurl": <string>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X POST {{ request.base_url }}withdraw/api/v1/links -d
|
|
'{"title": <string>, "min_withdrawable": <integer>,
|
|
"max_withdrawable": <integer>, "uses": <integer>,
|
|
"wait_time": <integer>, "is_unique": <boolean>,
|
|
"webhook_url": <string>}' -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="Update a withdraw link"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-green">PUT</span>
|
|
/withdraw/api/v1/links/<withdraw_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>
|
|
<code
|
|
>{"title": <string>, "min_withdrawable": <integer>,
|
|
"max_withdrawable": <integer>, "uses": <integer>,
|
|
"wait_time": <integer>, "is_unique": <boolean>}</code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 200 OK (application/json)
|
|
</h5>
|
|
<code>{"lnurl": <string>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X PUT {{ request.base_url
|
|
}}withdraw/api/v1/links/<withdraw_id> -d '{"title":
|
|
<string>, "min_withdrawable": <integer>,
|
|
"max_withdrawable": <integer>, "uses": <integer>,
|
|
"wait_time": <integer>, "is_unique": <boolean>}' -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 a withdraw link"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-pink">DELETE</span>
|
|
/withdraw/api/v1/links/<withdraw_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">Returns 204 NO CONTENT</h5>
|
|
<code></code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X DELETE {{ request.base_url
|
|
}}withdraw/api/v1/links/<withdraw_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="Get hash check (for captchas to prevent milking)"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span>
|
|
/withdraw/api/v1/links/<the_hash>/<lnurl_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <invoice_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 201 CREATED (application/json)
|
|
</h5>
|
|
<code>{"status": <bool>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url
|
|
}}withdraw/api/v1/links/<the_hash>/<lnurl_id> -H
|
|
"X-Api-Key: {{ user.wallets[0].inkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
<q-expansion-item
|
|
group="api"
|
|
dense
|
|
expand-separator
|
|
label="Get image to embed"
|
|
class="q-pb-md"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span>
|
|
/withdraw/img/<lnurl_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url }}withdraw/img/<lnurl_id>"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
</q-expansion-item>
|