fix #24: clarify template use of .Value (#25)

This commit is contained in:
T. von Dein
2026-04-29 08:33:10 +02:00
parent 4fa42e27e4
commit cafc65aea7
4 changed files with 40 additions and 4 deletions

View File

@@ -413,6 +413,13 @@ TEMPLATES
.Key - string
.Value - string
To be able to use the value in a template, you'll need to add the
"-s" flag so that values are included in output data stream.
Otherwise you can only use ".Preview".
.Preview string
First line of entry value (if it is a string).
.Bin - []byte
.Created - timestamp.Time
To retrieve a string representation of the timestamp, use
@@ -504,7 +511,7 @@ REST API
Some curl example calls to the API:
Post a new key: curl -X PUT localhost:8787/anydb/v1/ \ -H 'Content-Type:
application/json' \ -d '{"key":"foo","val":"bar"}'
application/json' \ -d '{"key":"foo","data":"bar"}'
Retrieve the value:
@@ -514,6 +521,10 @@ REST API
curl localhost:8787/anydb/v1/
Delete an entry:
curl -s -X DELETE http://localhost:8787/anydb/v1/foo
BUGS
In order to report a bug, unexpected behavior, feature requests or to
submit a patch, please open an issue on github: