updated readme
This commit is contained in:
parent
23f2351543
commit
6531080a02
1 changed files with 37 additions and 1 deletions
36
README.md
36
README.md
|
@ -1,3 +1,39 @@
|
|||
# worklog
|
||||
|
||||
simple workday recording with a basic rest api
|
||||
|
||||
|
||||
## endpoints
|
||||
|
||||
| method | url | arguments | description |
|
||||
| ------ | --- | --------- | ----------- |
|
||||
| `get` | /csv| from=DD.MM.YYYY<br>to=DD.MM.YYYY | get recordings (in range) as csv |
|
||||
| `get` | /json| from=DD.MM.YYYY<br>to=DD.MM.YYYY | get recordings (in range) as json |
|
||||
| `get` | /today | | get aggregated recordings for today as json (if any) |
|
||||
| `post` | /start | | start a new recording |
|
||||
| `post` | /stop | | stop the current recording (if any) |
|
||||
|
||||
**note:**
|
||||
the api uses basic authentication so each request has to include an `Authorization` request header.
|
||||
|
||||
## examples
|
||||
|
||||
**start a new recording:**
|
||||
curl -X POST -u username:password http://localhost:3333/start
|
||||
|
||||
**stop the current recording:**
|
||||
curl -X POST -u username:password http://localhost:3333/stop
|
||||
|
||||
**get all recordings as json:**
|
||||
curl -u username:password http://localhost:3333/json
|
||||
|
||||
**get all recordings for january 2023 as csv:**
|
||||
curl -u username:password http://localhost:3333/csv?from=01.01.2023&to=31.01.2023
|
||||
|
||||
## configuration
|
||||
|
||||
configuration is entirely done inside the file `config.yml`.
|
||||
you can specify the location of the config file with the optional argument `--config` or `-c` when starting the server.
|
||||
otherwise the program will try to find a config file at the following locations:
|
||||
- `$HOME/.config/worklog/config.yml`
|
||||
- `$PWD/config.yml`
|
||||
|
|
Loading…
Reference in a new issue