Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LavasfyClient

Hierarchy

  • LavasfyClient

Index

Constructors

constructor

Properties

Readonly baseURL

baseURL: string

Spotify API base URL

Private Optional nextRequest

nextRequest: Timeout

nodes

nodes: Map<string, Node> = ...

The Nodes are stored here

options

options: Readonly<ClientOptions>

The provided options when the class was instantiated

Readonly spotifyPattern

spotifyPattern: RegExp

A RegExp that will be used for validate and parse URLs

Readonly token

token: null | string

The token to access the Spotify API

Methods

addNode

getNode

  • getNode(): Node
  • getNode(id: string): undefined | Node

isValidURL

  • isValidURL(url: string): boolean
  • Determine the URL is a valid Spotify URL or not

    Parameters

    • url: string

    Returns boolean

removeNode

  • removeNode(id: string): boolean
  • Parameters

    • id: string

    Returns boolean

requestToken

  • requestToken(): Promise<void>
  • A method to retrieve the Spotify API token. (this method only needs to be invoked once after the LavasfyClient instantiated)

    Returns Promise<void>

Generated using TypeDoc