Hierarchy

  • default

Constructors

  • Parameters

    • Optional clientID: string

    Returns default

Properties

clientID: string = 'kimne78kx3ncx6brgo4mv6wki5h1ko'
endpoint: string = 'https://gql.twitch.tv/gql'

Methods

  • Fetches a twitch game and returns its info, null if not found.

    Returns

    Parameters

    • name: string

      The name of the game. Eg Rocket League.

    Returns Promise<TwitchGame>

  • Fetches the trending Twitch Feed, null or undefined if not found

    Returns

    Parameters

    • limit: number

      The amount of posts to fetch.

    Returns Promise<undefined | null | NodeStream[]>

  • Fetches a twitch user and returns their info and streaming status, if there is no user it will return null.

    Returns

    Parameters

    • userID: string

      The Twitch ID of the user you want to fetch.

    Returns Promise<null | TwitchUser>

  • Fetches a twitch user by their username and returns their info and streaming status, if there is no user it will return null.

    Returns

    Parameters

    • username: string

      The Twitch ID of the user you want to fetch.

    Returns Promise<null | TwitchUser>

  • Request Twitch Data

    Returns

    Parameters

    • schema: string

      The GQL Schema

    • variables: object

      The variables needed for the request

    Returns Promise<TwitchResponse>

Generated using TypeDoc