1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-22 06:15:02 +01:00
dspace-statistics-api/dspace_statistics_api
Alan Orth 3339bf8d9c
Add communities and collections support to API
The basic logic is similar to items, where you can request single
item statistics with a UUID, all item statistics, and item statis-
tics for a list of items (optionally with a date range). Most of
the item code was re-purposed to work on "elements", which can be
items, communities, or collections depending on the request, with
the use of Falcon's `before` hooks to set the statistics scope so
we know how to behave for the current request.

Other than the minor difference in facet fields, another issue I
had with communities and collections is that the owningComm and
owningColl fields are multi-valued (unlike items' id field). This
means that, when you facet the results of your query, Solr returns
ids that seem unrelated, but are actually present in the field, so
I had to make sure I checked all returned ids to see if they were
in the user's POSTed elements list.

TODO:
  - Add tests
  - Revise docstrings
  - Refactor items.py as it is now generic
2020-12-20 16:14:46 +02:00
..
docs Update docs about POST /items 2020-12-13 20:09:20 +02:00
__init__.py Refactor project structure 2018-10-28 11:14:21 +02:00
app.py Add communities and collections support to API 2020-12-20 16:14:46 +02:00
config.py Format code with black 2019-11-27 12:30:06 +02:00
database.py dspace_statistics_api: Use f-strings instead of format() 2020-03-02 11:24:29 +02:00
indexer.py indexer.py: Add support for communities and collections 2020-12-18 22:53:16 +02:00
items.py Add communities and collections support to API 2020-12-20 16:14:46 +02:00
util.py Add communities and collections support to API 2020-12-20 16:14:46 +02:00