tba-api

Simple Node API for The Blue Alliance

Usage no npm install needed!

<script type="module">
  import tbaApi from 'https://cdn.skypack.dev/tba-api';
</script>

README

tba-api-node

Simple Node API Library for The Blue Alliance

Usage

Installation

npm install tba-api

Headers

The Blue Alliance API V2 requires users to identify with a username, app description, and app version. The authentication can be read about in more detail here. Authentication using this library is simple:

const tba = require('tba-api');

tba.initHeaders(username, app_description, app_version)

For example:

const tba = require('tba-api');

tba.initHeaders('astronautlevel', 'tba-api-test-app', 'v0.0.1')

Method Overview

Team Requests

Team List Request

getTeamList(pageNum, callback)

Team Request

getTeam(teamNum, callback)

Team Events

getTeamEvents(teamNum[, year], callback)

Team Event Awards

getTeamEventAwards(teamNum, eventCode, callback)

Team Event Matches

getTeamEventMatches(teamNum, eventCode, callback)

Team Years Participated

getYearsParticipated(teamNum, callback)

Team Media

getTeamMedia(teamNum[, year], callback)

Team Event History

getTeamEventHistory(teamNum, callback)

Team Award History

getTeamAwardHistory(teamNum, callback)

Team Robot History

getTeamRobotHistory(teamNum, callback)

Team District History

getTeamDistrictHistory(teamNum, callback)

Event Requests

Event List

getEventList(year, callback)

Event details

getEvent(eventCode, callback)

Event Teams

getEventTeams(eventCode, callback)

Event Matches

getEventMatches(eventCode, callback)

Event Stats

getEventStats(eventCode, callback)

Event Rankings

getEventRankings(eventCode, callback)

Event Awards

getEventAwards(eventCode, callback)

Event District Points

getEventDistrictPoints(eventCode, callback)

Match Requests

Single Match Request

getSingleMatch(matchKey, callback)

District Requests

District List Request

getDistrictList(year, callback)

District Events Request

getDistrictEvents(district, year, callback)

District Rankings Request

getDistrictRankings(district, year, callback)

District Teams Request

getDistrictTeams(district, year, callback)