[API Request] getYears #111
Replies: 2 comments 5 replies
-
This will require an extension, as any new API call does, so clients can query whether the server supports it or not. But I do think this would be a nice addition. As would the ability to filter and retrieve albums by recordLabel as well (though maybe that should be a new extension instead of included in this). eg |
Beta Was this translation helpful? Give feedback.
-
Currently with the API we have the type parameter makes little sense as we can't change the byYear filter to something else. In the same idea if it was to be done before the new endpoints it would make sense that this does not have pagination as there's only a limited amount of possible years anyway. But yes as dweymouth mentioned with proper filtering on the new endpoints to access the data, getting access to those kind of list will be the final touch. |
Beta Was this translation helpful? Give feedback.
-
Type of change
API tweak
Proposal description
Many music clients want to browse musical elements by a time period. Typically, they seek first to display a list of years or decades, then after selecting a time period the musical elements (albums, songs) are displayed.
Currently there's no operation to list the years of release covered in a collection.
getGenres
is analogous as a listing of all groups for a different type of classification.A current workaround is to use
getAlbumListx
and inspect theyear
properties for the returned elements. However, this is suboptimal, performance wise, because to know all years you must request all albums (there's no ordering by year -byYear
appears to be a filter, not a sort.newest
andrecent
are not explicit as to whether all albums are returned).I'm not sure if this is incorrect but I classified this as a API tweak because, whilst it's a significant addition, it shouldn't require the "extensions" mechanism (I don't feel).
Backward compatibility impact
This would be additive so there should be no backwards compatibility issues.
Backward compatibility
API details
getYears
Returns all years in the music library.
Parameters
All parameters are optional.
type
The type of year being queried. Possible values:
releaseDate
,originalReleaseDate
.Default: releaseDate
size
The maximum length of the returned list.
Default: 10
offset
The offset in the list from which the list should start.
Default: 0
Response
years
Array of
year
. Required.year
All fields are required.
songCount
The number of songs in that year.
albumCount
The number of albums in that year.
value
The title of the time period.
Example
Security impacts
No response
Potential issues
No response
Alternative solutions
No response
Beta Was this translation helpful? Give feedback.
All reactions