Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dersimn/spotify-web-api-tools
https://github.com/dersimn/spotify-web-api-tools
Last synced: about 13 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/dersimn/spotify-web-api-tools
- Owner: dersimn
- Created: 2021-03-13T10:06:28.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T11:27:37.000Z (over 3 years ago)
- Last Synced: 2024-10-12T05:55:23.371Z (about 1 month ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tools for [spotify-web-api-node](https://github.com/thelinmichael/spotify-web-api-node) to make life easier. See [`/examples`](/examples) for examples.
## tl;dr
```javascript
import SpotifyWebApi from 'spotify-web-api-node';
import SpotifyWebApiTools from 'spotify-web-api-tools';const spotifyApi = new SpotifyWebApi();
const swat = new SpotifyWebApiTools(spotifyApi);spotifyApi.setAccessToken(process.env.SPOTIFY_ACCESS_TOKEN);
(async () => {
const playlistArray = await swat.getAllUserPlaylists();const playlistNames = playlistArray.map(p => p.name);
console.log(playlistNames);
})().catch(error => {
console.error(error);
});
```