Skip to content

Latest commit

 

History

History
725 lines (496 loc) · 25.8 KB

MatchApi.md

File metadata and controls

725 lines (496 loc) · 25.8 KB

tba_api_v3.api.MatchApi

Load the API package

import 'package:tba_api_v3/api.dart';

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

Method HTTP request Description
getEventMatchTimeseries GET /event/{event_key}/matches/timeseries
getEventMatches GET /event/{event_key}/matches
getEventMatchesKeys GET /event/{event_key}/matches/keys
getEventMatchesSimple GET /event/{event_key}/matches/simple
getMatch GET /match/{match_key}
getMatchSimple GET /match/{match_key}/simple
getMatchTimeseries GET /match/{match_key}/timeseries
getMatchZebra GET /match/{match_key}/zebra_motionworks
getTeamEventMatches GET /team/{team_key}/event/{event_key}/matches
getTeamEventMatchesKeys GET /team/{team_key}/event/{event_key}/matches/keys
getTeamEventMatchesSimple GET /team/{team_key}/event/{event_key}/matches/simple
getTeamMatchesByYear GET /team/{team_key}/matches/{year}
getTeamMatchesByYearKeys GET /team/{team_key}/matches/{year}/keys
getTeamMatchesByYearSimple GET /team/{team_key}/matches/{year}/simple

getEventMatchTimeseries

BuiltList getEventMatchTimeseries(eventKey, ifNoneMatch)

Gets an array of Match Keys for the given event key that have timeseries data. Returns an empty array if no matches have timeseries data. WARNING: This is not official data, and is subject to a significant possibility of error, or missing data. Do not rely on this data for any purpose. In fact, pretend we made it up. WARNING: This endpoint and corresponding data models are under active development and may change at any time, including in breaking ways.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getEventMatchTimeseries(eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getEventMatchTimeseries: $e\n');
}

Parameters

Name Type Description Notes
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<String>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEventMatches

BuiltList getEventMatches(eventKey, ifNoneMatch)

Gets a list of matches for the given event.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getEventMatches(eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getEventMatches: $e\n');
}

Parameters

Name Type Description Notes
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<Match>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEventMatchesKeys

BuiltList getEventMatchesKeys(eventKey, ifNoneMatch)

Gets a list of match keys for the given event.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getEventMatchesKeys(eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getEventMatchesKeys: $e\n');
}

Parameters

Name Type Description Notes
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<String>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEventMatchesSimple

BuiltList getEventMatchesSimple(eventKey, ifNoneMatch)

Gets a short-form list of matches for the given event.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getEventMatchesSimple(eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getEventMatchesSimple: $e\n');
}

Parameters

Name Type Description Notes
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<MatchSimple>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMatch

Match getMatch(matchKey, ifNoneMatch)

Gets a Match object for the given match key.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String matchKey = matchKey_example; // String | TBA Match Key, eg `2016nytr_qm1`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getMatch(matchKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getMatch: $e\n');
}

Parameters

Name Type Description Notes
matchKey String TBA Match Key, eg 2016nytr_qm1
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

Match

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMatchSimple

MatchSimple getMatchSimple(matchKey, ifNoneMatch)

Gets a short-form Match object for the given match key.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String matchKey = matchKey_example; // String | TBA Match Key, eg `2016nytr_qm1`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getMatchSimple(matchKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getMatchSimple: $e\n');
}

Parameters

Name Type Description Notes
matchKey String TBA Match Key, eg 2016nytr_qm1
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

MatchSimple

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMatchTimeseries

BuiltList getMatchTimeseries(matchKey, ifNoneMatch)

Gets an array of game-specific Match Timeseries objects for the given match key or an empty array if not available. WARNING: This is not official data, and is subject to a significant possibility of error, or missing data. Do not rely on this data for any purpose. In fact, pretend we made it up. WARNING: This endpoint and corresponding data models are under active development and may change at any time, including in breaking ways.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String matchKey = matchKey_example; // String | TBA Match Key, eg `2016nytr_qm1`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getMatchTimeseries(matchKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getMatchTimeseries: $e\n');
}

Parameters

Name Type Description Notes
matchKey String TBA Match Key, eg 2016nytr_qm1
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<JsonObject>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMatchZebra

Zebra getMatchZebra(matchKey, ifNoneMatch)

Gets Zebra MotionWorks data for a Match for the given match key.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String matchKey = matchKey_example; // String | TBA Match Key, eg `2016nytr_qm1`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getMatchZebra(matchKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getMatchZebra: $e\n');
}

Parameters

Name Type Description Notes
matchKey String TBA Match Key, eg 2016nytr_qm1
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

Zebra

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamEventMatches

BuiltList getTeamEventMatches(teamKey, eventKey, ifNoneMatch)

Gets a list of matches for the given team and event.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String teamKey = teamKey_example; // String | TBA Team Key, eg `frc254`
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getTeamEventMatches(teamKey, eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getTeamEventMatches: $e\n');
}

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg frc254
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<Match>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamEventMatchesKeys

BuiltList getTeamEventMatchesKeys(teamKey, eventKey, ifNoneMatch)

Gets a list of match keys for matches for the given team and event.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String teamKey = teamKey_example; // String | TBA Team Key, eg `frc254`
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getTeamEventMatchesKeys(teamKey, eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getTeamEventMatchesKeys: $e\n');
}

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg frc254
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<String>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamEventMatchesSimple

BuiltList getTeamEventMatchesSimple(teamKey, eventKey, ifNoneMatch)

Gets a short-form list of matches for the given team and event.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String teamKey = teamKey_example; // String | TBA Team Key, eg `frc254`
final String eventKey = eventKey_example; // String | TBA Event Key, eg `2016nytr`
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getTeamEventMatchesSimple(teamKey, eventKey, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getTeamEventMatchesSimple: $e\n');
}

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg frc254
eventKey String TBA Event Key, eg 2016nytr
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<Match>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamMatchesByYear

BuiltList getTeamMatchesByYear(teamKey, year, ifNoneMatch)

Gets a list of matches for the given team and year.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String teamKey = teamKey_example; // String | TBA Team Key, eg `frc254`
final int year = 56; // int | Competition Year (or Season). Must be 4 digits.
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getTeamMatchesByYear(teamKey, year, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getTeamMatchesByYear: $e\n');
}

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg frc254
year int Competition Year (or Season). Must be 4 digits.
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<Match>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamMatchesByYearKeys

BuiltList getTeamMatchesByYearKeys(teamKey, year, ifNoneMatch)

Gets a list of match keys for matches for the given team and year.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String teamKey = teamKey_example; // String | TBA Team Key, eg `frc254`
final int year = 56; // int | Competition Year (or Season). Must be 4 digits.
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getTeamMatchesByYearKeys(teamKey, year, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getTeamMatchesByYearKeys: $e\n');
}

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg frc254
year int Competition Year (or Season). Must be 4 digits.
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<String>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamMatchesByYearSimple

BuiltList getTeamMatchesByYearSimple(teamKey, year, ifNoneMatch)

Gets a short-form list of matches for the given team and year.

Example

import 'package:tba_api_v3/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';

final api = TbaApiV3().getMatchApi();
final String teamKey = teamKey_example; // String | TBA Team Key, eg `frc254`
final int year = 56; // int | Competition Year (or Season). Must be 4 digits.
final String ifNoneMatch = ifNoneMatch_example; // String | Value of the `ETag` header in the most recently cached response by the client.

try {
    final response = api.getTeamMatchesByYearSimple(teamKey, year, ifNoneMatch);
    print(response);
} catch on DioException (e) {
    print('Exception when calling MatchApi->getTeamMatchesByYearSimple: $e\n');
}

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg frc254
year int Competition Year (or Season). Must be 4 digits.
ifNoneMatch String Value of the ETag header in the most recently cached response by the client. [optional]

Return type

BuiltList<MatchSimple>

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]