0.3.0 • Published 7 years ago

superplayer v0.3.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Superplayer

API do superplayer para NodeJS.

Instalação

npm i superplayer --save

Exemplo de uso

const Superplayer = require('superplayer');
const superplayer = new Superplayer();

// Listando as faixas de uma playlist
superplayer.play('50th-summer-of-love')
  .then(tracks => console.log(tracks))
  .catch(error => console.error(error));

A resposta deste método será um array com as faixas da playlist.

[{
  "type": "song",
  "key": "2d3e24f7f8db4c491b2e178357a113f6",
  "name": "Paper Sun",
  "artist": "Traffic",
  "album": "Total 60s",
  "art": "https://content01.superplayer.fm/umg/7/0/total-60s_medium.jpeg",
  "thumb": "https://content01.superplayer.fm/umg/7/0/total-60s_thumb.jpeg",
  "media": "https://content01.superplayer.fm/umg/5/b/8bc068794d53744438aab833758736ffab791b1b.mp3?st=SJswnneI4-TzARM_VXENWA&e=1517191686",
  "length": "03:27",
  "duration": 207,
  "source": {
      "type": "playlist",
      "key": "50th-summer-of-love"
  }
}, ...]

Métodos

MétodoDescrição
play('playlist-key')Lista as faixas de uma playlist.
filters()Lista de filtros e suas playlists.
categories()Lista de categorias e suas playlists.

Licença

MIT

0.3.0

7 years ago

0.0.1

8 years ago