|
|
@ -6,12 +6,106 @@ |
|
|
|
> |
|
|
|
<q-expansion-item group="api" dense expand-separator label="List paywalls"> |
|
|
|
<q-card> |
|
|
|
<q-card-section> </q-card-section> |
|
|
|
<q-card-section> |
|
|
|
<code |
|
|
|
><span class="text-blue">GET</span> /paywall/api/v1/paywalls</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>[<paywall_object>, ...]</code> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5> |
|
|
|
<code |
|
|
|
>curl -X GET {{ request.url_root }}paywall/api/v1/paywalls -H |
|
|
|
"X-Api-Key: {{ g.user.wallets[0].inkey }}" |
|
|
|
</code> |
|
|
|
</q-card-section> |
|
|
|
</q-card> |
|
|
|
</q-expansion-item> |
|
|
|
<q-expansion-item group="api" dense expand-separator label="Create a paywall"> |
|
|
|
<q-card> |
|
|
|
<q-card-section> </q-card-section> |
|
|
|
<q-card-section> |
|
|
|
<code |
|
|
|
><span class="text-green">POST</span> |
|
|
|
/paywall/api/v1/paywalls</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 |
|
|
|
>{"amount": <integer>, "description": <string>, |
|
|
|
"memo": <string>, "remembers": <boolean>, |
|
|
|
"url": <string>}</code |
|
|
|
> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none"> |
|
|
|
Returns 201 CREATED (application/json) |
|
|
|
</h5> |
|
|
|
<code>{"amount": <integer>, "description": <string>, |
|
|
|
"id": <string>, "memo": <string>, |
|
|
|
"remembers": <boolean>, "time": <int>, |
|
|
|
"url": <string>, "wallet": <string>}</code> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5> |
|
|
|
<code |
|
|
|
>curl -X POST {{ request.url_root }}paywall/api/v1/paywalls -d |
|
|
|
'{"url": <string>, "memo": <string>, |
|
|
|
"description": <string>, "amount": <integer>, |
|
|
|
"remembers": <boolean>}' -H |
|
|
|
"Content-type: application/json" -H "X-Api-Key: {{ |
|
|
|
g.user.wallets[0].adminkey }}" |
|
|
|
</code> |
|
|
|
</q-card-section> |
|
|
|
</q-card> |
|
|
|
</q-expansion-item> |
|
|
|
<q-expansion-item group="api" dense expand-separator label="Create an invoice (public)"> |
|
|
|
<q-card> |
|
|
|
<q-card-section> |
|
|
|
<code |
|
|
|
><span class="text-green">POST</span> |
|
|
|
/paywall/api/v1/paywalls/<paywall_id>/invoice</code |
|
|
|
> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5> |
|
|
|
<code |
|
|
|
>{"amount": <integer>}</code |
|
|
|
> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none"> |
|
|
|
Returns 201 CREATED (application/json) |
|
|
|
</h5> |
|
|
|
<code>{"checking_id": <string>, "payment_request": <string>}</code> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5> |
|
|
|
<code |
|
|
|
>curl -X POST {{ request.url_root }}paywall/api/v1/paywalls/<paywall_id>/invoice -d |
|
|
|
'{"amount": <integer>}' -H |
|
|
|
"Content-type: application/json" |
|
|
|
</code> |
|
|
|
</q-card-section> |
|
|
|
</q-card> |
|
|
|
</q-expansion-item> |
|
|
|
<q-expansion-item group="api" dense expand-separator label="Check invoice status (public)"> |
|
|
|
<q-card> |
|
|
|
<q-card-section> |
|
|
|
<code |
|
|
|
><span class="text-green">POST</span> |
|
|
|
/paywall/api/v1/paywalls/<paywall_id>/check_invoice</code |
|
|
|
> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5> |
|
|
|
<code |
|
|
|
>{"checking_id": <string>}</code |
|
|
|
> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none"> |
|
|
|
Returns 200 OK (application/json) |
|
|
|
</h5> |
|
|
|
<code>{"paid": false}</code><br> |
|
|
|
<code>{"paid": true, "url": <string>, "remembers": <boolean>}</code> |
|
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5> |
|
|
|
<code |
|
|
|
>curl -X POST {{ request.url_root }}paywall/api/v1/paywalls/<paywall_id>/check_invoice -d |
|
|
|
'{"checking_id": <string>}' -H |
|
|
|
"Content-type: application/json" |
|
|
|
</code> |
|
|
|
</q-card-section> |
|
|
|
</q-card> |
|
|
|
</q-expansion-item> |
|
|
|
<q-expansion-item |
|
|
@ -22,7 +116,22 @@ |
|
|
|
class="q-pb-md" |
|
|
|
> |
|
|
|
<q-card> |
|
|
|
<q-card-section> </q-card-section> |
|
|
|
<q-card-section> |
|
|
|
<code |
|
|
|
><span class="text-pink">DELETE</span> |
|
|
|
/paywall/api/v1/paywalls/<paywall_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.url_root |
|
|
|
}}paywall/api/v1/paywalls/<paywall_id> -H "X-Api-Key: {{ |
|
|
|
g.user.wallets[0].adminkey }}" |
|
|
|
</code> |
|
|
|
</q-card-section> |
|
|
|
</q-card> |
|
|
|
</q-expansion-item> |
|
|
|
</q-expansion-item> |
|
|
|