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

    Class DeviceCode

    The device/user code pair issued at the start of the OAuth Device Flow.

    Show DeviceCode.userCode to the user and direct them to DeviceCode.verificationUrl; meanwhile poll with DeviceCode.deviceCode.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    client?: Client

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

    deviceCode?: string

    Code used when polling for the token.

    expiresIn?: number

    Lifetime of the codes in seconds.

    interval?: number

    Recommended polling interval in seconds.

    userCode?: string

    Code the user enters at the verification URL.

    verificationUrl?: string

    URL the user visits to confirm the login.

    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.