1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-25 23:58:18 +01:00

Change / route to /items

I think it's more obvious if the "all items" route is plural. Also,
this will allow me to eventually put documentation at the root.
This commit is contained in:
Alan Orth 2018-09-25 11:34:07 +03:00
parent f30a464cd1
commit 4cf8656b35
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ Create a virtual environment and run it:
## Using the API
The API exposes the following endpoints:
- GET `/`return views and downloads for all items that Solr knows about¹. Accepts `limit` and `page` query parameters for pagination of results.
- GET `/items`return views and downloads for all items that Solr knows about¹. Accepts `limit` and `page` query parameters for pagination of results.
- GET `/item/id`return views and downloads for a single item (*id* must be a positive integer).
¹ We are querying the Solr statistics core, which technically only knows about all items that have either views or downloads.

2
app.py
View File

@ -59,7 +59,7 @@ class ItemResource:
resp.media = statistics
api = falcon.API()
api.add_route('/', AllItemsResource())
api.add_route('/items', AllItemsResource())
api.add_route('/item/{item_id:int}', ItemResource())
# vim: set sw=4 ts=4 expandtab: