Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user.getArtistTracks will be deprecated soon #298

Closed
ben-xo opened this Issue Feb 26, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@ben-xo
Copy link

ben-xo commented Feb 26, 2019

Hi there,

We will be removing user.getArtistTracks from the public API soon. The new scrobble storage back-end doesn't support it, and the results returned by the method are slowly going out of date, as it's still powered by the legacy back-end.

However there is a new method user.getTrackScrobbles which is just like user.getArtistTracks, except also takes a "track" parameter. This covers the most frequent use cases for the getArtistTracks which have seen (such as "find my first scrobble of a specific song" or "work out how many times i played a particular song on a particular album")

The timeline for deprecation is sometime before May 2019.

@hugovk

This comment has been minimized.

Copy link
Member

hugovk commented Feb 26, 2019

@ben-xo Hi, thanks for letting us know!

We will be removing user.getArtistTracks from the public API soon. The new scrobble storage back-end doesn't support it, and the results returned by the method are slowly going out of date, as it's still powered by the legacy back-end.

I'll add a deprecation warning to user.getArtistTracks and add user.getTrackScrobbles. Is there any documentation for the new one yet?

For example, the old one is at https://www.last.fm/api/show/user.getArtistTracks, but https://www.last.fm/api/show/user.getTrackScrobbles is 404.

However there is a new method user.getTrackScrobbles which is just like user.getArtistTracks, except also takes a "track" parameter. This covers the most frequent use cases for the getArtistTracks which have seen (such as "find my first scrobble of a specific song" or "work out how many times i played a particular song on a particular album")

I have a use case for the old getArtistTracks to list the last N (usually 20) tracks played by a user for a certain artist. It sounds like the new getTrackScrobbles cannot do that. Is that the case, and will there be something to replace it?

The timeline for deprecation is sometime before May 2019.

Is that for when it will stop working, or for when it is officially discouraged? If the latter, do you have a timeline for when it will be switched off?

Thanks!

(PS getArtistTracks is returning 502 Bad Gateway or 504 Gateway Time-out right now.)

@ben-xo

This comment has been minimized.

Copy link
Author

ben-xo commented Mar 7, 2019

Hi there,

Sorry we haven't added the documentation yet - but it's basically the same as for user.getArtistTracks, except with a "track" parameter as well.

Unfortunately the only way to get information per-artist with the current scrobble-storage design is to either fetch information about all scrobbles (i.e user.getRecentTracks) then filter it, or to fetch information about an artist (user.getTopTracks filtered by artist) and then poll the histories for each track. So, that's the workaround for your use case. We don't currently plan to offer that as a single method.

@hugovk

This comment has been minimized.

Copy link
Member

hugovk commented Mar 7, 2019

I released pylast 3.1.0 this morning which warns about the deprecation and adds the new method.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.