From 01eba17fc3c5e957de96bc24fd5852b691649129 Mon Sep 17 00:00:00 2001
From: David Trattnig <david.trattnig@o94.at>
Date: Thu, 25 Jun 2020 23:41:27 +0200
Subject: [PATCH] Improved doc.

---
 README.md | 44 +++++++++++++++++++++++++++++---------------
 1 file changed, 29 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md
index aebd4b7..d99b3c6 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,34 @@ To run the API in an local development server execute:
 ./run.sh api-dev
 ```
 
-You can access the interactive documentation here:
+## Running with Docker
+
+To run the server on a Docker container, please execute the following from the root directory:
+
+```bash
+# Building the image
+./run.sh docker:build
+
+# Push the current image to dockerhub.com
+./run.sh docker:push
+
+# Starting up a container
+./run.sh docker:api
+```
+
+## Using the API
+
+Adding some entry to the playlog:
+
+```bash
+curl -d '{ "track_start": "2020-06-25 15:38:44", "track_artist": "Aphex Twin", "track_title": "Windowlicker", "log_source": 1 }' -H "Content-Type: application/json" -X POST http://localhost:8008/api/v1/playlog/store
+```
+
+The attribute `log_source` is a numeric presentation of the engine (`1` or `2`) where this log entry
+is coming from. If you are using additional audio sources, such as automated music player, you can
+define your own numeric id for such device.
+
+All other API endpoints are listed in the interactive documentation:
 
 ```bash
 http://localhost:8008/api/v1/ui/
@@ -58,17 +85,4 @@ sudo pip install tox
 ./run.sh test
 ```
 
-## Running with Docker
-
-To run the server on a Docker container, please execute the following from the root directory:
-
-```bash
-# Building the image
-./run.sh docker:build
-
-# Push the current image to dockerhub.com
-./run.sh docker:push
-
-# Starting up a container
-./run.sh docker:api
-```
+> Note, the test-cases are currently not functional.
-- 
GitLab