@brayjamin/tba-api-v3client
v3.9.0
Published
_Overview__Information_and_statistics_about_FIRST_Robotics_Competition_teams_and_events___Authentication_All_endpoints_require_an_Auth_Key_to_be_passed_in_the_header_X_TBA_Auth_Key__If_you_do_not_have_an_auth_key_yet_you_can_obtain_one_from_your__Account_
Downloads
2
Readme
tba-api-v3client
TbaApiV3client - JavaScript client for tba-api-v3client
Overview
Information and statistics about FIRST Robotics Competition teams and events.
Authentication
All endpoints require an Auth Key to be passed in the header X-TBA-Auth-Key
. If you do not have an auth key yet, you can obtain one from your Account Page.
A User-Agent
header may need to be set to prevent a 403 Unauthorized error.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 3.8.0
- Package version: 3.8.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install tba-api-v3client --save
Finally, you need to build the module:
npm run build
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your tba-api-v3client from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var TbaApiV3client = require('tba-api-v3client');
var defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['X-TBA-Auth-Key'] = "Token"
var api = new TbaApiV3client.DistrictApi()
var districtKey = "districtKey_example"; // {String} TBA District Key, eg `2016fim`
var opts = {
'ifModifiedSince': "ifModifiedSince_example" // {String} Value of the `Last-Modified` header in the most recently cached response by the client.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getDistrictEvents(districtKey, opts, callback);
Documentation for API Endpoints
All URIs are relative to https://www.thebluealliance.com/api/v3
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- TbaApiV3client.DistrictApi | getDistrictEvents | GET /district/{district_key}/events | TbaApiV3client.DistrictApi | getDistrictEventsKeys | GET /district/{district_key}/events/keys | TbaApiV3client.DistrictApi | getDistrictEventsSimple | GET /district/{district_key}/events/simple | TbaApiV3client.DistrictApi | getDistrictRankings | GET /district/{district_key}/rankings | TbaApiV3client.DistrictApi | getDistrictTeams | GET /district/{district_key}/teams | TbaApiV3client.DistrictApi | getDistrictTeamsKeys | GET /district/{district_key}/teams/keys | TbaApiV3client.DistrictApi | getDistrictTeamsSimple | GET /district/{district_key}/teams/simple | TbaApiV3client.DistrictApi | getDistrictsByYear | GET /districts/{year} | TbaApiV3client.DistrictApi | getEventDistrictPoints | GET /event/{event_key}/district_points | TbaApiV3client.DistrictApi | getTeamDistricts | GET /team/{team_key}/districts | TbaApiV3client.EventApi | getDistrictEvents | GET /district/{district_key}/events | TbaApiV3client.EventApi | getDistrictEventsKeys | GET /district/{district_key}/events/keys | TbaApiV3client.EventApi | getDistrictEventsSimple | GET /district/{district_key}/events/simple | TbaApiV3client.EventApi | getEvent | GET /event/{event_key} | TbaApiV3client.EventApi | getEventAlliances | GET /event/{event_key}/alliances | TbaApiV3client.EventApi | getEventAwards | GET /event/{event_key}/awards | TbaApiV3client.EventApi | getEventDistrictPoints | GET /event/{event_key}/district_points | TbaApiV3client.EventApi | getEventInsights | GET /event/{event_key}/insights | TbaApiV3client.EventApi | getEventMatchTimeseries | GET /event/{event_key}/matches/timeseries | TbaApiV3client.EventApi | getEventMatches | GET /event/{event_key}/matches | TbaApiV3client.EventApi | getEventMatchesKeys | GET /event/{event_key}/matches/keys | TbaApiV3client.EventApi | getEventMatchesSimple | GET /event/{event_key}/matches/simple | TbaApiV3client.EventApi | getEventOPRs | GET /event/{event_key}/oprs | TbaApiV3client.EventApi | getEventPredictions | GET /event/{event_key}/predictions | TbaApiV3client.EventApi | getEventRankings | GET /event/{event_key}/rankings | TbaApiV3client.EventApi | getEventSimple | GET /event/{event_key}/simple | TbaApiV3client.EventApi | getEventTeams | GET /event/{event_key}/teams | TbaApiV3client.EventApi | getEventTeamsKeys | GET /event/{event_key}/teams/keys | TbaApiV3client.EventApi | getEventTeamsSimple | GET /event/{event_key}/teams/simple | TbaApiV3client.EventApi | getEventTeamsStatuses | GET /event/{event_key}/teams/statuses | TbaApiV3client.EventApi | getEventsByYear | GET /events/{year} | TbaApiV3client.EventApi | getEventsByYearKeys | GET /events/{year}/keys | TbaApiV3client.EventApi | getEventsByYearSimple | GET /events/{year}/simple | TbaApiV3client.EventApi | getTeamEventAwards | GET /team/{team_key}/event/{event_key}/awards | TbaApiV3client.EventApi | getTeamEventMatches | GET /team/{team_key}/event/{event_key}/matches | TbaApiV3client.EventApi | getTeamEventMatchesKeys | GET /team/{team_key}/event/{event_key}/matches/keys | TbaApiV3client.EventApi | getTeamEventMatchesSimple | GET /team/{team_key}/event/{event_key}/matches/simple | TbaApiV3client.EventApi | getTeamEventStatus | GET /team/{team_key}/event/{event_key}/status | TbaApiV3client.EventApi | getTeamEvents | GET /team/{team_key}/events | TbaApiV3client.EventApi | getTeamEventsByYear | GET /team/{team_key}/events/{year} | TbaApiV3client.EventApi | getTeamEventsByYearKeys | GET /team/{team_key}/events/{year}/keys | TbaApiV3client.EventApi | getTeamEventsByYearSimple | GET /team/{team_key}/events/{year}/simple | TbaApiV3client.EventApi | getTeamEventsKeys | GET /team/{team_key}/events/keys | TbaApiV3client.EventApi | getTeamEventsSimple | GET /team/{team_key}/events/simple | TbaApiV3client.EventApi | getTeamEventsStatusesByYear | GET /team/{team_key}/events/{year}/statuses | TbaApiV3client.ListApi | getDistrictEvents | GET /district/{district_key}/events | TbaApiV3client.ListApi | getDistrictEventsKeys | GET /district/{district_key}/events/keys | TbaApiV3client.ListApi | getDistrictEventsSimple | GET /district/{district_key}/events/simple | TbaApiV3client.ListApi | getDistrictRankings | GET /district/{district_key}/rankings | TbaApiV3client.ListApi | getDistrictTeams | GET /district/{district_key}/teams | TbaApiV3client.ListApi | getDistrictTeamsKeys | GET /district/{district_key}/teams/keys | TbaApiV3client.ListApi | getDistrictTeamsSimple | GET /district/{district_key}/teams/simple | TbaApiV3client.ListApi | getEventTeams | GET /event/{event_key}/teams | TbaApiV3client.ListApi | getEventTeamsKeys | GET /event/{event_key}/teams/keys | TbaApiV3client.ListApi | getEventTeamsSimple | GET /event/{event_key}/teams/simple | TbaApiV3client.ListApi | getEventTeamsStatuses | GET /event/{event_key}/teams/statuses | TbaApiV3client.ListApi | getEventsByYear | GET /events/{year} | TbaApiV3client.ListApi | getEventsByYearKeys | GET /events/{year}/keys | TbaApiV3client.ListApi | getEventsByYearSimple | GET /events/{year}/simple | TbaApiV3client.ListApi | getTeamEventsStatusesByYear | GET /team/{team_key}/events/{year}/statuses | TbaApiV3client.ListApi | getTeams | GET /teams/{page_num} | TbaApiV3client.ListApi | getTeamsByYear | GET /teams/{year}/{page_num} | TbaApiV3client.ListApi | getTeamsByYearKeys | GET /teams/{year}/{page_num}/keys | TbaApiV3client.ListApi | getTeamsByYearSimple | GET /teams/{year}/{page_num}/simple | TbaApiV3client.ListApi | getTeamsKeys | GET /teams/{page_num}/keys | TbaApiV3client.ListApi | getTeamsSimple | GET /teams/{page_num}/simple | TbaApiV3client.MatchApi | getEventMatchTimeseries | GET /event/{event_key}/matches/timeseries | TbaApiV3client.MatchApi | getEventMatches | GET /event/{event_key}/matches | TbaApiV3client.MatchApi | getEventMatchesKeys | GET /event/{event_key}/matches/keys | TbaApiV3client.MatchApi | getEventMatchesSimple | GET /event/{event_key}/matches/simple | TbaApiV3client.MatchApi | getMatch | GET /match/{match_key} | TbaApiV3client.MatchApi | getMatchSimple | GET /match/{match_key}/simple | TbaApiV3client.MatchApi | getMatchTimeseries | GET /match/{match_key}/timeseries | TbaApiV3client.MatchApi | getMatchZebra | GET /match/{match_key}/zebra_motionworks | TbaApiV3client.MatchApi | getTeamEventMatches | GET /team/{team_key}/event/{event_key}/matches | TbaApiV3client.MatchApi | getTeamEventMatchesKeys | GET /team/{team_key}/event/{event_key}/matches/keys | TbaApiV3client.MatchApi | getTeamEventMatchesSimple | GET /team/{team_key}/event/{event_key}/matches/simple | TbaApiV3client.MatchApi | getTeamMatchesByYear | GET /team/{team_key}/matches/{year} | TbaApiV3client.MatchApi | getTeamMatchesByYearKeys | GET /team/{team_key}/matches/{year}/keys | TbaApiV3client.MatchApi | getTeamMatchesByYearSimple | GET /team/{team_key}/matches/{year}/simple | TbaApiV3client.TBAApi | getStatus | GET /status | TbaApiV3client.TeamApi | getDistrictRankings | GET /district/{district_key}/rankings | TbaApiV3client.TeamApi | getDistrictTeams | GET /district/{district_key}/teams | TbaApiV3client.TeamApi | getDistrictTeamsKeys | GET /district/{district_key}/teams/keys | TbaApiV3client.TeamApi | getDistrictTeamsSimple | GET /district/{district_key}/teams/simple | TbaApiV3client.TeamApi | getEventTeams | GET /event/{event_key}/teams | TbaApiV3client.TeamApi | getEventTeamsKeys | GET /event/{event_key}/teams/keys | TbaApiV3client.TeamApi | getEventTeamsSimple | GET /event/{event_key}/teams/simple | TbaApiV3client.TeamApi | getEventTeamsStatuses | GET /event/{event_key}/teams/statuses | TbaApiV3client.TeamApi | getTeam | GET /team/{team_key} | TbaApiV3client.TeamApi | getTeamAwards | GET /team/{team_key}/awards | TbaApiV3client.TeamApi | getTeamAwardsByYear | GET /team/{team_key}/awards/{year} | TbaApiV3client.TeamApi | getTeamDistricts | GET /team/{team_key}/districts | TbaApiV3client.TeamApi | getTeamEventAwards | GET /team/{team_key}/event/{event_key}/awards | TbaApiV3client.TeamApi | getTeamEventMatches | GET /team/{team_key}/event/{event_key}/matches | TbaApiV3client.TeamApi | getTeamEventMatchesKeys | GET /team/{team_key}/event/{event_key}/matches/keys | TbaApiV3client.TeamApi | getTeamEventMatchesSimple | GET /team/{team_key}/event/{event_key}/matches/simple | TbaApiV3client.TeamApi | getTeamEventStatus | GET /team/{team_key}/event/{event_key}/status | TbaApiV3client.TeamApi | getTeamEvents | GET /team/{team_key}/events | TbaApiV3client.TeamApi | getTeamEventsByYear | GET /team/{team_key}/events/{year} | TbaApiV3client.TeamApi | getTeamEventsByYearKeys | GET /team/{team_key}/events/{year}/keys | TbaApiV3client.TeamApi | getTeamEventsByYearSimple | GET /team/{team_key}/events/{year}/simple | TbaApiV3client.TeamApi | getTeamEventsKeys | GET /team/{team_key}/events/keys | TbaApiV3client.TeamApi | getTeamEventsSimple | GET /team/{team_key}/events/simple | TbaApiV3client.TeamApi | getTeamEventsStatusesByYear | GET /team/{team_key}/events/{year}/statuses | TbaApiV3client.TeamApi | getTeamMatchesByYear | GET /team/{team_key}/matches/{year} | TbaApiV3client.TeamApi | getTeamMatchesByYearKeys | GET /team/{team_key}/matches/{year}/keys | TbaApiV3client.TeamApi | getTeamMatchesByYearSimple | GET /team/{team_key}/matches/{year}/simple | TbaApiV3client.TeamApi | getTeamMediaByTag | GET /team/{team_key}/media/tag/{media_tag} | TbaApiV3client.TeamApi | getTeamMediaByTagYear | GET /team/{team_key}/media/tag/{media_tag}/{year} | TbaApiV3client.TeamApi | getTeamMediaByYear | GET /team/{team_key}/media/{year} | TbaApiV3client.TeamApi | getTeamRobots | GET /team/{team_key}/robots | TbaApiV3client.TeamApi | getTeamSimple | GET /team/{team_key}/simple | TbaApiV3client.TeamApi | getTeamSocialMedia | GET /team/{team_key}/social_media | TbaApiV3client.TeamApi | getTeamYearsParticipated | GET /team/{team_key}/years_participated | TbaApiV3client.TeamApi | getTeams | GET /teams/{page_num} | TbaApiV3client.TeamApi | getTeamsByYear | GET /teams/{year}/{page_num} | TbaApiV3client.TeamApi | getTeamsByYearKeys | GET /teams/{year}/{page_num}/keys | TbaApiV3client.TeamApi | getTeamsByYearSimple | GET /teams/{year}/{page_num}/simple | TbaApiV3client.TeamApi | getTeamsKeys | GET /teams/{page_num}/keys | TbaApiV3client.TeamApi | getTeamsSimple | GET /teams/{page_num}/simple |
Documentation for Models
- TbaApiV3client.APIStatus
- TbaApiV3client.APIStatusAppVersion
- TbaApiV3client.Award
- TbaApiV3client.AwardRecipient
- TbaApiV3client.DistrictList
- TbaApiV3client.DistrictRanking
- TbaApiV3client.DistrictRankingEventPoints
- TbaApiV3client.EliminationAlliance
- TbaApiV3client.EliminationAllianceBackup
- TbaApiV3client.EliminationAllianceStatus
- TbaApiV3client.Event
- TbaApiV3client.EventDistrictPoints
- TbaApiV3client.EventDistrictPointsPoints
- TbaApiV3client.EventDistrictPointsTiebreakers
- TbaApiV3client.EventInsights
- TbaApiV3client.EventInsights2016
- TbaApiV3client.EventInsights2017
- TbaApiV3client.EventInsights2018
- TbaApiV3client.EventOPRs
- TbaApiV3client.EventRanking
- TbaApiV3client.EventRankingExtraStatsInfo
- TbaApiV3client.EventRankingRankings
- TbaApiV3client.EventRankingSortOrderInfo
- TbaApiV3client.EventSimple
- TbaApiV3client.Match
- TbaApiV3client.MatchAlliance
- TbaApiV3client.MatchScoreBreakdown2015
- TbaApiV3client.MatchScoreBreakdown2015Alliance
- TbaApiV3client.MatchScoreBreakdown2016
- TbaApiV3client.MatchScoreBreakdown2016Alliance
- TbaApiV3client.MatchScoreBreakdown2017
- TbaApiV3client.MatchScoreBreakdown2017Alliance
- TbaApiV3client.MatchScoreBreakdown2018
- TbaApiV3client.MatchScoreBreakdown2018Alliance
- TbaApiV3client.MatchScoreBreakdown2019
- TbaApiV3client.MatchScoreBreakdown2019Alliance
- TbaApiV3client.MatchScoreBreakdown2020
- TbaApiV3client.MatchScoreBreakdown2020Alliance
- TbaApiV3client.MatchSimple
- TbaApiV3client.MatchSimpleAlliances
- TbaApiV3client.MatchTimeseries2018
- TbaApiV3client.MatchVideos
- TbaApiV3client.Media
- TbaApiV3client.Team
- TbaApiV3client.TeamEventStatus
- TbaApiV3client.TeamEventStatusAlliance
- TbaApiV3client.TeamEventStatusAllianceBackup
- TbaApiV3client.TeamEventStatusPlayoff
- TbaApiV3client.TeamEventStatusRank
- TbaApiV3client.TeamEventStatusRankRanking
- TbaApiV3client.TeamEventStatusRankSortOrderInfo
- TbaApiV3client.TeamRobot
- TbaApiV3client.TeamSimple
- TbaApiV3client.WLTRecord
- TbaApiV3client.Webcast
- TbaApiV3client.Zebra
- TbaApiV3client.ZebraAlliances
- TbaApiV3client.ZebraTeam
Documentation for Authorization
apiKey
- Type: API key
- API key parameter name: X-TBA-Auth-Key
- Location: HTTP header