🎶Spotify
Classes
Functions
setProgressBar(type, color) ⇒ Spotify
Set progress bar details
Set title
Establecer imagen
Set the name of the artist
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
Example
setProgressBar(type, color) ⇒ Spotify
Spotify
Set progress bar details
Kind: global function
Returns: Spotify
- The current instance of Spotify
Throws:
APIError
Invalid progress bar type
type
"TRACK"
| "BAR"
Type of progress bar
color
string
Color of the progress bar
setTitle(title) ⇒ Spotify
Spotify
Set title
Kind: global function
Returns: Spotify
- The current instance of Spotify
Throws:
APIError
Title expected but not received
title
string
Title of the song
setImage(source) ⇒ Spotify
Spotify
Establecer imagen
Kind: global function
Returns: Spotify
- The current instance of Spotify
Throws:
APIError
Image source expected but not received
source
string
| Buffer
| Canvas.Image
Fuente de imagen
setAuthor(name) ⇒ Spotify
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
name
string
Name of the artist
setAlbum(name) ⇒ Spotify
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
name
string
Name of the album
setStartTimestamp(time) ⇒ Spotify
Spotify
Set start timestamp
Kind: global function
Returns: Spotify
- The current instance of Spotify
Throws:
APIError
Timestamp expected but not received
time
Date
| number
Timestamp
setEndTimestamp(time) ⇒ Spotify
Spotify
Set end timestamp
Kind: global function
Returns: Spotify
- The current instance of Spotify
Throws:
APIError
Timestamp expected but not received
time
Date
| number
Timestamp
setBackground(type, data) ⇒ Spotify
Spotify
Set background image/color of the card
Kind: global function
Returns: Spotify
- The current instance of Spotify
Throws:
APIError
Missing background data
type
"COLOR"
| "IMAGE"
Type of background
data
string
| Buffer
| Canvas.Image
Image URL or HTML color code
build([font]) ⇒ Promise.<Buffer>
Promise.<Buffer>
Build the Spotify presence card
Kind: global function
Returns: Promise.<Buffer>
- Card image in buffer format
Throws:
APIError
Missing of options
[font]
string
""Arial""
Font to use in the card
Last updated