You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the API is simple. Just create an instance of the API class, passing in your auth key and the name of your app.
From there, call any of the methods to retrieve the data from the API.
All the requests will return a Promise of the model.
import{API}from"@the-orange-alliance/api";// OR const { API } = require("@the-orange-alliance/api")consttoa=newAPI("YOUR_AUTH_KEY_HERE","Name your app");constevent=awaittoa.getEvent("1920-FIM-KFQ");console.log(event.eventName);// ORtoa.getEvent("1920-FIM-KFQ").then(event=>{console.log(event.eventName);});
API Key
Generate your API Key on your myTOA Account Dashboard.
Use that key in the initialization for your API object.