tba_api_client 3.8.0

tba_api_client #

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.DartClientCodegen

Requirements #

Dart 2.0 or later

Installation & Usage #

Github #

If this Dart package is published to Github, add the following dependency to your pubspec.yaml

dependencies:
  tba_api_client:
    git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Local #

To use the package in your local drive, add the following dependency to your pubspec.yaml

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

Tests #

TODO

Getting Started #

Please follow the installation procedure and then run the following:

import 'package:tba_api_client/api.dart';

// TODO Configure API key authorization: apiKey
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('apiKey').apiKeyPrefix = 'Bearer';

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

try {
    var result = api_instance.getDistrictEvents(districtKey, ifModifiedSince);
    print(result);
} catch (e) {
    print("Exception when calling DistrictApi->getDistrictEvents: $e\n");
}

Documentation for API Endpoints #

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

ClassMethodHTTP requestDescription
DistrictApigetDistrictEventsGET /district/{district_key}/events
DistrictApigetDistrictEventsKeysGET /district/{district_key}/events/keys
DistrictApigetDistrictEventsSimpleGET /district/{district_key}/events/simple
DistrictApigetDistrictRankingsGET /district/{district_key}/rankings
DistrictApigetDistrictTeamsGET /district/{district_key}/teams
DistrictApigetDistrictTeamsKeysGET /district/{district_key}/teams/keys
DistrictApigetDistrictTeamsSimpleGET /district/{district_key}/teams/simple
DistrictApigetDistrictsByYearGET /districts/{year}
DistrictApigetEventDistrictPointsGET /event/{event_key}/district_points
DistrictApigetTeamDistrictsGET /team/{team_key}/districts
EventApigetDistrictEventsGET /district/{district_key}/events
EventApigetDistrictEventsKeysGET /district/{district_key}/events/keys
EventApigetDistrictEventsSimpleGET /district/{district_key}/events/simple
EventApigetEventGET /event/{event_key}
EventApigetEventAlliancesGET /event/{event_key}/alliances
EventApigetEventAwardsGET /event/{event_key}/awards
EventApigetEventDistrictPointsGET /event/{event_key}/district_points
EventApigetEventInsightsGET /event/{event_key}/insights
EventApigetEventMatchTimeseriesGET /event/{event_key}/matches/timeseries
EventApigetEventMatchesGET /event/{event_key}/matches
EventApigetEventMatchesKeysGET /event/{event_key}/matches/keys
EventApigetEventMatchesSimpleGET /event/{event_key}/matches/simple
EventApigetEventOPRsGET /event/{event_key}/oprs
EventApigetEventPredictionsGET /event/{event_key}/predictions
EventApigetEventRankingsGET /event/{event_key}/rankings
EventApigetEventSimpleGET /event/{event_key}/simple
EventApigetEventTeamsGET /event/{event_key}/teams
EventApigetEventTeamsKeysGET /event/{event_key}/teams/keys
EventApigetEventTeamsSimpleGET /event/{event_key}/teams/simple
EventApigetEventTeamsStatusesGET /event/{event_key}/teams/statuses
EventApigetEventsByYearGET /events/{year}
EventApigetEventsByYearKeysGET /events/{year}/keys
EventApigetEventsByYearSimpleGET /events/{year}/simple
EventApigetTeamEventAwardsGET /team/{team_key}/event/{event_key}/awards
EventApigetTeamEventMatchesGET /team/{team_key}/event/{event_key}/matches
EventApigetTeamEventMatchesKeysGET /team/{team_key}/event/{event_key}/matches/keys
EventApigetTeamEventMatchesSimpleGET /team/{team_key}/event/{event_key}/matches/simple
EventApigetTeamEventStatusGET /team/{team_key}/event/{event_key}/status
EventApigetTeamEventsGET /team/{team_key}/events
EventApigetTeamEventsByYearGET /team/{team_key}/events/{year}
EventApigetTeamEventsByYearKeysGET /team/{team_key}/events/{year}/keys
EventApigetTeamEventsByYearSimpleGET /team/{team_key}/events/{year}/simple
EventApigetTeamEventsKeysGET /team/{team_key}/events/keys
EventApigetTeamEventsSimpleGET /team/{team_key}/events/simple
EventApigetTeamEventsStatusesByYearGET /team/{team_key}/events/{year}/statuses
ListApigetDistrictEventsGET /district/{district_key}/events
ListApigetDistrictEventsKeysGET /district/{district_key}/events/keys
ListApigetDistrictEventsSimpleGET /district/{district_key}/events/simple
ListApigetDistrictRankingsGET /district/{district_key}/rankings
ListApigetDistrictTeamsGET /district/{district_key}/teams
ListApigetDistrictTeamsKeysGET /district/{district_key}/teams/keys
ListApigetDistrictTeamsSimpleGET /district/{district_key}/teams/simple
ListApigetEventTeamsGET /event/{event_key}/teams
ListApigetEventTeamsKeysGET /event/{event_key}/teams/keys
ListApigetEventTeamsSimpleGET /event/{event_key}/teams/simple
ListApigetEventTeamsStatusesGET /event/{event_key}/teams/statuses
ListApigetEventsByYearGET /events/{year}
ListApigetEventsByYearKeysGET /events/{year}/keys
ListApigetEventsByYearSimpleGET /events/{year}/simple
ListApigetTeamEventsStatusesByYearGET /team/{team_key}/events/{year}/statuses
ListApigetTeamsGET /teams/{page_num}
ListApigetTeamsByYearGET /teams/{year}/{page_num}
ListApigetTeamsByYearKeysGET /teams/{year}/{page_num}/keys
ListApigetTeamsByYearSimpleGET /teams/{year}/{page_num}/simple
ListApigetTeamsKeysGET /teams/{page_num}/keys
ListApigetTeamsSimpleGET /teams/{page_num}/simple
MatchApigetEventMatchTimeseriesGET /event/{event_key}/matches/timeseries
MatchApigetEventMatchesGET /event/{event_key}/matches
MatchApigetEventMatchesKeysGET /event/{event_key}/matches/keys
MatchApigetEventMatchesSimpleGET /event/{event_key}/matches/simple
MatchApigetMatchGET /match/{match_key}
MatchApigetMatchSimpleGET /match/{match_key}/simple
MatchApigetMatchTimeseriesGET /match/{match_key}/timeseries
MatchApigetMatchZebraGET /match/{match_key}/zebra_motionworks
MatchApigetTeamEventMatchesGET /team/{team_key}/event/{event_key}/matches
MatchApigetTeamEventMatchesKeysGET /team/{team_key}/event/{event_key}/matches/keys
MatchApigetTeamEventMatchesSimpleGET /team/{team_key}/event/{event_key}/matches/simple
MatchApigetTeamMatchesByYearGET /team/{team_key}/matches/{year}
MatchApigetTeamMatchesByYearKeysGET /team/{team_key}/matches/{year}/keys
MatchApigetTeamMatchesByYearSimpleGET /team/{team_key}/matches/{year}/simple
TBAApigetStatusGET /status
TeamApigetDistrictRankingsGET /district/{district_key}/rankings
TeamApigetDistrictTeamsGET /district/{district_key}/teams
TeamApigetDistrictTeamsKeysGET /district/{district_key}/teams/keys
TeamApigetDistrictTeamsSimpleGET /district/{district_key}/teams/simple
TeamApigetEventTeamsGET /event/{event_key}/teams
TeamApigetEventTeamsKeysGET /event/{event_key}/teams/keys
TeamApigetEventTeamsSimpleGET /event/{event_key}/teams/simple
TeamApigetEventTeamsStatusesGET /event/{event_key}/teams/statuses
TeamApigetTeamGET /team/{team_key}
TeamApigetTeamAwardsGET /team/{team_key}/awards
TeamApigetTeamAwardsByYearGET /team/{team_key}/awards/{year}
TeamApigetTeamDistrictsGET /team/{team_key}/districts
TeamApigetTeamEventAwardsGET /team/{team_key}/event/{event_key}/awards
TeamApigetTeamEventMatchesGET /team/{team_key}/event/{event_key}/matches
TeamApigetTeamEventMatchesKeysGET /team/{team_key}/event/{event_key}/matches/keys
TeamApigetTeamEventMatchesSimpleGET /team/{team_key}/event/{event_key}/matches/simple
TeamApigetTeamEventStatusGET /team/{team_key}/event/{event_key}/status
TeamApigetTeamEventsGET /team/{team_key}/events
TeamApigetTeamEventsByYearGET /team/{team_key}/events/{year}
TeamApigetTeamEventsByYearKeysGET /team/{team_key}/events/{year}/keys
TeamApigetTeamEventsByYearSimpleGET /team/{team_key}/events/{year}/simple
TeamApigetTeamEventsKeysGET /team/{team_key}/events/keys
TeamApigetTeamEventsSimpleGET /team/{team_key}/events/simple
TeamApigetTeamEventsStatusesByYearGET /team/{team_key}/events/{year}/statuses
TeamApigetTeamMatchesByYearGET /team/{team_key}/matches/{year}
TeamApigetTeamMatchesByYearKeysGET /team/{team_key}/matches/{year}/keys
TeamApigetTeamMatchesByYearSimpleGET /team/{team_key}/matches/{year}/simple
TeamApigetTeamMediaByTagGET /team/{team_key}/media/tag/{media_tag}
TeamApigetTeamMediaByTagYearGET /team/{team_key}/media/tag/{media_tag}/{year}
TeamApigetTeamMediaByYearGET /team/{team_key}/media/{year}
TeamApigetTeamRobotsGET /team/{team_key}/robots
TeamApigetTeamSimpleGET /team/{team_key}/simple
TeamApigetTeamSocialMediaGET /team/{team_key}/social_media
TeamApigetTeamYearsParticipatedGET /team/{team_key}/years_participated
TeamApigetTeamsGET /teams/{page_num}
TeamApigetTeamsByYearGET /teams/{year}/{page_num}
TeamApigetTeamsByYearKeysGET /teams/{year}/{page_num}/keys
TeamApigetTeamsByYearSimpleGET /teams/{year}/{page_num}/simple
TeamApigetTeamsKeysGET /teams/{page_num}/keys
TeamApigetTeamsSimpleGET /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 #

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  tba_api_client: ^3.8.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:tba_api_client/api.dart';
import 'package:tba_api_client/api/district_api.dart';
import 'package:tba_api_client/api/event_api.dart';
import 'package:tba_api_client/api/list_api.dart';
import 'package:tba_api_client/api/match_api.dart';
import 'package:tba_api_client/api/tba_api.dart';
import 'package:tba_api_client/api/team_api.dart';
import 'package:tba_api_client/api_client.dart';
import 'package:tba_api_client/api_exception.dart';
import 'package:tba_api_client/api_helper.dart';
import 'package:tba_api_client/auth/api_key_auth.dart';
import 'package:tba_api_client/auth/authentication.dart';
import 'package:tba_api_client/auth/http_basic_auth.dart';
import 'package:tba_api_client/auth/http_bearer_auth.dart';
import 'package:tba_api_client/auth/oauth.dart';
import 'package:tba_api_client/model/api_status.dart';
import 'package:tba_api_client/model/api_status_app_version.dart';
import 'package:tba_api_client/model/award.dart';
import 'package:tba_api_client/model/award_recipient.dart';
import 'package:tba_api_client/model/district_list.dart';
import 'package:tba_api_client/model/district_ranking.dart';
import 'package:tba_api_client/model/district_ranking_event_points.dart';
import 'package:tba_api_client/model/elimination_alliance.dart';
import 'package:tba_api_client/model/elimination_alliance_backup.dart';
import 'package:tba_api_client/model/elimination_alliance_status.dart';
import 'package:tba_api_client/model/event.dart';
import 'package:tba_api_client/model/event_district_points.dart';
import 'package:tba_api_client/model/event_district_points_points.dart';
import 'package:tba_api_client/model/event_district_points_tiebreakers.dart';
import 'package:tba_api_client/model/event_insights.dart';
import 'package:tba_api_client/model/event_insights2016.dart';
import 'package:tba_api_client/model/event_insights2017.dart';
import 'package:tba_api_client/model/event_insights2018.dart';
import 'package:tba_api_client/model/event_op_rs.dart';
import 'package:tba_api_client/model/event_ranking.dart';
import 'package:tba_api_client/model/event_ranking_extra_stats_info.dart';
import 'package:tba_api_client/model/event_ranking_rankings.dart';
import 'package:tba_api_client/model/event_ranking_sort_order_info.dart';
import 'package:tba_api_client/model/event_simple.dart';
import 'package:tba_api_client/model/match.dart';
import 'package:tba_api_client/model/match_alliance.dart';
import 'package:tba_api_client/model/match_score_breakdown2015.dart';
import 'package:tba_api_client/model/match_score_breakdown2015_alliance.dart';
import 'package:tba_api_client/model/match_score_breakdown2016.dart';
import 'package:tba_api_client/model/match_score_breakdown2016_alliance.dart';
import 'package:tba_api_client/model/match_score_breakdown2017.dart';
import 'package:tba_api_client/model/match_score_breakdown2017_alliance.dart';
import 'package:tba_api_client/model/match_score_breakdown2018.dart';
import 'package:tba_api_client/model/match_score_breakdown2018_alliance.dart';
import 'package:tba_api_client/model/match_score_breakdown2019.dart';
import 'package:tba_api_client/model/match_score_breakdown2019_alliance.dart';
import 'package:tba_api_client/model/match_score_breakdown2020.dart';
import 'package:tba_api_client/model/match_score_breakdown2020_alliance.dart';
import 'package:tba_api_client/model/match_simple.dart';
import 'package:tba_api_client/model/match_simple_alliances.dart';
import 'package:tba_api_client/model/match_timeseries2018.dart';
import 'package:tba_api_client/model/match_videos.dart';
import 'package:tba_api_client/model/media.dart';
import 'package:tba_api_client/model/team.dart';
import 'package:tba_api_client/model/team_event_status.dart';
import 'package:tba_api_client/model/team_event_status_alliance.dart';
import 'package:tba_api_client/model/team_event_status_alliance_backup.dart';
import 'package:tba_api_client/model/team_event_status_playoff.dart';
import 'package:tba_api_client/model/team_event_status_rank.dart';
import 'package:tba_api_client/model/team_event_status_rank_ranking.dart';
import 'package:tba_api_client/model/team_event_status_rank_sort_order_info.dart';
import 'package:tba_api_client/model/team_robot.dart';
import 'package:tba_api_client/model/team_simple.dart';
import 'package:tba_api_client/model/webcast.dart';
import 'package:tba_api_client/model/wlt_record.dart';
import 'package:tba_api_client/model/zebra.dart';
import 'package:tba_api_client/model/zebra_alliances.dart';
import 'package:tba_api_client/model/zebra_team.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
24
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
49
Overall:
Weighted score of the above. [more]
17
Learn more about scoring.

We analyzed this package on Jul 9, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Health issues and suggestions

Fix lib/api_client.dart. (-68.36 points)

Analysis of lib/api_client.dart failed with 4 errors:

line 161 col 26: A value of type 'RegExpMatch' can't be assigned to a variable of type 'Match'.

line 162 col 40: The operator '[]' isn't defined for the type 'Match'.

line 165 col 26: A value of type 'RegExpMatch' can't be assigned to a variable of type 'Match'.

line 166 col 40: The operator '[]' isn't defined for the type 'Match'.

Fix lib/model/event.dart. (-25 points)

Analysis of lib/model/event.dart reported 58 hints, including:

line 5 col 10: Don't explicitly initialize variables to null.

line 7 col 10: Don't explicitly initialize variables to null.

line 9 col 10: Don't explicitly initialize variables to null.

line 11 col 7: Don't explicitly initialize variables to null.

line 13 col 16: Don't explicitly initialize variables to null.

Fix lib/model/event_insights2018.dart. (-25 points)

Analysis of lib/model/event_insights2018.dart reported 64 hints, including:

line 7 col 10: Don't explicitly initialize variables to null.

line 9 col 10: Don't explicitly initialize variables to null.

line 11 col 10: Don't explicitly initialize variables to null.

line 13 col 10: Don't explicitly initialize variables to null.

line 15 col 10: Don't explicitly initialize variables to null.

Fix additional 70 files with analysis or formatting issues. (-461.88 points)

Additional issues in the following files:

  • lib/model/match_score_breakdown2016_alliance.dart (76 hints)
  • lib/model/match_score_breakdown2017_alliance.dart (66 hints)
  • lib/model/match_score_breakdown2018_alliance.dart (74 hints)
  • lib/model/match_score_breakdown2019_alliance.dart (102 hints)
  • lib/model/match_score_breakdown2020_alliance.dart (68 hints)
  • lib/model/match_timeseries2018.dart (62 hints)
  • lib/model/event_insights2017.dart (52 hints)
  • lib/model/match_score_breakdown2015_alliance.dart (48 hints)
  • lib/api/team_api.dart (42 hints)
  • lib/model/team.dart (38 hints)
  • lib/api/event_api.dart (37 hints)
  • lib/model/event_insights2016.dart (34 hints)
  • lib/model/match.dart (25 hints)
  • lib/api/list_api.dart (23 hints)
  • lib/model/event_simple.dart (22 hints)
  • lib/model/match_simple.dart (20 hints)
  • lib/model/team_event_status.dart (16 hints)
  • lib/api/match_api.dart (14 hints)
  • lib/model/district_ranking_event_points.dart (14 hints)
  • lib/model/event_ranking_rankings.dart (14 hints)
  • lib/model/team_simple.dart (14 hints)
  • lib/model/team_event_status_rank_ranking.dart (13 hints)
  • lib/model/media.dart (12 hints)
  • lib/model/api_status.dart (11 hints)
  • lib/api/district_api.dart (10 hints)
  • lib/model/elimination_alliance_status.dart (10 hints)
  • lib/model/event_district_points_points.dart (10 hints)
  • lib/model/team_event_status_playoff.dart (10 hints)
  • lib/model/award.dart (9 hints)
  • lib/model/district_ranking.dart (9 hints)
  • lib/model/district_list.dart (8 hints)
  • lib/model/elimination_alliance.dart (8 hints)
  • lib/model/match_score_breakdown2015.dart (8 hints)
  • lib/model/team_event_status_alliance.dart (8 hints)
  • lib/model/team_robot.dart (8 hints)
  • lib/model/webcast.dart (8 hints)
  • lib/model/team_event_status_rank.dart (7 hints)
  • lib/model/wlt_record.dart (6 hints)
  • lib/model/match_alliance.dart (5 hints)
  • lib/model/zebra.dart (5 hints)
  • lib/model/api_status_app_version.dart (4 hints)
  • lib/model/award_recipient.dart (4 hints)
  • lib/model/elimination_alliance_backup.dart (4 hints)
  • lib/model/event_insights.dart (4 hints)
  • lib/model/event_ranking_extra_stats_info.dart (4 hints)
  • lib/model/event_ranking_sort_order_info.dart (4 hints)
  • lib/model/match_score_breakdown2016.dart (4 hints)
  • lib/model/match_score_breakdown2017.dart (4 hints)
  • lib/model/match_score_breakdown2018.dart (4 hints)
  • lib/model/match_score_breakdown2019.dart (4 hints)
  • lib/model/match_score_breakdown2020.dart (4 hints)
  • lib/model/match_simple_alliances.dart (4 hints)
  • lib/model/match_videos.dart (4 hints)
  • lib/model/team_event_status_alliance_backup.dart (4 hints)
  • lib/model/team_event_status_rank_sort_order_info.dart (4 hints)
  • lib/model/zebra_team.dart (4 hints)
  • lib/model/event_district_points_tiebreakers.dart (3 hints)
  • lib/model/event_op_rs.dart (3 hints)
  • lib/model/event_ranking.dart (3 hints)
  • lib/api_helper.dart (2 hints)
  • lib/model/event_district_points.dart (2 hints)
  • lib/model/zebra_alliances.dart (2 hints)
  • lib/api/tba_api.dart (1 hint)
  • lib/auth/http_bearer_auth.dart (1 hint)
  • lib/api.dart (Run dartfmt to format lib/api.dart.)
  • lib/api_exception.dart (Run dartfmt to format lib/api_exception.dart.)
  • lib/auth/api_key_auth.dart (Run dartfmt to format lib/auth/api_key_auth.dart.)
  • lib/auth/authentication.dart (Run dartfmt to format lib/auth/authentication.dart.)
  • lib/auth/http_basic_auth.dart (Run dartfmt to format lib/auth/http_basic_auth.dart.)
  • lib/auth/oauth.dart (Run dartfmt to format lib/auth/oauth.dart.)

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and tba_api_client.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The package description is too short. (-1 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http >=0.12.0 <0.13.0 0.12.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nnbd
http_parser 3.1.4
meta 1.2.1
path 1.7.0
pedantic 1.9.1
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nnbd
Dev dependencies
test ^1.3.0