Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SpotifyPlaylist

Spotify Playlist Class

Hierarchy

  • SpotifyPlaylist

Index

Constructors

Properties

collaborative: boolean

Spotify Playlist collaborative boolean.

description: string

Spotify Playlist Description

fetched_tracks: Map<string, SpotifyTrack[]>

Spotify Playlist fetched tracks Map

id: string

Spotify Playlist ID

name: string

Spotify Playlist Name

Spotify Playlist Owner Artist data

search: boolean

Boolean to tell whether it is a searched result or not.

spotifyData: SpotifyDataOptions

Spotify Playlist Spotify data

thumbnail: SpotifyThumbnail

Spotify Playlist Thumbnail Data

tracksCount: number

Spotify Playlist total tracks Count

type: "playlist" | "track" | "album"

Spotify Class type. == "playlist"

url: string

Spotify Playlist URL

Accessors

  • get total_pages(): number
  • get total_tracks(): number
  • Spotify Playlist total no of tracks that have been fetched so far.

    Returns number

Methods

  • Fetches all the tracks in the playlist and returns them

    const playlist = await play.spotify('playlist url')

    const tracks = await playlist.all_tracks()

    Returns Promise<SpotifyTrack[]>

    An array of SpotifyTrack

  • Fetches Spotify Playlist tracks more than 100 tracks.

    For getting all tracks in playlist, see total_pages property.

    Returns Promise<SpotifyPlaylist>

    Playlist Class.

  • Spotify Playlist tracks are divided in pages.

    For example getting data of 101 - 200 videos in a playlist,

    const playlist = await play.spotify('playlist url')

    await playlist.fetch()

    const result = playlist.page(2)

    Parameters

    • num: number

      Page Number

    Returns SpotifyTrack[]

Generated using TypeDoc