From 185eccc7d6fec2d64b55fb93b061bbc92e3428e5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Dec 2024 22:36:07 -0800 Subject: update docs --- src/lib/samples.ts | 6 +++++- src/routes/(static)/docs/+page.svelte | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/lib/samples.ts b/src/lib/samples.ts index 469ddad9..ae7ef6d5 100644 --- a/src/lib/samples.ts +++ b/src/lib/samples.ts @@ -1,10 +1,14 @@ -import { PUBLIC_DOMAIN, PUBLIC_COINOS_URL } from "$env/static/public"; +import { PUBLIC_COINOS_URL, PUBLIC_DOMAIN } from "$env/static/public"; const api = PUBLIC_DOMAIN.includes("localhost") ? `${PUBLIC_COINOS_URL}` : `https://${PUBLIC_DOMAIN}/api`; export default { + me: `curl "${api}/me" -H "content-type: application/json"`, + update: `curl "${api}/user" -H "content-type: application/json" -d '{ + "username": "demo", + }'`, register: `curl "${api}/register" -H "content-type: application/json" -d '{ "user": { "username": "demo", diff --git a/src/routes/(static)/docs/+page.svelte b/src/routes/(static)/docs/+page.svelte index f4e2ffb9..1c47d054 100644 --- a/src/routes/(static)/docs/+page.svelte +++ b/src/routes/(static)/docs/+page.svelte @@ -79,6 +79,26 @@

Login to an account to get its auth token

+

GET /me

+

Get your account details and balance

+ + +

POST /user

+

Update your account/settings

+
Request params (all optional)
+
+
username
+
string - letters and numbers, no spaces
+
display
+
string - spaces allowed
+
currency
+
string - three-letter ISO currency code e.g. CAD or USD
+
language
+
string - two-letter language code e.g. en, fr, es
+
+ + +

POST /invoice

Create an invoice.

-- cgit v1.2.3