🎶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
Param | Type | Description |
---|---|---|
type |
| Type of progress bar |
color |
| 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
Param | Type | Description |
---|---|---|
title |
| 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
Param | Type | Description |
---|---|---|
source |
| 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
Param | Type | Description |
---|---|---|
name |
| 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
Param | Type | Description |
---|---|---|
name |
| 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
Param | Type | Description |
---|---|---|
time |
| 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
Param | Type | Description |
---|---|---|
time |
| 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
Param | Type | Description |
---|---|---|
type |
| Type of background |
data |
| 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
Param | Type | Default | Description |
---|---|---|---|
[font] |
|
| Font to use in the card |
Last updated