@dvxch/yandex-music
    Preparing search index...

    Class Genre

    A music genre, possibly containing sub-genres.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    client?: Client

    The client that created this model, used by convenience methods.

    color?: string

    Accent color.

    composerTop?: boolean

    Whether composers are highlighted for this genre.

    fullTitle?: string

    Full title.

    hideInRegions?: number[]

    Region codes where hidden.

    id?: string

    Genre id.

    images?: JSONValue

    Genre images (raw JSON, pending a typed model).

    radioIcon?: Icon

    Radio icon.

    showInMenu?: boolean

    Whether shown in the genre menu.

    showInRegions?: number[]

    Region codes where shown.

    subGenres?: Genre[]

    Nested sub-genres.

    title?: string

    Default title.

    titles?: Record<string, GenreTitle>

    Localized titles keyed by language code (ru, en, …).

    urlPart?: string

    URL slug.

    weight?: number

    Sorting weight.

    Methods

    • Assert that this model carries a client, returning it narrowed to non-null.

      Convenience methods that need to call the API use this to fail fast with a clear message instead of a generic "cannot read property of undefined".

      Returns Client

      The owning Client.

      When the model was created without a client.