Skip to content

Latest commit

 

History

History
804 lines (548 loc) · 24.3 KB

MatchApi.md

File metadata and controls

804 lines (548 loc) · 24.3 KB

TbaApiV3client.MatchApi

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

[String] getEventMatchTimeseries(eventKey, opts)

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 TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let eventKey = "eventKey_example"; // String | TBA Event Key, eg `2016nytr`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getEventMatchTimeseries(eventKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

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

Return type

[String]

Authorization

apiKey

HTTP request headers

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

getEventMatches

[Match] getEventMatches(eventKey, opts)

Gets a list of matches for the given event.

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let eventKey = "eventKey_example"; // String | TBA Event Key, eg `2016nytr`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getEventMatches(eventKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
eventKey String TBA Event Key, eg `2016nytr`
ifModifiedSince String Value of the `Last-Modified` 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

getEventMatchesKeys

[String] getEventMatchesKeys(eventKey, opts)

Gets a list of match keys for the given event.

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let eventKey = "eventKey_example"; // String | TBA Event Key, eg `2016nytr`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getEventMatchesKeys(eventKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

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

Return type

[String]

Authorization

apiKey

HTTP request headers

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

getEventMatchesSimple

[MatchSimple] getEventMatchesSimple(eventKey, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let eventKey = "eventKey_example"; // String | TBA Event Key, eg `2016nytr`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getEventMatchesSimple(eventKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
eventKey String TBA Event Key, eg `2016nytr`
ifModifiedSince String Value of the `Last-Modified` 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

getMatch

Match getMatch(matchKey, opts)

Gets a `Match` object for the given match key.

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let matchKey = "matchKey_example"; // String | TBA Match Key, eg `2016nytr_qm1`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getMatch(matchKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
matchKey String TBA Match Key, eg `2016nytr_qm1`
ifModifiedSince String Value of the `Last-Modified` 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

getMatchSimple

MatchSimple getMatchSimple(matchKey, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let matchKey = "matchKey_example"; // String | TBA Match Key, eg `2016nytr_qm1`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getMatchSimple(matchKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
matchKey String TBA Match Key, eg `2016nytr_qm1`
ifModifiedSince String Value of the `Last-Modified` 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

getMatchTimeseries

[Object] getMatchTimeseries(matchKey, opts)

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 TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let matchKey = "matchKey_example"; // String | TBA Match Key, eg `2016nytr_qm1`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getMatchTimeseries(matchKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

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

Return type

[Object]

Authorization

apiKey

HTTP request headers

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

getMatchZebra

Zebra getMatchZebra(matchKey, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let matchKey = "matchKey_example"; // String | TBA Match Key, eg `2016nytr_qm1`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getMatchZebra(matchKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
matchKey String TBA Match Key, eg `2016nytr_qm1`
ifModifiedSince String Value of the `Last-Modified` 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

getTeamEventMatches

[Match] getTeamEventMatches(teamKey, eventKey, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let teamKey = "teamKey_example"; // String | TBA Team Key, eg `frc254`
let eventKey = "eventKey_example"; // String | TBA Event Key, eg `2016nytr`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getTeamEventMatches(teamKey, eventKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg `frc254`
eventKey String TBA Event Key, eg `2016nytr`
ifModifiedSince String Value of the `Last-Modified` 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

getTeamEventMatchesKeys

[String] getTeamEventMatchesKeys(teamKey, eventKey, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let teamKey = "teamKey_example"; // String | TBA Team Key, eg `frc254`
let eventKey = "eventKey_example"; // String | TBA Event Key, eg `2016nytr`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getTeamEventMatchesKeys(teamKey, eventKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

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

Return type

[String]

Authorization

apiKey

HTTP request headers

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

getTeamEventMatchesSimple

[Match] getTeamEventMatchesSimple(teamKey, eventKey, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let teamKey = "teamKey_example"; // String | TBA Team Key, eg `frc254`
let eventKey = "eventKey_example"; // String | TBA Event Key, eg `2016nytr`
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getTeamEventMatchesSimple(teamKey, eventKey, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg `frc254`
eventKey String TBA Event Key, eg `2016nytr`
ifModifiedSince String Value of the `Last-Modified` 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

getTeamMatchesByYear

[Match] getTeamMatchesByYear(teamKey, year, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let teamKey = "teamKey_example"; // String | TBA Team Key, eg `frc254`
let year = 56; // Number | Competition Year (or Season). Must be 4 digits.
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getTeamMatchesByYear(teamKey, year, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg `frc254`
year Number Competition Year (or Season). Must be 4 digits.
ifModifiedSince String Value of the `Last-Modified` 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

getTeamMatchesByYearKeys

[String] getTeamMatchesByYearKeys(teamKey, year, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let teamKey = "teamKey_example"; // String | TBA Team Key, eg `frc254`
let year = 56; // Number | Competition Year (or Season). Must be 4 digits.
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getTeamMatchesByYearKeys(teamKey, year, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

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

Return type

[String]

Authorization

apiKey

HTTP request headers

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

getTeamMatchesByYearSimple

[MatchSimple] getTeamMatchesByYearSimple(teamKey, year, opts)

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

Example

import TbaApiV3client from 'tba-api-v3client';
let defaultClient = TbaApiV3client.ApiClient.instance;
// Configure API key authorization: apiKey
let 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 = 'Token';

let apiInstance = new TbaApiV3client.MatchApi();
let teamKey = "teamKey_example"; // String | TBA Team Key, eg `frc254`
let year = 56; // Number | Competition Year (or Season). Must be 4 digits.
let opts = {
  'ifModifiedSince': "ifModifiedSince_example" // String | Value of the `Last-Modified` header in the most recently cached response by the client.
};
apiInstance.getTeamMatchesByYearSimple(teamKey, year, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
teamKey String TBA Team Key, eg `frc254`
year Number Competition Year (or Season). Must be 4 digits.
ifModifiedSince String Value of the `Last-Modified` 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