To work with Deezer track objects.

the Deezer Track API Documentation for more details about each field.

Hierarchy (View Summary)

Constructors

Properties

client: Client
_fields: string[]
_fetched: boolean = false
id: number
type: string
readable: boolean
title: string
title_short: string
title_version: string
unseen?: boolean
isrc?: string
link?: string
share?: string
duration: number
track_position?: number
disk_number?: number
rank: number
release_date?: null | Date
explicit_lyrics: boolean
explicit_content_lyrics: number
explicit_content_cover: number
preview: string
bpm?: number
gain?: number
available_countries?: string[]
alternative?: Track
contributors?: Artist[]
md5_image: string
artist: Artist
album: Album

Methods

  • Type Parameters

    • T

    Parameters

    • relation: string
    • OptionalresourceType: new (client: Client, json: Record<string, any>) => Resource
    • Optionalparams: Record<string, string>
    • fwdParent: boolean = true

    Returns Promise<T>

  • Ensures a field is loaded, fetching the full resource if necessary.

    Type Parameters

    • T

    Parameters

    • fieldName: string

      The name of the field to ensure

    Returns Promise<T>

    The value of the field

    Error if the field cannot be loaded