A Robot Events API client.
Node.js 16.0.0 or newer is required.
npm install @robotevents/client
yarn add @robotevents/client
pnpm add @robotevents/client
Obtain a team from the Robot Events API:
import {ProgramId, RobotEventsClient} from '@robotevents/client';
const robotEventsClient = new RobotEventsClient({
token: process.env.ROBOT_EVENTS_TOKEN,
});
const teams = await robotEventsClient.teams
.findAll(_ => _.programIds(ProgramId.VRC).numbers('24C'))
.toArray();
if (teams.length) {
console.log(teams[0]);
} else {
console.log('Team not found');
}