diff --git a/exportify.js b/exportify.js index a026f95..99f8ed0 100644 --- a/exportify.js +++ b/exportify.js @@ -40,7 +40,7 @@ window.Helpers = { alert(jqXHR.responseText); } }) - } + }, } var PlaylistTable = React.createClass({ @@ -49,7 +49,7 @@ var PlaylistTable = React.createClass({ playlists: [], playlistCount: 0, nextURL: null, - prevURL: null + prevURL: null, }; }, @@ -68,7 +68,7 @@ var PlaylistTable = React.createClass({ this.props.access_token ), window.Helpers.apiCall( - "https://api.spotify.com/v1/users/" + userId + "/playlists", + "https://api.spotify.com/v1/users/" + userId + "/playlists?limit=50", this.props.access_token ) ]) @@ -91,6 +91,7 @@ var PlaylistTable = React.createClass({ this.setState({ playlists: playlists, playlistCount: response.total, + playlistOffset: response.offset, nextURL: response.next, prevURL: response.previous }); @@ -102,7 +103,7 @@ var PlaylistTable = React.createClass({ }, exportPlaylists: function() { - PlaylistsExporter.export(this.props.access_token, this.state.playlistCount); + PlaylistsExporter.export(this.props.access_token, this.state.playlistOffset); }, componentDidMount: function() { @@ -123,7 +124,7 @@ var PlaylistTable = React.createClass({