Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SpotifyApi
    • default

Index

Constructors

constructor

  • new default(auth: IAuth): default

Properties

nextTokenRefreshTime

nextTokenRefreshTime: Date

Methods

checkCredentials

  • checkCredentials(): Promise<void>
  • Returns Promise<void>

downloadAlbum

  • downloadAlbum(url: string): Promise<(string | Buffer)[]>
  • Downloads the tracks of a Album

    Parameters

    • url: string

      URL of the Album

    Returns Promise<(string | Buffer)[]>

    Promise<(string|Buffer)[]>

downloadPlaylist

  • downloadPlaylist(url: string): Promise<(string | Buffer)[]>
  • Downloads the tracks of a playlist

    Parameters

    • url: string

      URL of the playlist

    Returns Promise<(string | Buffer)[]>

    Promise<(string|Buffer)[]>

downloadTrack

  • downloadTrack<T>(url: string, filename?: T): Promise<T extends undefined ? Buffer : string>
  • Downloads the given spotify track

    Type parameters

    • T: undefined | string

    Parameters

    • url: string

      Url to download

    • Optional filename: T

      file to save to

    Returns Promise<T extends undefined ? Buffer : string>

    buffer if no filename is provided and string if it is

downloadTrackFromInfo

  • downloadTrackFromInfo(info: default): Promise<Buffer>
  • Gets the Buffer of track from the info

    Parameters

    • info: default

      info of the track got from spotify.getTrack()

    Returns Promise<Buffer>

extractAlbum

  • extractAlbum(albumId: string): Promise<default>
  • Parameters

    • albumId: string

    Returns Promise<default>

extractArtist

  • extractArtist(artistId: string): Promise<default>
  • Parameters

    • artistId: string

    Returns Promise<default>

extractArtistAlbums

  • extractArtistAlbums(artistId: string): Promise<AlbumObjectSimplified[]>
  • Parameters

    • artistId: string

    Returns Promise<AlbumObjectSimplified[]>

extractPlaylist

  • extractPlaylist(playlistId: string): Promise<default>
  • Parameters

    • playlistId: string

    Returns Promise<default>

extractTrack

  • extractTrack(trackId: string): Promise<default>
  • Parameters

    • trackId: string

    Returns Promise<default>

getAlbum

  • getAlbum(url: string): Promise<default>
  • Gets the info the given album URL

    Parameters

    • url: string

    Returns Promise<default>

    Album

getArtist

  • getArtist(url: string): Promise<default>
  • Gets the info of the given Artist URL

    Parameters

    • url: string

    Returns Promise<default>

    Artist

getArtistAlbums

  • getArtistAlbums(url: string): Promise<{ albums: default[]; artist: default }>
  • Gets the list of albums from the given Artists URL

    Parameters

    • url: string

    Returns Promise<{ albums: default[]; artist: default }>

    Albums

getID

  • getID(url: string): string

getPlaylist

  • getPlaylist(url: string): Promise<default>
  • Gets the playlist info from URL

    Parameters

    • url: string

      URL of the playlist

    Returns Promise<default>

getTrack

  • getTrack(url: string): Promise<default>
  • Get the track details of the given track URL

    Parameters

    • url: string

    Returns Promise<default>

    Track

getTracksFromAlbum

  • getTracksFromAlbum(url: string): Promise<{ name: string; total_tracks: number; tracks: default[] }>
  • Gets the info of tracks from Album URL

    Parameters

    • url: string

      URL of the playlist

    Returns Promise<{ name: string; total_tracks: number; tracks: default[] }>

getTracksFromPlaylist

  • getTracksFromPlaylist(url: string): Promise<{ name: string; total_tracks: number; tracks: default[] }>
  • Gets the info of tracks from playlist URL

    Parameters

    • url: string

      URL of the playlist

    Returns Promise<{ name: string; total_tracks: number; tracks: default[] }>

refreshToken

  • refreshToken(): Promise<void>
  • Returns Promise<void>

requestTokens

  • requestTokens(): Promise<void>
  • Returns Promise<void>

verifyCredentials

  • verifyCredentials(): Promise<void>
  • Returns Promise<void>

Generated using TypeDoc