aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-02-19 16:17:17 +0100
committermetamuffin <metamuffin@disroot.org>2023-02-19 16:17:17 +0100
commit8d2a2fd918e52018b5ff5bc66bc3f67bb7c58d8d (patch)
tree6d165d79b42f69b60983d1b1914283b2b4dec7ad
parent3edddb0aea423a6f41da7597aec1836b015bc6bb (diff)
downloadjellything-8d2a2fd918e52018b5ff5bc66bc3f67bb7c58d8d.tar
jellything-8d2a2fd918e52018b5ff5bc66bc3f67bb7c58d8d.tar.bz2
jellything-8d2a2fd918e52018b5ff5bc66bc3f67bb7c58d8d.tar.zst
api doc
-rw-r--r--api.md26
-rw-r--r--readme.md6
2 files changed, 31 insertions, 1 deletions
diff --git a/api.md b/api.md
new file mode 100644
index 0000000..a8a229e
--- /dev/null
+++ b/api.md
@@ -0,0 +1,26 @@
+# Jellything API
+
+Routes marked with `*` require authentification. Any endpoint returning JSON,
+will report errors with an object containing error string in the `error` key.
+
+The `jellycommon` crate provides useful structs for deserializing data.
+
+```toml
+# Cargo.toml
+[depedencies]
+jellycommon = { git = "https://codeberg.org/metamuffin/jellything.git" }
+```
+
+## GET `/api/version`
+
+Returns API version number.
+
+## POST `/api/account/login`
+
+Request body contains JSON with keys `username` and `password`. The Response
+contains the session cookie.
+
+## GET* `/api/library/<path...>`
+
+Request a library node (either a directory or item). See
+[`common/src/api.rs`](./common/src/api.rs)
diff --git a/readme.md b/readme.md
index e6dcb12..0abbe67 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
# Jellything
-Jellything (not to be confuse with "Jellyfin") is a media streaming software,
+Jellything (not to be confused with "Jellyfin") is a media streaming software,
optimizied for serving movies and such.
## Features
@@ -12,3 +12,7 @@ optimizied for serving movies and such.
## Licence
The Licence is AGPL-3.0-only, see `COPYING`
+
+## API
+
+See [`api.md`](./api.md)