0

For example, Playlists API:

Use the playlist.fetch method call to fetch XSPF playlists. XSPF is a web standard for sharable playlists, and XSPF libraries are available in several languages. playlist.fetch takes a 'lastfm' protocol URL as an argument; this identifies the playlist you're requesting. The following protocol url schemes are currently supported:

Album Playlists: lastfm://playlist/album/<album_id>
User Playlists: lastfm://playlist/<playlist_id>
Tag Playlists: lastfm://playlist/tag/<tag_name>/freetracks

How to send request with playlist.fetch? I can't understand what is 'lastfm' protocol? How to use it?

Example playlist:

https://www.last.fm/ru/user/RJ/playlists/2615079
Viewed
  • 1,159
  • 3
  • 16
  • 43
  • Your examples *show you the protocol*, as well as describing it: `lastfm:`. In your case the URL would be `"lastfm://playlist/2615079"` – jonrsharpe Aug 23 '20 at 09:07
  • @jonrsharpe and what do with it? – Viewed Aug 23 '20 at 09:08
  • What do you mean? Pass it to playlist.fetch, presumably. – jonrsharpe Aug 23 '20 at 09:09
  • @jonrsharpe how to pass this param `lastfm://playlist/2615079`? For example, 404 error: `fetch('https://www.last.fm/api/show/playlist.fetch?' + 'lastfm://playlist/2615079')` – Viewed Aug 23 '20 at 09:18
  • I don't know, I assumed playlist.fetch was a *method* not part of a URL. Maybe look elsewhere in the API docs to see how to structure the requests. – jonrsharpe Aug 23 '20 at 09:19
  • @jonrsharpe this url `https://www.last.fm/api/show/playlist.fetch` shows after click `playlist.fetch method`. Other way `http://ws.audioscrobbler.com/2.0/?method=playlist.fetch&user=rj&api_key=YOUR_API_KEY&format=json` - error `No method with that name in this package`. – Viewed Aug 23 '20 at 09:21
  • The Playlists API is now deprecated, cf. https://www.last.fm/api/playlists – jmizv Jun 30 '23 at 09:57

0 Answers0