diff options
| author | JocelynDelalande <JocelynDelalande@users.noreply.github.com> | 2018-02-07 00:07:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-07 00:07:09 +0100 |
| commit | 667e555d6726f1e27e8e5cdcfb79981b413571e9 (patch) | |
| tree | 161190c22b4c6257d3a6839d610d865e0b63aa09 /docs | |
| parent | cf7bd572489aad17bf60026c6618d0ff49f822a9 (diff) | |
| parent | b95ea7f4e68a0794a44e68621a8210bb4db43e67 (diff) | |
| download | ihatemoney-mirror-667e555d6726f1e27e8e5cdcfb79981b413571e9.zip ihatemoney-mirror-667e555d6726f1e27e8e5cdcfb79981b413571e9.tar.gz ihatemoney-mirror-667e555d6726f1e27e8e5cdcfb79981b413571e9.tar.bz2 | |
Merge pull request #324 from JocelynDelalande/jd-stats-api
Add an API endpoint for statistics
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst index b82c6f3..0ae4214 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -164,3 +164,25 @@ And you can of course `DELETE` them at `/api/projects/<id>/bills/<bill-id>`:: $ curl --basic -u demo:demo -X DELETE\ https://ihatemoney.org/api/projects/demo/bills/80\ "OK" + + +Statistics +---------- + +You can get some project stats with a `GET` on `/api/projects/<id>/statistics`:: + + $ curl --basic -u demo:demo https://ihatemoney.org/api/projects/demo/statistics + [ + { + "balance": 12.5, + "member": {"activated": True, "id": 1, "name": "alexis", "weight": 1.0}, + "paid": 25.0, + "spent": 12.5 + }, + { + "balance": -12.5, + "member": {"activated": True, "id": 2, "name": "fred", "weight": 1.0}, + "paid": 0, + "spent": 12.5 + } + ] |
