-
Improvement
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
It's currently very cumbersome to get a user's current pin.
First you have to get all pins (/$user_name/pins), then take the first item in the pinned_recordings array, then compare the current timestamp to the pinned_until timestmap in the pin.
Instead, it would be much more convenient to have an endpoint such as /$user_name/pins/current that would return a single pin (the current pin) or an empty object.
The context of this request is the Discourse ListenBrianz plugin that outsidecontext added. It's an example of why the complications of this API endpoint are preventing adoption of pins being displayed elsewhere:
See https://community.metabrainz.org/t/showing-a-users-listenbrainz-listens-in-their-discourse-community-profile/621375/24