Git Product home page Git Product logo

Comments (2)

JMPerez avatar JMPerez commented on July 30, 2024

@timseverien Thanks for a very well written bug report!

In your "Test code", I assume you are calling spotifyApi.getPlaylistTracks() and not spotifyApi.getPlaylist().

I have tried with a small example, same environment as yours, and I'm not able to reproduce the issue:

var spotifyApi = new SpotifyWebApi({
  clientId : '<something>',
  clientSecret : '<something>'
});

spotifyApi.clientCredentialsGrant()
  .then(function(data) {
    spotifyApi.setAccessToken(data.body['access_token']);
    return spotifyApi.getPlaylistTracks('jmperezperez', '6pasABEDetvB8I2vh9avye', {
      offset: 5,
      limit: 10
    });
  }).then(function(data) {
    console.log(data.body);
  }).catch(function(err) {
    console.log('Unfortunately, something has gone wrong.', err.message);
  });

When run, this is the output it generates:

{ href: 'https://api.spotify.com/v1/users/jmperezperez/playlists/6pasABEDetvB8I2vh9avye/tracks?offset=5&limit=10',
  items:
   [ { added_at: '2016-08-15T14:49:51Z',
       added_by: [Object],
       is_local: false,
       track: [Object] },
      ...
     { added_at: '2016-08-15T14:49:51Z',
       added_by: [Object],
       is_local: false,
       track: [Object] } ],
  limit: 10,
  next: 'https://api.spotify.com/v1/users/jmperezperez/playlists/6pasABEDetvB8I2vh9avye/tracks?offset=15&limit=10',
  offset: 5,
  previous: 'https://api.spotify.com/v1/users/jmperezperez/playlists/6pasABEDetvB8I2vh9avye/tracks?offset=0&limit=5',
  total: 25 }

The href, next and previous are correct. Would you mind double checking or providing a simple code snippet that we can run to try to find out what is happening?

from spotify-web-api-node.

JMPerez avatar JMPerez commented on July 30, 2024

I'm closing this issue for now since it doesn't seem to be a bug. Feel free to reopen it.

from spotify-web-api-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.