Hierarchy

  • TwitterAuth

Implemented by

Properties

fetch: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: string | Request | URL
      • Optional init: RequestInit

      Returns Promise<Response>

Methods

  • Returns the time that authentication was performed.

    Returns null | Date

    The time at which the authentication token was created, or null if it hasn't been created yet.

  • Returns the current cookie jar.

    Returns CookieJar

  • Deletes the current guest token token.

    Returns void

  • Returns if the authentication state has a token.

    Returns boolean

    true if the authentication state has a token; false otherwise.

  • Installs the authentication information into a headers-like object. If needed, the authentication token will be updated from the API automatically.

    Parameters

    • headers: Headers$1

      A Headers instance representing a request's headers.

    • url: string

    Returns Promise<void>

  • Returns if a user is logged-in to Twitter through this instance.

    Returns Promise<boolean>

    true if a user is logged-in; otherwise false.

  • Logs into a Twitter account.

    Parameters

    • username: string

      The username to log in with.

    • password: string

      The password to log in with.

    • Optional email: string

      The email to log in with, if you have email confirmation enabled.

    • Optional twoFactorSecret: string

      The secret to generate two factor authentication tokens with, if you have two factor authentication enabled.

    Returns Promise<void>

  • Logs out of the current session.

    Returns Promise<void>