cleanup fly docs

This commit is contained in:
2025-05-28 09:50:50 +02:00
parent 493ca33db9
commit 6a3959d9b8

View File

@@ -46,82 +46,3 @@ This document explains deploying breez payments api to fly.io
```bash
fly deploy
```
## API Endpoints
### Health Check
```
GET /health
```
Check if the API is up and running.
### List Payments
```
GET /list_payments
```
Query Parameters:
- `from_timestamp` (optional): Filter payments from this timestamp
- `to_timestamp` (optional): Filter payments to this timestamp
- `offset` (optional): Pagination offset
- `limit` (optional): Pagination limit
### Receive Payment
```
POST /receive_payment
```
Request Body:
```json
{
"amount": 10000,
"method": "LIGHTNING"
}
```
### Send Payment
```
POST /send_payment
```
Request Body:
```json
{
"destination": "lnbc...",
"amount": 10000,
"drain": false
}
```
## Client Usage
See `client.py` for a Python client implementation and example usage.
### Example usage
#### Python
You can use `example-client.py`file from this to test the functionality. Take the URL flyctl returned at deploy 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
```
Then run:
```
python example-client.py
```
#### curl
If you don't have python installed, you can also just run a curl command.
For example, for the *list_payments* endpoint, run:
```
curl -X POST "<YOUR-URL-HERE>/list_payments" -H "Content-Type: application/json" -H "x-api-key: <API_SECRET>" -d '{}'
```