-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Normal
-
None
-
Component/s: API
-
None
Almost all stats endpoints return a "payload" structure with some top-level information about the request (starting/ending timestamp, the requested stat range, the user id if user-specific stats were requested, ...) as well as one property that then has the specific stats data.
However, the artist-activity endpoints, drop that payload structure, instead returning only the raw stats data (so the response no longer identifies what was requested) with a generic "results" name (in the payload, one might expect to see something like "artist_activity").
Note that the site-wide version documents a more standard payload structure (while returning more or less the same structure as the user-specific endpoint), and the docs for the user-specific one do not mention a range parameter, which the endpoint does honor.
In addition, the data returned doesn't quite follow the docs. While provides what the sample says it will, it also supplies more:
- the album data includes release_group_mbid (where available)
- the artist fields include artist_mbid (but for the site-wide stats this is always explicitly null)
- for user-specific requests only, the name field is duplicated as artist_name