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

    Class Event

    A single event in a Day (a release, a recommendation, a promotion, …).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    albums?: AlbumEvent[]

    Album sub-events featured in the event.

    artists?: ArtistEvent[]

    Artist sub-events featured in the event.

    background?: JSONValue

    Background descriptor (raw JSON, promotion events).

    category?: string

    Promotion category.

    client?: Client

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

    description?: string

    Event description.

    device?: JSONValue

    Device descriptor (raw JSON).

    genre?: string

    Associated genre.

    heading?: string

    Promotion heading.

    id?: string

    Event id.

    imagePosition?: string

    Image position hint.

    message?: JSONValue

    Free-form message blocks (raw JSON).

    promoId?: string

    Promotion id.

    promotionType?: string

    Promotion type.

    startDate?: string

    Promotion start date.

    subtitle?: string

    Event subtitle.

    subtitleUrl?: string

    Subtitle link URL.

    tags?: JSONValue

    Event tags (raw JSON).

    title?: string

    Event title.

    titleUrl?: string

    Title link URL.

    tracks?: Track[]

    Tracks featured in the event.

    tracksCount?: number

    Number of tracks in the event.

    type?: string

    Event type.

    typeForFrom?: string

    Origin tag used in from parameters.

    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.