Skip to content

getAlbumInfo

LakhindarPal edited this page May 12, 2024 · 2 revisions

Method: getAlbumInfo()

getAlbumInfo(albumId, countryCode?): Promise<Album>

Retrieves album information from the Tidal API based on the provided album ID and country code.

Parameters

  • albumId: number

The ID of the album.

  • countryCode?: string= "US"

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

Returns

Promise<Album>

A promise that resolves to an Album object containing the album information.

Usage

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

// example album ID
const id = 230064409;

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