Skip to content

getPlaylistInfo

LakhindarPal edited this page May 12, 2024 · 2 revisions

Method: getPlaylistInfo()

getPlaylistInfo(playlistId, countryCode?): Promise<Playlist>

Retrieves playlist information based on the provided playlist ID and country code.

Parameters

  • playlistId: string

The ID of the playlist.

  • countryCode?: string= "US"

The country code to use for retrieving the playlist information. Defaults to "US".

Returns

Promise<Playlist>

A promise that resolves to a Playlist object containing the playlist information.

Usage

const { getPlaylistInfo } = require("tidal-music-api");

// example playlist ID
const id = "3f9b1e8b-6802-4c98-be40-365bb0c7afee";

try {
  const info = await getPlaylistInfo(id);
  console.log(info);
} catch (error) {
  console.error("Error:", error);
}
Clone this wiki locally