🎶Spotify

Classes

Spotify

Functions

setProgressBar(type, color)Spotify

Set progress bar details

setTitle(title)Spotify

Set title

setImage(source)Spotify

Establecer imagen

setAuthor(name)Spotify

Set the name of the artist

setAlbum(name)Spotify

Set the name of the album

setStartTimestamp(time)Spotify

Set start timestamp

setEndTimestamp(time)Spotify

Set end timestamp

setBackground(type, data)Spotify

Set background image/color of the card

build([font])Promise.<Buffer>

Build the Spotify presence card

Spotify

Kind: global class

new Spotify()

Spotify card creator

PREVIEW

Example

const spotify = new canvacard.Spotify()
  .setAuthor("SAIKO")
  .setAlbum("SAKURA 👋")
  .setStartTimestamp(Date.now() - 10000)
  .setEndTimestamp(Date.now() + 50000)
  .setImage("https://i.scdn.co/image/ab67616d00001e02e346fc6f767ca2ac8365fe60")
  .setTitle("YO LO SOÑÉ");
const spotifyImage = await spotify.build("Cascadia Code PL");
canvacard.write(spotifyImage, "./spotify.png");

setProgressBar(type, color) ⇒ Spotify

Set progress bar details

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Invalid progress bar type

setTitle(title) ⇒ Spotify

Set title

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Title expected but not received

setImage(source) ⇒ Spotify

Establecer imagen

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Image source expected but not received

setAuthor(name) ⇒ Spotify

Set the name of the artist

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Artist name expected but not received

setAlbum(name) ⇒ Spotify

Set the name of the album

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Album name expected but not received

setStartTimestamp(time) ⇒ Spotify

Set start timestamp

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Timestamp expected but not received

setEndTimestamp(time) ⇒ Spotify

Set end timestamp

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Timestamp expected but not received

setBackground(type, data) ⇒ Spotify

Set background image/color of the card

Kind: global function Returns: Spotify - The current instance of Spotify Throws:

  • APIError Missing background data

build([font]) ⇒ Promise.<Buffer>

Build the Spotify presence card

Kind: global function Returns: Promise.<Buffer> - Card image in buffer format Throws:

  • APIError Missing of options

Last updated