fix curl examples in extensions, path was duplicating the plugin names.

This commit is contained in:
fiatjaf 2021-02-07 08:23:01 -03:00
parent 9c126696fc
commit 88eb8e0e78
5 changed files with 33 additions and 35 deletions

View file

@ -17,8 +17,8 @@
<code>[&lt;pay_link_object&gt;, ...]</code> <code>[&lt;pay_link_object&gt;, ...]</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.url_root }}lnurlp/api/v1/links -H "X-Api-Key: >curl -X GET {{ request.url_root }}api/v0/links -H "X-Api-Key: {{
{{ g.user.wallets[0].inkey }}" g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
</q-card> </q-card>
@ -38,8 +38,8 @@
<code>{"lnurl": &lt;string&gt;}</code> <code>{"lnurl": &lt;string&gt;}</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.url_root }}lnurlp/api/v1/links/&lt;pay_id&gt; >curl -X GET {{ request.url_root }}api/v1/links/&lt;pay_id&gt; -H
-H "X-Api-Key: {{ g.user.wallets[0].inkey }}" "X-Api-Key: {{ g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
</q-card> </q-card>
@ -63,10 +63,9 @@
<code>{"lnurl": &lt;string&gt;}</code> <code>{"lnurl": &lt;string&gt;}</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.url_root }}lnurlp/api/v1/links -d >curl -X POST {{ request.url_root }}api/v1/links -d '{"description":
'{"description": &lt;string&gt;, "amount": &lt;integer&gt;}' -H &lt;string&gt;, "amount": &lt;integer&gt;}' -H "Content-type:
"Content-type: application/json" -H "X-Api-Key: {{ application/json" -H "X-Api-Key: {{ g.user.wallets[0].adminkey }}"
g.user.wallets[0].adminkey }}"
</code> </code>
</q-card-section> </q-card-section>
</q-card> </q-card>
@ -93,8 +92,8 @@
<code>{"lnurl": &lt;string&gt;}</code> <code>{"lnurl": &lt;string&gt;}</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.url_root }}lnurlp/api/v1/links/&lt;pay_id&gt; >curl -X PUT {{ request.url_root }}api/v1/links/&lt;pay_id&gt; -d
-d '{"description": &lt;string&gt;, "amount": &lt;integer&gt;}' -H '{"description": &lt;string&gt;, "amount": &lt;integer&gt;}' -H
"Content-type: application/json" -H "X-Api-Key: {{ "Content-type: application/json" -H "X-Api-Key: {{
g.user.wallets[0].adminkey }}" g.user.wallets[0].adminkey }}"
</code> </code>
@ -120,9 +119,8 @@
<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.url_root >curl -X DELETE {{ request.url_root }}api/v1/links/&lt;pay_id&gt; -H
}}lnurlp/api/v1/links/&lt;pay_id&gt; -H "X-Api-Key: {{ "X-Api-Key: {{ g.user.wallets[0].adminkey }}"
g.user.wallets[0].adminkey }}"
</code> </code>
</q-card-section> </q-card-section>
</q-card> </q-card>

View file

@ -17,7 +17,7 @@
<code>[&lt;paywall_object&gt;, ...]</code> <code>[&lt;paywall_object&gt;, ...]</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.url_root }}paywall/api/v1/paywalls -H >curl -X GET {{ request.url_root }}api/v1/paywalls -H
"X-Api-Key: {{ g.user.wallets[0].inkey }}" "X-Api-Key: {{ g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -48,7 +48,7 @@
> >
<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.url_root }}paywall/api/v1/paywalls -d >curl -X POST {{ request.url_root }}api/v1/paywalls -d
'{"url": &lt;string&gt;, "memo": &lt;string&gt;, "description": '{"url": &lt;string&gt;, "memo": &lt;string&gt;, "description":
&lt;string&gt;, "amount": &lt;integer&gt;, "remembers": &lt;string&gt;, "amount": &lt;integer&gt;, "remembers":
&lt;boolean&gt;}' -H "Content-type: application/json" -H "X-Api-Key: &lt;boolean&gt;}' -H "Content-type: application/json" -H "X-Api-Key:
@ -81,7 +81,7 @@
<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.url_root >curl -X POST {{ request.url_root
}}paywall/api/v1/paywalls/&lt;paywall_id&gt;/invoice -d '{"amount": }}api/v1/paywalls/&lt;paywall_id&gt;/invoice -d '{"amount":
&lt;integer&gt;}' -H "Content-type: application/json" &lt;integer&gt;}' -H "Content-type: application/json"
</code> </code>
</q-card-section> </q-card-section>
@ -112,7 +112,7 @@
<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.url_root >curl -X POST {{ request.url_root
}}paywall/api/v1/paywalls/&lt;paywall_id&gt;/check_invoice -d }}api/v1/paywalls/&lt;paywall_id&gt;/check_invoice -d
'{"payment_hash": &lt;string&gt;}' -H "Content-type: application/json" '{"payment_hash": &lt;string&gt;}' -H "Content-type: application/json"
</code> </code>
</q-card-section> </q-card-section>
@ -138,7 +138,7 @@
<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.url_root >curl -X DELETE {{ request.url_root
}}paywall/api/v1/paywalls/&lt;paywall_id&gt; -H "X-Api-Key: {{ }}api/v1/paywalls/&lt;paywall_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].adminkey }}" g.user.wallets[0].adminkey }}"
</code> </code>
</q-card-section> </q-card-section>

View file

@ -17,7 +17,7 @@
<code>[&lt;tpos_object&gt;, ...]</code> <code>[&lt;tpos_object&gt;, ...]</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.url_root }}tpos/api/v1/tposs -H "X-Api-Key: >curl -X GET {{ request.url_root }}api/v1/tposs -H "X-Api-Key:
&lt;invoice_key&gt;" &lt;invoice_key&gt;"
</code> </code>
</q-card-section> </q-card-section>
@ -42,7 +42,7 @@
> >
<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.url_root }}tpos/api/v1/tposs -d '{"name": >curl -X POST {{ request.url_root }}api/v1/tposs -d '{"name":
&lt;string&gt;, "currency": &lt;string&gt;}' -H "Content-type: &lt;string&gt;, "currency": &lt;string&gt;}' -H "Content-type:
application/json" -H "X-Api-Key: &lt;admin_key&gt;" application/json" -H "X-Api-Key: &lt;admin_key&gt;"
</code> </code>
@ -69,8 +69,8 @@
<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.url_root >curl -X DELETE {{ request.url_root }}api/v1/tposs/&lt;tpos_id&gt; -H
}}tpos/api/v1/tposs/&lt;tpos_id&gt; -H "X-Api-Key: &lt;admin_key&gt;" "X-Api-Key: &lt;admin_key&gt;"
</code> </code>
</q-card-section> </q-card-section>
</q-card> </q-card>

View file

@ -42,7 +42,7 @@
<code>JSON list of users</code> <code>JSON list of users</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.url_root }}usermanager/api/v1/users -H >curl -X GET {{ request.url_root }}api/v1/users -H
"X-Api-Key: {{ g.user.wallets[0].inkey }}" "X-Api-Key: {{ g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -65,7 +65,7 @@
<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.url_root >curl -X GET {{ request.url_root
}}usermanager/api/v1/wallets/&lt;user_id&gt; -H "X-Api-Key: {{ }}api/v1/wallets/&lt;user_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].inkey }}" g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -88,7 +88,7 @@
<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.url_root >curl -X GET {{ request.url_root
}}usermanager/api/v1/wallets&lt;wallet_id&gt; -H "X-Api-Key: {{ }}api/v1/wallets&lt;wallet_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].inkey }}" g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -128,7 +128,7 @@
> >
<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.url_root }}usermanager/api/v1/users -d >curl -X POST {{ request.url_root }}api/v1/users -d
'{"admin_id": "{{ g.user.id }}", "wallet_name": &lt;string&gt;, '{"admin_id": "{{ g.user.id }}", "wallet_name": &lt;string&gt;,
"user_name": &lt;string&gt;}' -H "X-Api-Key: {{ "user_name": &lt;string&gt;}' -H "X-Api-Key: {{
g.user.wallets[0].inkey }}" -H "Content-type: application/json" g.user.wallets[0].inkey }}" -H "Content-type: application/json"
@ -165,7 +165,7 @@
> >
<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.url_root }}usermanager/api/v1/wallets -d >curl -X POST {{ request.url_root }}api/v1/wallets -d
'{"user_id": &lt;string&gt;, "wallet_name": &lt;string&gt;, '{"user_id": &lt;string&gt;, "wallet_name": &lt;string&gt;,
"admin_id": "{{ g.user.id }}"}' -H "X-Api-Key: {{ "admin_id": "{{ g.user.id }}"}' -H "X-Api-Key: {{
g.user.wallets[0].inkey }}" -H "Content-type: application/json" g.user.wallets[0].inkey }}" -H "Content-type: application/json"
@ -190,7 +190,7 @@
<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.url_root >curl -X DELETE {{ request.url_root
}}usermanager/api/v1/users/&lt;user_id&gt; -H "X-Api-Key: {{ }}api/v1/users/&lt;user_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].inkey }}" g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -208,7 +208,7 @@
<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.url_root >curl -X DELETE {{ request.url_root
}}usermanager/api/v1/wallets/&lt;wallet_id&gt; -H "X-Api-Key: {{ }}api/v1/wallets/&lt;wallet_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].inkey }}" g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -230,7 +230,7 @@
<code>{"X-Api-Key": &lt;string&gt;}</code> <code>{"X-Api-Key": &lt;string&gt;}</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.url_root }}usermanager/api/v1/extensions -d >curl -X POST {{ request.url_root }}api/v1/extensions -d
'{"userid": &lt;string&gt;, "extension": &lt;string&gt;, "active": '{"userid": &lt;string&gt;, "extension": &lt;string&gt;, "active":
&lt;integer&gt;}' -H "X-Api-Key: {{ g.user.wallets[0].inkey }}" -H &lt;integer&gt;}' -H "X-Api-Key: {{ g.user.wallets[0].inkey }}" -H
"Content-type: application/json" "Content-type: application/json"

View file

@ -22,7 +22,7 @@
<code>[&lt;withdraw_link_object&gt;, ...]</code> <code>[&lt;withdraw_link_object&gt;, ...]</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.url_root }}withdraw/api/v1/links -H >curl -X GET {{ request.url_root }}api/v1/links -H
"X-Api-Key: {{ g.user.wallets[0].inkey }}" "X-Api-Key: {{ g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -50,7 +50,7 @@
<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.url_root >curl -X GET {{ request.url_root
}}withdraw/api/v1/links/&lt;withdraw_id&gt; -H "X-Api-Key: {{ }}api/v1/links/&lt;withdraw_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].inkey }}" g.user.wallets[0].inkey }}"
</code> </code>
</q-card-section> </q-card-section>
@ -79,7 +79,7 @@
<code>{"lnurl": &lt;string&gt;}</code> <code>{"lnurl": &lt;string&gt;}</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.url_root }}withdraw/api/v1/links -d >curl -X POST {{ request.url_root }}api/v1/links -d
'{"title": &lt;string&gt;, "min_withdrawable": &lt;integer&gt;, '{"title": &lt;string&gt;, "min_withdrawable": &lt;integer&gt;,
"max_withdrawable": &lt;integer&gt;, "uses": &lt;integer&gt;, "max_withdrawable": &lt;integer&gt;, "uses": &lt;integer&gt;,
"wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;}' -H "wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;}' -H
@ -116,7 +116,7 @@
<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.url_root >curl -X PUT {{ request.url_root
}}withdraw/api/v1/links/&lt;withdraw_id&gt; -d '{"title": }}api/v1/links/&lt;withdraw_id&gt; -d '{"title":
&lt;string&gt;, "min_withdrawable": &lt;integer&gt;, &lt;string&gt;, "min_withdrawable": &lt;integer&gt;,
"max_withdrawable": &lt;integer&gt;, "uses": &lt;integer&gt;, "max_withdrawable": &lt;integer&gt;, "uses": &lt;integer&gt;,
"wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;}' -H "wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;}' -H
@ -146,7 +146,7 @@
<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.url_root >curl -X DELETE {{ request.url_root
}}withdraw/api/v1/links/&lt;withdraw_id&gt; -H "X-Api-Key: {{ }}api/v1/links/&lt;withdraw_id&gt; -H "X-Api-Key: {{
g.user.wallets[0].adminkey }}" g.user.wallets[0].adminkey }}"
</code> </code>
</q-card-section> </q-card-section>