From 0178097ee6e8470276e9067a8d7f91ecd020bee5 Mon Sep 17 00:00:00 2001
From: Arc <33088785+arcbtc@users.noreply.github.com>
Date: Sun, 19 Apr 2020 20:54:11 +0100
Subject: [PATCH] Added admin to some of the calls
---
.../templates/withdraw/_api_docs.html | 39 +++++++++++++++++--
1 file changed, 36 insertions(+), 3 deletions(-)
diff --git a/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html b/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html
index 0ddd4f9e8..85347dc18 100644
--- a/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html
+++ b/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html
@@ -7,27 +7,60 @@
-
+ GET /withdraw/api/v1/links
+ Headers
+ {"X-Api-Key": <invoice_key>}
+ Body (application/json)
+ Returns 201 CREATED (application/json)
+ {"lnurl": <string>}
+ Curl example
+ curl -X GET http://127.0.0.1:5000/withdraw/api/v1/links -H "X-Api-Key: <invoice_key>"
-
+ POST /withdraw/api/v1/links
+ Headers
+ {"X-Api-Key": <admin_key>}
+ Body (application/json)
+ {"title": <string>, "min_withdrawable": <integer>, "max_withdrawable": <integer>, "uses": <integer>, "wait_time": <integer>, "is_unique": <boolean>}
+ Returns 201 CREATED (application/json)
+ {"lnurl": <string>}
+ Curl example
+ curl -X POST http://127.0.0.1:5000/withdraw/api/v1/links -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: <admin_key>"
+
-
+ PUT /withdraw/api/v1/links/<withdraw_id>
+ Headers
+ {"X-Api-Key": <admin_key>}
+ Body (application/json)
+ {"title": <string>, "min_withdrawable": <integer>, "max_withdrawable": <integer>, "uses": <integer>, "wait_time": <integer>, "is_unique": <boolean>}
+ Returns 201 CREATED (application/json)
+ {"lnurl": <string>}
+ Curl example
+ curl -X PUT http://127.0.0.1:5000/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: <admin_key>"
+
+ DELETE /withdraw/api/v1/links/<withdraw_id>
+ Headers
+ {"X-Api-Key": <admin_key>}
+ Returns 201 NO_CONTENT
+ {"lnurl": <string>}
+ Curl example
+ curl -X DELETE http://127.0.0.1:5000/withdraw/api/v1/links/<withdraw_id> -H "X-Api-Key: <admin_key>"
+