You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added New Show and Episode Endpoints
* Add tests, typescript, general clean up after addition of shows and episodes
Co-authored-by: Andrew Young <[email protected]>
The promises also expose an `abort` method that aborts the XMLHttpRequest. This is useful to cancel
151
153
requests that were made earlier and could be resolved out-of-sync:
152
154
153
-
```javascript
155
+
```js
154
156
var prev =null;
155
157
156
158
functiononUserInput(queryTerm) {
@@ -177,7 +179,7 @@ function onUserInput(queryTerm) {
177
179
178
180
The functions that fetch data from the API support also an optional JSON object with a set of options, such as the ones regarding pagination. These options will be sent as query parameters:
179
181
180
-
```javascript
182
+
```js
181
183
// passing a callback - get Elvis' albums in range [20...29]
182
184
spotifyApi.getArtistAlbums(
183
185
'43ZHCT0cAZBISjO8DG9PnE',
@@ -207,7 +209,7 @@ _Note: The following examples use Promises/Q/when as the return object._
207
209
208
210
Here you can see more examples of the usage of this wrapper:
When you need to make multiple calls to get some dataset, you can take advantage of the Promises to get a cleaner code:
287
289
288
-
```javascript
290
+
```js
289
291
// track detail information for album tracks
290
292
spotifyApi
291
293
.getAlbum('5U4W9E5WsYb2jUQWePT8Xm')
@@ -324,7 +326,7 @@ spotifyApi
324
326
325
327
In order to get user's information you need to request a user-signed access token, from either the Implicit Grant or Authorization Code flow. Say for instance you want to get user's playlists. Once you get an access token, set it and fetch the data:
0 commit comments