From cc6bc08706dcbc657b76ddb07ee1c4bdb6107249 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 27 Feb 2023 19:28:09 -0800 Subject: api docs --- src/lib/samples.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/lib/samples.js (limited to 'src/lib') diff --git a/src/lib/samples.js b/src/lib/samples.js new file mode 100644 index 00000000..4af61822 --- /dev/null +++ b/src/lib/samples.js @@ -0,0 +1,22 @@ +export default { + register: `curl -s "https://coinos.io/api/register" -H "application/json" -d '{ + "username": "adam", + "password": "hunter2" +}'`, + login: `curl -s "https://coinos.io/api/login" -H "application/json" -d '{ + "username": "adam", + "password": "hunter2" +}'`, + invoice: `curl -s "https://coinos.io/api/invoice" + -H "application/json" + -H "Authorization: Bearer $token" + -d '{ + "invoice": { + "amount": 1000, + "type": "lightning", + "webhook": "https://example.com/payment/received", + "secret": "hunter2" + }, +}'`, + fetchInvoice: `curl -s "https://coinos.io/api/invoice/bc1qmhfk9stzffhd9umzmld92vff7zg3mdlh7rvvaj" -H "application/json" }'` +}; -- cgit v1.2.3