-
New Feature
-
Resolution: Unresolved
-
Normal
-
None
-
None
As an API consumer currently it is only possible to get the overall listen count for a user. It would also be useful to get the listen count for one of the specified statistic periods.
E.g. the ListenBrainz website already lists the total listen count for a time range, e.g. on https://listenbrainz.org/user/outsidecontext/reports/?range=week . But this data is not directly available via API.
The data could partially be rertieved from the GET /1/stats/user/(user_name)/listening-activity endpoint. But this lists the listens per time segment of the selected range. And as this list of times also includes the previous period, without a clear distinction where that starts or ends, it is not trivial to get the same listen count for that period as it is displayed on LB.org.
Proposed solutions:
- Extend GET /1/user/(user_name)/listen-count endpoint to provide a "range" parameter, that allows any of the ALLOWED_STATISTICS_RANGE ranges
- Alternatively extend the response of the GET /1/stats/user/(user_name)/listening-activity to include this total count of listens for the current period (not the previous one)