@iamtraction/play-dl
    Preparing search index...

    Class DeezerPlaylist

    Class for Deezer Playlists

    Index
    collaborative?: boolean

    Whether multiple users have worked on the playlist

    undefined for partial playlists

    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

    durationInSec?: number

    Duration of the playlist in seconds

    undefined for partial playlists

    fans?: number

    The number of fans the playlist has

    undefined for partial playlists

    id: number

    The id of the playlist

    isLoved?: boolean

    true if the playlist is the loved tracks playlist

    undefined for partial playlists

    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

    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

    • 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

    • Converts instances of this class to JSON data

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

      JSON data.