Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeezerPlaylist

Class for Deezer Playlists

Hierarchy

  • DeezerPlaylist

Index

Constructors

Properties

collaborative?: boolean

Whether multiple users have worked on the playlist

undefined for partial playlists

see

DeezerPlaylist.partial

creationDate: Date

The date of the playlist's creation

creator: DeezerUser

The Deezer user that created the playlist

description?: string

Description of the playlist

undefined for partial playlists

see

DeezerPlaylist.partial

durationInSec?: number

Duration of the playlist in seconds

undefined for partial playlists

see

DeezerPlaylist.partial

fans?: number

The number of fans the playlist has

undefined for partial playlists

see

DeezerPlaylist.partial

id: number

The id of the playlist

isLoved?: boolean

true if the playlist is the loved tracks playlist

undefined for partial playlists

see

DeezerPlaylist.partial

partial: boolean

Signifies that some properties are not populated

Partial playlists can be populated by calling DeezerPlaylist.fetch.

true for playlists in search results and false if the album was fetched directly or expanded.

picture: DeezerImage

Cover picture of the playlist available in four sizes

public: boolean

Whether the playlist is public or private

title: string

The title of the playlist

tracks: DeezerTrack[]

The list of tracks in the playlist

empty (length === 0) for partial and non public playlists

Use DeezerPlaylist.fetch to populate the tracks and other properties

see

DeezerPlaylist.partial

see

DeezerPlaylist.public

tracksCount: number

The number of tracks in the playlist

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

The type, always 'playlist', useful to determine what the deezer function returned

url: string

The URL of the playlist on Deezer

Methods

  • Fetches all the tracks in the playlist and returns them

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

    const tracks = await playlist.all_tracks()

    Returns Promise<DeezerTrack[]>

    An array of DeezerTrack

  • toJSON(): { collaborative: undefined | boolean; creationDate: Date; creator: DeezerUser; description: undefined | string; durationInSec: undefined | number; fans: undefined | number; id: number; isLoved: undefined | boolean; picture: DeezerImage; public: boolean; title: string; tracks: { album: DeezerTrackAlbum; artist: DeezerArtist; bpm: undefined | number; contributors: undefined | DeezerArtist[]; diskNumber: undefined | number; durationInSec: number; explicit: boolean; gain: undefined | number; id: number; previewURL: string; rank: number; releaseDate: undefined | Date; shortTitle: string; title: string; trackPosition: undefined | number; type: "playlist" | "track" | "album"; url: string }[]; tracksCount: number; type: "playlist" | "track" | "album"; url: string }
  • Converts instances of this class to JSON data

    Returns { collaborative: undefined | boolean; creationDate: Date; creator: DeezerUser; description: undefined | string; durationInSec: undefined | number; fans: undefined | number; id: number; isLoved: undefined | boolean; picture: DeezerImage; public: boolean; title: string; tracks: { album: DeezerTrackAlbum; artist: DeezerArtist; bpm: undefined | number; contributors: undefined | DeezerArtist[]; diskNumber: undefined | number; durationInSec: number; explicit: boolean; gain: undefined | number; id: number; previewURL: string; rank: number; releaseDate: undefined | Date; shortTitle: string; title: string; trackPosition: undefined | number; type: "playlist" | "track" | "album"; url: string }[]; tracksCount: number; type: "playlist" | "track" | "album"; url: string }

    JSON data.

    • collaborative: undefined | boolean
    • creationDate: Date
    • creator: DeezerUser
    • description: undefined | string
    • durationInSec: undefined | number
    • fans: undefined | number
    • id: number
    • isLoved: undefined | boolean
    • picture: DeezerImage
    • public: boolean
    • title: string
    • tracks: { album: DeezerTrackAlbum; artist: DeezerArtist; bpm: undefined | number; contributors: undefined | DeezerArtist[]; diskNumber: undefined | number; durationInSec: number; explicit: boolean; gain: undefined | number; id: number; previewURL: string; rank: number; releaseDate: undefined | Date; shortTitle: string; title: string; trackPosition: undefined | number; type: "playlist" | "track" | "album"; url: string }[]
    • tracksCount: number
    • type: "playlist" | "track" | "album"
    • url: string

Generated using TypeDoc