spotify-wrapper-web
v1.0.1
Published
A wrapper to work with the Spotify Web API
Downloads
1
Readme
spotify-wrapper
A wrapper to work with the follow API:
Browser Support
This library relies on Fetch API. And this project is supported in the following browsers:
| | | | | --- | --- | --- | --- | --- | 39+ | 42+ | 29+ | 10.1+ | Nope |
Dependencies
This library depends on fetch to make requests to the Spotify Web API. For environments that don't support fetch, you'll need to provide a polyfill to browser or polyfill to Node.
Installation
$ npm install spotify-wrapper-web --save
How to use
ES6
// To import a specific method
import { method } from 'spotify-wrapper-web';
// To import everything
import * as spotifyWrapperWeb from 'spotify-wrapper-web';
CommonJS
var spotifyWrapperWeb = require('spotify-wrapper-web');
UMD in Browser
<!-- To import non-minified version -->
<script src="spotify-wrapper.umd.js"></script>
<!-- To import minified version -->
<script src="spotify-wrapper.umd.min.js"></script>
After that the library will be available to the Global as SpotifyWrapper
.
Follow as example:
const spotify = new SpotifyWrapper({
token: 'YOUR_TOKEN_HERE'
});
const albums = spotify.search.albums('Choosen Artist');