spotify-wrapper-leonardo

1.0.4 • Public • Published

Spotify Wrapper

Build Status Coverage Status

Um wrapper para trabalhar com a Spotify Web API

Dependências

Essa biblioteca depende de fetch para fazer requisições a Spotify Web API. Para ambientes que não oferecem suporte à busca, é necessário fornecer um polyfill para navegador ou polyfill para Node.

Instalação

npm install spotify-wrapper-leonardo --save

Como usar

ES6

// importar um método específico
import SpotifyWrapper from 'spotify-wrapper-leonardo';

const spotify = new SpotifyWrapper({
  token: 'SEU_TOKEN_AQUI'
});

// usando o método
spotify.search.artists('Incubus');

CommonJS

const SpotifyWrapper = require('spotify-wrapper-leonardo').default;

const spotify = new SpotifyWrapper({
  token: 'SEU_TOKEN_AQUI'
});

UMD no Browser

<script src="spotify-wrapper.umd.js"></script>

Depois disso, a biblioteca estará disponível para o Global como SpotifyWrapper. Siga um exemplo:

const spotify = new SpotifyWrapper({
  token: 'SEU_TOKEN_AQUI'
});

const albums = spotify.search.albums('Artista escolhido');

Readme

Keywords

none

Package Sidebar

Install

npm i spotify-wrapper-leonardo

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

10.3 kB

Total Files

8

Last publish

Collaborators

  • leonardocamargo31