question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing endpoint: get-playlist-cover

See original GitHub issue

Seems to be a missing endpoint/function, unless I just missed it? get-playlist-cover doesn’t seem to be implemented…

https://developer.spotify.com/documentation/web-api/reference/playlists/get-playlist-cover/

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ascolmcommented, Feb 26, 2021

Yes because in the second case you would still be using superagent. The issue is not with the request headers but the response.

Having another dependency just for this call may not be ideal but a workaround could be reusing getPlaylist (if consistency is not a big concern):

getPlaylistCover: function(playlistId, callback) {
    if (!callback) return this.getPlaylist(playlistId).then((data) => data.body.images);
    return this.getPlaylist(playlistId, '_', (err, data) => callback(data.body.images));
  }
0reactions
Deep-Codescommented, Feb 26, 2021
const fetch = require('node-fetch');
let data = fetch(
  'https://api.spotify.com/v1/playlists/37i9dQZF1EMcPEQyqIIrLr/images',
  {
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json',
      Authorization:
        'Bearer <AuthToken>',
    },
  }
)
  .then((res) => res.text())
  .then((body) => console.log(body));

Output:

[ {
  "height" : null,
  "url" : "https://lineup-images.scdn.co/wrapped-2020-top100_LARGE-en.jpg",
  "width" : null
} ]

This doesn’t works.


    getPlaylistCover: function (playlistId, callback) {
    return WebApiRequest.builder(this.getAccessToken())
      .withPath('/v1/playlists/' + playlistId + '/images')
      .withHeaders({ 'Content-Type': 'application/json' , 'Accept': 'application/json', })
      .build()
      .execute(HttpManager.get, callback);
  },

Adding Headers still give Empty Object as Response

Read more comments on GitHub >

github_iconTop Results From Across the Web

DefinitelyTyped/index.d.ts at master · DefinitelyTyped ... - GitHub
the available_markets are missing. ... Get Playlist Cover Image ... https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-users-saved- ...
Read more >
BMBF_technical - ComputerElite/wiki GitHub Wiki
You can always read the api endpoints here (Source Code of BeatON; the project BMBF is based on). ... get Playlist Cover ......
Read more >
Error trying to open up Disk Drive blockin server - Cc-Tweaked ...
Missing endpoint : get-playlist-cover, 5, 2020-12-21, 2022-08-16. javamelody we don't see any ip address,browser,country and user information.user session ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found