From f05aa8a1ea39e4c3aff7f0f4b8b3f7600562c91c Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 27 Sep 2024 15:51:15 +0000 Subject: [PATCH] Update README.md --- README.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4e08cd2..54b938c 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,36 @@ contain any number of keys, and a key can contain any number of values. ## Features -* Values are serialized, so arrays and objects can be stored and restored. +* Virtually unlimited collections with virtually unlimited keys. +* Every key can have any number of values with a validity range, and a fallback key without + a validity range for when no range matches. +* Values are serialized, so arrays and objects are okay to use. * Not intended to be running as a public service, so there is no authentication, for now. -* Last value that matches is returned. ### Future * Metadata; store with key "meta" in value set post call, returned under a "meta" key in the result list. +## Installing + +It is recommended to run ParamDB using docker: + +```bash +$ docker run -v $PWD/var:/application/var -p 8000:8000 \ + --name paramdb \ + dev.noccylabs.info/paramdb/paramdb:latest +``` + +You can also clone and install the repository using `composer`: + +```bash +$ git clone https://dev.noccylabs.info/paramdb/paramdb.git +$ cd paramdb +$ composer install +$ bin/paramdb +``` + ## Using ### Store values @@ -48,7 +69,7 @@ Content-Type: application/json ``` > [!NOTE] -> The only required key is `value`, and as there can only be one value without validity it will overwrite any existing value. +> The only required key is `value`. As there can only be one value without validity it will overwrite, any request without validity will overwrite any existing value without validity. ### Retrieve current values @@ -56,7 +77,9 @@ Retrieve all current values by getting `/{collection}`. If all values in a key h ```json GET /businessinfo +``` +```json { "openhours": "Mo-Fr 09-17, Sa-Su 10-01" } @@ -72,7 +95,9 @@ Retrieve all keys and values, together with the value IDs by getting `/{collecti ```json GET /businessinfo/all +``` +```json { "openhours": [ {