To work with Deezer genre objects.

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

Hierarchy (View Summary)

Constructors

Properties

name: string
picture: string
picture_small: string
picture_medium: string
picture_big: string
picture_xl: string
client: Client
_fields: string[]
_fetched: boolean = false
id: number
type: string

Methods

  • Get all artists for a genre.

    Parameters

    • Optionalparams: Record<string, string>

    Returns Promise<Artist[]>

  • Get all radios for a genre.

    Parameters

    • Optionalparams: Record<string, string>

    Returns Promise<Radio[]>

  • 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