Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Latest commit

 

History

History
278 lines (240 loc) · 19.4 KB

README.md

File metadata and controls

278 lines (240 loc) · 19.4 KB

tba_api_client (EXPERIMENTAL)

This repo hasn't been regenerated for some time. At some point i'll get around to reactivating this project, and hopefully setting up auto regeneration.

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 Dart package is automatically generated by the OpenAPI Generator project:

  • API version: 3.8.0
  • Build package: org.openapitools.codegen.languages.DartDioNextClientCodegen

Requirements

  • Dart 2.12.0 or later OR Flutter 1.26.0 or later
  • Dio 4.0.0+

Installation & Usage

pub.dev

To use the package from pub.dev, please include the following in pubspec.yaml

dependencies:
  tba_api_client: 1.0.0

Github

If this Dart package is published to Github, please include the following in pubspec.yaml

dependencies:
  tba_api_client:
    git:
      url: https://github.com/aidan-mundy/Dart-TBA-API-Client.git
      #ref: main

Local development

To use the package from your local drive, please include the following in pubspec.yaml

dependencies:
  tba_api_client:
    path: /path/to/tba_api_client

Getting Started

Please follow the installation procedure and then run the following:

import 'package:tba_api_client/tba_api_client.dart';


final api = DistrictApi();
final districtKey = districtKey_example; // String | TBA District Key, eg `2016fim`
final ifModifiedSince = ifModifiedSince_example; // String | Value of the `Last-Modified` header in the most recently cached response by the client.

try {
    final response = await api.getDistrictEvents(districtKey, ifModifiedSince);
    print(response);
} catch on DioError (e) {
    print("Exception when calling DistrictApi->getDistrictEvents: $e\n");
}

Documentation for API Endpoints

All URIs are relative to https://www.thebluealliance.com/api/v3

Class Method HTTP request Description
DistrictApi getDistrictEvents get /district/{district_key}/events
DistrictApi getDistrictEventsKeys get /district/{district_key}/events/keys
DistrictApi getDistrictEventsSimple get /district/{district_key}/events/simple
DistrictApi getDistrictRankings get /district/{district_key}/rankings
DistrictApi getDistrictTeams get /district/{district_key}/teams
DistrictApi getDistrictTeamsKeys get /district/{district_key}/teams/keys
DistrictApi getDistrictTeamsSimple get /district/{district_key}/teams/simple
DistrictApi getDistrictsByYear get /districts/{year}
DistrictApi getEventDistrictPoints get /event/{event_key}/district_points
DistrictApi getTeamDistricts get /team/{team_key}/districts
EventApi getDistrictEvents get /district/{district_key}/events
EventApi getDistrictEventsKeys get /district/{district_key}/events/keys
EventApi getDistrictEventsSimple get /district/{district_key}/events/simple
EventApi getEvent get /event/{event_key}
EventApi getEventAlliances get /event/{event_key}/alliances
EventApi getEventAwards get /event/{event_key}/awards
EventApi getEventDistrictPoints get /event/{event_key}/district_points
EventApi getEventInsights get /event/{event_key}/insights
EventApi getEventMatchTimeseries get /event/{event_key}/matches/timeseries
EventApi getEventMatches get /event/{event_key}/matches
EventApi getEventMatchesKeys get /event/{event_key}/matches/keys
EventApi getEventMatchesSimple get /event/{event_key}/matches/simple
EventApi getEventOPRs get /event/{event_key}/oprs
EventApi getEventPredictions get /event/{event_key}/predictions
EventApi getEventRankings get /event/{event_key}/rankings
EventApi getEventSimple get /event/{event_key}/simple
EventApi getEventTeams get /event/{event_key}/teams
EventApi getEventTeamsKeys get /event/{event_key}/teams/keys
EventApi getEventTeamsSimple get /event/{event_key}/teams/simple
EventApi getEventTeamsStatuses get /event/{event_key}/teams/statuses
EventApi getEventsByYear get /events/{year}
EventApi getEventsByYearKeys get /events/{year}/keys
EventApi getEventsByYearSimple get /events/{year}/simple
EventApi getTeamEventAwards get /team/{team_key}/event/{event_key}/awards
EventApi getTeamEventMatches get /team/{team_key}/event/{event_key}/matches
EventApi getTeamEventMatchesKeys get /team/{team_key}/event/{event_key}/matches/keys
EventApi getTeamEventMatchesSimple get /team/{team_key}/event/{event_key}/matches/simple
EventApi getTeamEventStatus get /team/{team_key}/event/{event_key}/status
EventApi getTeamEvents get /team/{team_key}/events
EventApi getTeamEventsByYear get /team/{team_key}/events/{year}
EventApi getTeamEventsByYearKeys get /team/{team_key}/events/{year}/keys
EventApi getTeamEventsByYearSimple get /team/{team_key}/events/{year}/simple
EventApi getTeamEventsKeys get /team/{team_key}/events/keys
EventApi getTeamEventsSimple get /team/{team_key}/events/simple
EventApi getTeamEventsStatusesByYear get /team/{team_key}/events/{year}/statuses
ListApi getDistrictEvents get /district/{district_key}/events
ListApi getDistrictEventsKeys get /district/{district_key}/events/keys
ListApi getDistrictEventsSimple get /district/{district_key}/events/simple
ListApi getDistrictRankings get /district/{district_key}/rankings
ListApi getDistrictTeams get /district/{district_key}/teams
ListApi getDistrictTeamsKeys get /district/{district_key}/teams/keys
ListApi getDistrictTeamsSimple get /district/{district_key}/teams/simple
ListApi getEventTeams get /event/{event_key}/teams
ListApi getEventTeamsKeys get /event/{event_key}/teams/keys
ListApi getEventTeamsSimple get /event/{event_key}/teams/simple
ListApi getEventTeamsStatuses get /event/{event_key}/teams/statuses
ListApi getEventsByYear get /events/{year}
ListApi getEventsByYearKeys get /events/{year}/keys
ListApi getEventsByYearSimple get /events/{year}/simple
ListApi getTeamEventsStatusesByYear get /team/{team_key}/events/{year}/statuses
ListApi getTeams get /teams/{page_num}
ListApi getTeamsByYear get /teams/{year}/{page_num}
ListApi getTeamsByYearKeys get /teams/{year}/{page_num}/keys
ListApi getTeamsByYearSimple get /teams/{year}/{page_num}/simple
ListApi getTeamsKeys get /teams/{page_num}/keys
ListApi getTeamsSimple get /teams/{page_num}/simple
MatchApi getEventMatchTimeseries get /event/{event_key}/matches/timeseries
MatchApi getEventMatches get /event/{event_key}/matches
MatchApi getEventMatchesKeys get /event/{event_key}/matches/keys
MatchApi getEventMatchesSimple get /event/{event_key}/matches/simple
MatchApi getMatch get /match/{match_key}
MatchApi getMatchSimple get /match/{match_key}/simple
MatchApi getMatchTimeseries get /match/{match_key}/timeseries
MatchApi getMatchZebra get /match/{match_key}/zebra_motionworks
MatchApi getTeamEventMatches get /team/{team_key}/event/{event_key}/matches
MatchApi getTeamEventMatchesKeys get /team/{team_key}/event/{event_key}/matches/keys
MatchApi getTeamEventMatchesSimple get /team/{team_key}/event/{event_key}/matches/simple
MatchApi getTeamMatchesByYear get /team/{team_key}/matches/{year}
MatchApi getTeamMatchesByYearKeys get /team/{team_key}/matches/{year}/keys
MatchApi getTeamMatchesByYearSimple get /team/{team_key}/matches/{year}/simple
TBAApi getStatus get /status
TeamApi getDistrictRankings get /district/{district_key}/rankings
TeamApi getDistrictTeams get /district/{district_key}/teams
TeamApi getDistrictTeamsKeys get /district/{district_key}/teams/keys
TeamApi getDistrictTeamsSimple get /district/{district_key}/teams/simple
TeamApi getEventTeams get /event/{event_key}/teams
TeamApi getEventTeamsKeys get /event/{event_key}/teams/keys
TeamApi getEventTeamsSimple get /event/{event_key}/teams/simple
TeamApi getEventTeamsStatuses get /event/{event_key}/teams/statuses
TeamApi getTeam get /team/{team_key}
TeamApi getTeamAwards get /team/{team_key}/awards
TeamApi getTeamAwardsByYear get /team/{team_key}/awards/{year}
TeamApi getTeamDistricts get /team/{team_key}/districts
TeamApi getTeamEventAwards get /team/{team_key}/event/{event_key}/awards
TeamApi getTeamEventMatches get /team/{team_key}/event/{event_key}/matches
TeamApi getTeamEventMatchesKeys get /team/{team_key}/event/{event_key}/matches/keys
TeamApi getTeamEventMatchesSimple get /team/{team_key}/event/{event_key}/matches/simple
TeamApi getTeamEventStatus get /team/{team_key}/event/{event_key}/status
TeamApi getTeamEvents get /team/{team_key}/events
TeamApi getTeamEventsByYear get /team/{team_key}/events/{year}
TeamApi getTeamEventsByYearKeys get /team/{team_key}/events/{year}/keys
TeamApi getTeamEventsByYearSimple get /team/{team_key}/events/{year}/simple
TeamApi getTeamEventsKeys get /team/{team_key}/events/keys
TeamApi getTeamEventsSimple get /team/{team_key}/events/simple
TeamApi getTeamEventsStatusesByYear get /team/{team_key}/events/{year}/statuses
TeamApi getTeamMatchesByYear get /team/{team_key}/matches/{year}
TeamApi getTeamMatchesByYearKeys get /team/{team_key}/matches/{year}/keys
TeamApi getTeamMatchesByYearSimple get /team/{team_key}/matches/{year}/simple
TeamApi getTeamMediaByTag get /team/{team_key}/media/tag/{media_tag}
TeamApi getTeamMediaByTagYear get /team/{team_key}/media/tag/{media_tag}/{year}
TeamApi getTeamMediaByYear get /team/{team_key}/media/{year}
TeamApi getTeamRobots get /team/{team_key}/robots
TeamApi getTeamSimple get /team/{team_key}/simple
TeamApi getTeamSocialMedia get /team/{team_key}/social_media
TeamApi getTeamYearsParticipated get /team/{team_key}/years_participated
TeamApi getTeams get /teams/{page_num}
TeamApi getTeamsByYear get /teams/{year}/{page_num}
TeamApi getTeamsByYearKeys get /teams/{year}/{page_num}/keys
TeamApi getTeamsByYearSimple get /teams/{year}/{page_num}/simple
TeamApi getTeamsKeys get /teams/{page_num}/keys
TeamApi getTeamsSimple get /teams/{page_num}/simple

Documentation For Models

Documentation For Authorization

apiKey

  • Type: API key
  • API key parameter name: X-TBA-Auth-Key
  • Location: HTTP header

Author