JSPM

tba-api

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q23283F
  • License BSD-3-Clause

Simple Node API for The Blue Alliance

Package Exports

  • tba-api

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tba-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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)