TwurpleAuthenticationGetting dataExamplesFAQMigration

Main classes

HelixTeamApi

The Helix API methods that deal with teams.

Overview

Can be accessed using client.teams on an ApiClient instance.

Example

const api = new ApiClient({ authProvider });
const tags = await api.teams.getChannelTeams('125328655');

Methods

getTeamById(id)

async

Gets a team by ID.

Returns null if there is no team with the given ID.

ParameterTypeRequiredDefaultDescription
idstringnone

The ID of the team.

Return type: HelixTeamWithUsers | null

getTeamByName(name)

async

Gets a team by name.

Returns null if there is no team with the given name.

ParameterTypeRequiredDefaultDescription
namestringnone

The name of the team.

Return type: HelixTeamWithUsers | null

getTeamsForBroadcaster(broadcaster)

async

Gets a list of all teams a broadcaster is a member of.

ParameterTypeRequiredDefaultDescription
broadcaster
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The broadcaster to get the teams of.

Return type: HelixTeam[]