Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Teams

Represents the Teams API, this is the main class used to interact with a team

Hierarchy

  • Teams

Index

Constructors

constructor

Properties

Private Readonly client

client: TBAClient

Methods

getTeam

  • getTeam(key: string): Promise<Team>
  • Gets a team by key

    Parameters

    • key: string

      team key, ex: frc121

    Returns Promise<Team>

    a team

getTeamKeys

  • getTeamKeys(page?: number): Promise<string[]>
  • Gets a list team keys

    description

    each page will not have 500 teams, but will include the teams within that range of 500.

    Parameters

    • page: number = 0

      Page number of results to return, zero-indexed

    Returns Promise<string[]>

    array of team keys

getTeamKeysByYear

  • getTeamKeysByYear(year?: string, page?: number): Promise<string[]>
  • Gets a list of Team Keys that competed in the given year

    description

    each page will not have 500 teams, but will include the teams within that range of 500.

    Parameters

    • year: string = ...

      Competition Year (or Season). Must be 4 digits. Defaults to current year

    • page: number = 0

      Page number of results to return, zero-indexed

    Returns Promise<string[]>

    array of team keys

getTeamSimple

  • Gets a short form team (simple team) object by key

    Parameters

    • key: string

      team key, ex: frc121

    Returns Promise<TeamSimple>

    a simple team

getTeams

  • getTeams(page?: number): Promise<Team[]>
  • Gets a list of teams

    Parameters

    • page: number = 0

      Page number of results to return, zero-indexed

    Returns Promise<Team[]>

    array of teams

getTeamsByYear

  • getTeamsByYear(year?: string, page?: number): Promise<Team[]>
  • Gets a list of teams that competed in the given year

    Parameters

    • year: string = ...

      Competition Year (or Season). Must be 4 digits. Defaults to current year

    • page: number = 0

      Page number of results to return, zero-indexed

    Returns Promise<Team[]>

    array of teams

getTeamsByYearSimple

  • getTeamsByYearSimple(year?: string, page?: number): Promise<TeamSimple[]>
  • Gets a list of short form teams (simple teams) that competed in the given year

    Parameters

    • year: string = ...

      Competition Year (or Season). Must be 4 digits. Defaults to current year

    • page: number = 0

      Page number of results to return, zero-indexed

    Returns Promise<TeamSimple[]>

    array of simple teams

getTeamsSimple

  • getTeamsSimple(page?: number): Promise<TeamSimple[]>
  • Gets a list of short form teams (simple teams)

    Parameters

    • page: number = 0

      Page number of results to return, zero-indexed

    Returns Promise<TeamSimple[]>

    array of simple teams

Made by Horyus. Documentation generated by TypeDoc.