correct api instructions and add readme
This commit is contained in:
parent
73b8bd682c
commit
6b66ca1531
1 changed files with 39 additions and 38 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
label="API info"
|
label="API info"
|
||||||
:content-inset-level="0.5"
|
:content-inset-level="0.5"
|
||||||
>
|
>
|
||||||
<q-expansion-item group="api" dense expand-separator label="List pay links">
|
<q-expansion-item group="api" dense expand-separator label="List scrubs">
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<code><span class="text-blue">GET</span> /scrub/api/v1/links</code>
|
<code><span class="text-blue">GET</span> /scrub/api/v1/links</code>
|
||||||
|
|
@ -17,40 +17,38 @@
|
||||||
<code>[<pay_link_object>, ...]</code>
|
<code>[<pay_link_object>, ...]</code>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
<code
|
<code
|
||||||
>curl -X GET {{ request.base_url }}api/v1/links -H "X-Api-Key: {{
|
>curl -X GET {{ request.base_url }}scrub/api/v1/links?all_wallets=true
|
||||||
user.wallets[0].inkey }}"
|
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
|
||||||
</code>
|
</code>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
<q-expansion-item group="api" dense expand-separator label="Get a pay link">
|
<q-expansion-item group="api" dense expand-separator label="Get a scrub">
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<code
|
<code
|
||||||
><span class="text-blue">GET</span>
|
><span class="text-blue">GET</span>
|
||||||
/scrub/api/v1/links/<pay_id></code
|
/scrub/api/v1/links/<scrub_id></code
|
||||||
>
|
>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
||||||
<code>{"X-Api-Key": <invoice_key>}</code><br />
|
<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">Body (application/json)</h5>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
||||||
Returns 201 CREATED (application/json)
|
Returns 200 OK (application/json)
|
||||||
</h5>
|
</h5>
|
||||||
<code>{"lnurl": <string>}</code>
|
<code
|
||||||
|
>{"id": <string>, "wallet": <string>, "description":
|
||||||
|
<string>, "payoraddress": <string>}</code
|
||||||
|
>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
<code
|
<code
|
||||||
>curl -X GET {{ request.base_url }}api/v1/links/<pay_id> -H
|
>curl -X GET {{ request.base_url }}scrub/api/v1/links/<pay_id>
|
||||||
"X-Api-Key: {{ user.wallets[0].inkey }}"
|
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
|
||||||
</code>
|
</code>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
<q-expansion-item
|
<q-expansion-item group="api" dense expand-separator label="Create a scrub">
|
||||||
group="api"
|
|
||||||
dense
|
|
||||||
expand-separator
|
|
||||||
label="Create a pay link"
|
|
||||||
>
|
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<code><span class="text-green">POST</span> /scrub/api/v1/links</code>
|
<code><span class="text-green">POST</span> /scrub/api/v1/links</code>
|
||||||
|
|
@ -58,31 +56,27 @@
|
||||||
<code>{"X-Api-Key": <admin_key>}</code><br />
|
<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">Body (application/json)</h5>
|
||||||
<code
|
<code
|
||||||
>{"description": <string> "amount": <integer> "max":
|
>{"wallet": <string>, "description": <string>,
|
||||||
<integer> "min": <integer> "comment_chars":
|
"payoraddress": <string>}</code
|
||||||
<integer>}</code
|
|
||||||
>
|
>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
||||||
Returns 201 CREATED (application/json)
|
Returns 201 CREATED (application/json)
|
||||||
</h5>
|
</h5>
|
||||||
<code>{"lnurl": <string>}</code>
|
<code
|
||||||
|
>{"id": <string>, "wallet": <string>, "description":
|
||||||
|
<string>, "payoraddress": <string>}</code
|
||||||
|
>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
<code
|
<code
|
||||||
>curl -X POST {{ request.base_url }}api/v1/links -d '{"description":
|
>curl -X POST {{ request.base_url }}scrub/api/v1/links -d '{"wallet":
|
||||||
<string>, "amount": <integer>, "max": <integer>,
|
<string>, "description": <string>, "payoraddress":
|
||||||
"min": <integer>, "comment_chars": <integer>}' -H
|
<string>}' -H "Content-type: application/json" -H "X-Api-Key: {{
|
||||||
"Content-type: application/json" -H "X-Api-Key: {{
|
|
||||||
user.wallets[0].adminkey }}"
|
user.wallets[0].adminkey }}"
|
||||||
</code>
|
</code>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
<q-expansion-item
|
<q-expansion-item group="api" dense expand-separator label="Update a scrub">
|
||||||
group="api"
|
|
||||||
dense
|
|
||||||
expand-separator
|
|
||||||
label="Update a pay link"
|
|
||||||
>
|
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<code
|
<code
|
||||||
|
|
@ -92,17 +86,23 @@
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
||||||
<code>{"X-Api-Key": <admin_key>}</code><br />
|
<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">Body (application/json)</h5>
|
||||||
<code>{"description": <string>, "amount": <integer>}</code>
|
<code
|
||||||
|
>{"wallet": <string>, "description": <string>,
|
||||||
|
"payoraddress": <string>}</code
|
||||||
|
>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
||||||
Returns 200 OK (application/json)
|
Returns 200 OK (application/json)
|
||||||
</h5>
|
</h5>
|
||||||
<code>{"lnurl": <string>}</code>
|
<code
|
||||||
|
>{"id": <string>, "wallet": <string>, "description":
|
||||||
|
<string>, "payoraddress": <string>}</code
|
||||||
|
>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
<code
|
<code
|
||||||
>curl -X PUT {{ request.base_url }}api/v1/links/<pay_id> -d
|
>curl -X PUT {{ request.base_url }}scrub/api/v1/links/<pay_id>
|
||||||
'{"description": <string>, "amount": <integer>}' -H
|
-d '{"wallet": <string>, "description": <string>,
|
||||||
"Content-type: application/json" -H "X-Api-Key: {{
|
"payoraddress": <string>}' -H "Content-type: application/json"
|
||||||
user.wallets[0].adminkey }}"
|
-H "X-Api-Key: {{ user.wallets[0].adminkey }}"
|
||||||
</code>
|
</code>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
group="api"
|
group="api"
|
||||||
dense
|
dense
|
||||||
expand-separator
|
expand-separator
|
||||||
label="Delete a pay link"
|
label="Delete a scrub"
|
||||||
class="q-pb-md"
|
class="q-pb-md"
|
||||||
>
|
>
|
||||||
<q-card>
|
<q-card>
|
||||||
|
|
@ -126,8 +126,9 @@
|
||||||
<code></code>
|
<code></code>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
<code
|
<code
|
||||||
>curl -X DELETE {{ request.base_url }}api/v1/links/<pay_id> -H
|
>curl -X DELETE {{ request.base_url
|
||||||
"X-Api-Key: {{ user.wallets[0].adminkey }}"
|
}}scrub/api/v1/links/<pay_id> -H "X-Api-Key: {{
|
||||||
|
user.wallets[0].adminkey }}"
|
||||||
</code>
|
</code>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue