Spotify

Spotify

Main client

Constructor

new Spotify(clientID, clientSecret)

Creates a new spotify instance
Source:
Parameters:
Name Type Description
clientID String spotify client id
clientSecret String spotify client sercret

Methods

(async) getToken()

Attempts to log the client in and obtain a token
Source:
Returns:
object promise with access token, token type and expires in

(async) login()

Gets initial tokens and create a refresh timer
Source:
Returns:
void

makeRequest(url)

Makes a request to the api
Source:
Parameters:
Name Type Description
url String
Returns:
Promise
Searches Spotify API
Source:
Parameters:
Name Type Description
q String the search query
limit Number max number of results to return; default: 20, min: 1, max: 50; *LIMIT IS APPLIED FOR EACH TYPE, NOT TOTAL RESPONSE*
type Array list of types to search for