Class Twitch

Classdesc

Twitch Class, which handles all relevant statistical endpoints from the Twitch API

Param

Twitch Client ID from Developer Portal

Param

Twitch Client Secret from Developer Portal

Hierarchy

  • Twitch

Constructors

Properties

client: string
secret: string

Methods

  • It gets the channel info of a user

    Async

    Returns

    An object with the channel info.

    Parameters

    • id: string | void

      The channel ID of the channel you want to get the info of.

    Returns Promise<any>

  • It gets a token from the Twitch API.

    Async

    Returns

    The access token.

    Returns Promise<any>

  • It gets a user's information by their ID

    Async

    Returns

    An object with the user's information.

    Parameters

    • id: string | void

      The user's ID.

    Returns Promise<any>

  • It gets the user's information by their username

    Async

    Returns

    The user's information.

    Parameters

    • username: string

      The username of the user you want to get the info of.

    Returns Promise<any>

  • Private

    It takes a URL, gets an access token, and then makes a GET request to the URL with the access token.

    Async

    Returns

    The data from the API call.

    Parameters

    • url: string

      The URL of the API endpoint you want to access.

    Returns Promise<any>

  • It searches for a channel by username and returns the first result.

    Async

    Returns

    An object with the channel information.

    Parameters

    • username: string | void

      The username of the channel you want to get the information of.

    Returns Promise<any>

Generated using TypeDoc