Options
All
  • Public
  • Public/Protected
  • All
Menu

Spotify Album Class

Hierarchy

  • SpotifyAlbum

Index

Constructors

constructor

Properties

artists

artists: SpotifyArtists[]

Spotify Album artists [ array ]

copyrights

copyrights: SpotifyCopyright[]

Spotify Album copyright data [ array ]

Private fetched_tracks

fetched_tracks: <internal>.Map<string, SpotifyTrack[]>

Spotify Album fetched tracks Map

id

id: string

Spotify Album id

name

name: string

Spotify Album Name

release_date

release_date: string

Spotify Album Release date

release_date_precision

release_date_precision: string

Spotify Album Release Date precise

Private spotifyData

spotifyData: SpotifyDataOptions

Spotify Album Spotify data

thumbnail

thumbnail: SpotifyThumbnail

Spotify Album Thumbnail data

tracksCount

tracksCount: number

Spotify Album total no of tracks

type

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

Spotify Class type. == "album"

url

url: string

Spotify Album url

Accessors

total_pages

  • get total_pages(): number
  • Spotify Album total no of pages in a album

    For getting all songs in a album,

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

    await album.fetch()

    const result = []

    for (let i = 0; i <= album.tota_pages; i++) {
    result.push(album.page(i))
    }

    Returns number

total_tracks

  • get total_tracks(): number

Methods

fetch

page

  • Spotify Album tracks are divided in pages.

    For example getting data of 51 - 100 videos in a album,

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

    await album.fetch()

    const result = album.page(2)

    Parameters

    • num: number

      Page Number

    Returns undefined | SpotifyTrack[]

toJSON

Generated using TypeDoc