Update README.md
This commit is contained in:
31
README.md
31
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": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user