From 7328d687027fa42b5ded2d7511cdb737dcee3db8 Mon Sep 17 00:00:00 2001 From: Aljaz Ceru Date: Thu, 20 Feb 2025 18:43:06 -0600 Subject: [PATCH] testing docs --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 81fe12c..ace8051 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,13 @@ Default output format [None]: ``` +### Get cloudformation.yaml +Either clone this repository with git +``` +git clone https://github.com/breez/nodeless-payments.git +``` +or download just [cloudformation.yaml](https://raw.githubusercontent.com/breez/nodeless-payments/refs/heads/main/cloudformation.yaml). + ### Create SSM parameters for Breez credentials From the command line, run the following commands: ``` @@ -103,5 +110,25 @@ root@2edec8635e65:/# aws cloudformation describe-stacks --stack-name breez-i ``` ### Example usage -You can use example-client.py to test the functionality. Take Base URL from the above output and put it in API_URL in example-client.py -API_KEY is the secret you set at the begining. +#### Python +You can use `example-client.py`file from this to test the functionality. Take Base URL from the output of last command (example above) and API_SECRET and edit the `example-client.py` with correct values + +``` +API_URL = "YOUR-URL-HERE" +API_KEY = "YOUR-SECRET-HERE" +``` +For example-client to work you need to have python installed together with requests library +``` +pip install requests +``` + +#### curl +If you don't have python installed you can also just run a curl command (should work on macos/linux). + +example for list_payments endpoint: +``` +curl -X POST "/list_payments" \ + -H "Content-Type: application/json" \ + -H "x-api-key: YOUR_API_SECRET" \ + -d '{}' +``` \ No newline at end of file