Skip to content

Latest commit

 

History

History
832 lines (562 loc) · 24.6 KB

MatchApi.md

File metadata and controls

832 lines (562 loc) · 24.6 KB

TBA API v3 Ruby Client::MatchApi

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

Method HTTP request Description
get_event_match_timeseries GET /event/{event_key}/matches/timeseries
get_event_matches GET /event/{event_key}/matches
get_event_matches_keys GET /event/{event_key}/matches/keys
get_event_matches_simple GET /event/{event_key}/matches/simple
get_match GET /match/{match_key}
get_match_simple GET /match/{match_key}/simple
get_match_timeseries GET /match/{match_key}/timeseries
get_match_zebra GET /match/{match_key}/zebra_motionworks
get_team_event_matches GET /team/{team_key}/event/{event_key}/matches
get_team_event_matches_keys GET /team/{team_key}/event/{event_key}/matches/keys
get_team_event_matches_simple GET /team/{team_key}/event/{event_key}/matches/simple
get_team_matches_by_year GET /team/{team_key}/matches/{year}
get_team_matches_by_year_keys GET /team/{team_key}/matches/{year}/keys
get_team_matches_by_year_simple GET /team/{team_key}/matches/{year}/simple

get_event_match_timeseries

Array<String> get_event_match_timeseries(event_key, 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

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
event_key = 'event_key_example' # String | TBA Event Key, eg `2016nytr`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_event_match_timeseries(event_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_event_match_timeseries: #{e}"
end

Parameters

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

Return type

Array<String>

Authorization

apiKey

HTTP request headers

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

get_event_matches

Array<Match> get_event_matches(event_key, opts)

Gets a list of matches for the given event.

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
event_key = 'event_key_example' # String | TBA Event Key, eg `2016nytr`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_event_matches(event_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_event_matches: #{e}"
end

Parameters

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

Return type

Array<Match>

Authorization

apiKey

HTTP request headers

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

get_event_matches_keys

Array<String> get_event_matches_keys(event_key, opts)

Gets a list of match keys for the given event.

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
event_key = 'event_key_example' # String | TBA Event Key, eg `2016nytr`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_event_matches_keys(event_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_event_matches_keys: #{e}"
end

Parameters

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

Return type

Array<String>

Authorization

apiKey

HTTP request headers

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

get_event_matches_simple

Array<MatchSimple> get_event_matches_simple(event_key, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
event_key = 'event_key_example' # String | TBA Event Key, eg `2016nytr`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_event_matches_simple(event_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_event_matches_simple: #{e}"
end

Parameters

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

Return type

Array<MatchSimple>

Authorization

apiKey

HTTP request headers

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

get_match

Match get_match(match_key, opts)

Gets a Match object for the given match key.

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
match_key = 'match_key_example' # String | TBA Match Key, eg `2016nytr_qm1`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_match(match_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_match: #{e}"
end

Parameters

Name Type Description Notes
match_key String TBA Match Key, eg `2016nytr_qm1`
if_modified_since 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

get_match_simple

MatchSimple get_match_simple(match_key, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
match_key = 'match_key_example' # String | TBA Match Key, eg `2016nytr_qm1`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_match_simple(match_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_match_simple: #{e}"
end

Parameters

Name Type Description Notes
match_key String TBA Match Key, eg `2016nytr_qm1`
if_modified_since 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

get_match_timeseries

Array<Object> get_match_timeseries(match_key, 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

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
match_key = 'match_key_example' # String | TBA Match Key, eg `2016nytr_qm1`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_match_timeseries(match_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_match_timeseries: #{e}"
end

Parameters

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

Return type

Array<Object>

Authorization

apiKey

HTTP request headers

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

get_match_zebra

Zebra get_match_zebra(match_key, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
match_key = 'match_key_example' # String | TBA Match Key, eg `2016nytr_qm1`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_match_zebra(match_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_match_zebra: #{e}"
end

Parameters

Name Type Description Notes
match_key String TBA Match Key, eg `2016nytr_qm1`
if_modified_since 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

get_team_event_matches

Array<Match> get_team_event_matches(team_key, event_key, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
team_key = 'team_key_example' # String | TBA Team Key, eg `frc254`
event_key = 'event_key_example' # String | TBA Event Key, eg `2016nytr`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_team_event_matches(team_key, event_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_team_event_matches: #{e}"
end

Parameters

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

Return type

Array<Match>

Authorization

apiKey

HTTP request headers

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

get_team_event_matches_keys

Array<String> get_team_event_matches_keys(team_key, event_key, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
team_key = 'team_key_example' # String | TBA Team Key, eg `frc254`
event_key = 'event_key_example' # String | TBA Event Key, eg `2016nytr`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_team_event_matches_keys(team_key, event_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_team_event_matches_keys: #{e}"
end

Parameters

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

Return type

Array<String>

Authorization

apiKey

HTTP request headers

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

get_team_event_matches_simple

Array<Match> get_team_event_matches_simple(team_key, event_key, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
team_key = 'team_key_example' # String | TBA Team Key, eg `frc254`
event_key = 'event_key_example' # String | TBA Event Key, eg `2016nytr`
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_team_event_matches_simple(team_key, event_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_team_event_matches_simple: #{e}"
end

Parameters

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

Return type

Array<Match>

Authorization

apiKey

HTTP request headers

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

get_team_matches_by_year

Array<Match> get_team_matches_by_year(team_key, year, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
team_key = 'team_key_example' # String | TBA Team Key, eg `frc254`
year = 56 # Integer | Competition Year (or Season). Must be 4 digits.
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_team_matches_by_year(team_key, year, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_team_matches_by_year: #{e}"
end

Parameters

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

Return type

Array<Match>

Authorization

apiKey

HTTP request headers

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

get_team_matches_by_year_keys

Array<String> get_team_matches_by_year_keys(team_key, year, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
team_key = 'team_key_example' # String | TBA Team Key, eg `frc254`
year = 56 # Integer | Competition Year (or Season). Must be 4 digits.
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_team_matches_by_year_keys(team_key, year, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_team_matches_by_year_keys: #{e}"
end

Parameters

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

Return type

Array<String>

Authorization

apiKey

HTTP request headers

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

get_team_matches_by_year_simple

Array<MatchSimple> get_team_matches_by_year_simple(team_key, year, opts)

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

Example

# load the gem
require 'tba-api-v3client'
# setup authorization
TBA API v3 Ruby Client.configure do |config|
  # Configure API key authorization: apiKey
  config.api_key['X-TBA-Auth-Key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['X-TBA-Auth-Key'] = 'Bearer'
end

api_instance = TBA API v3 Ruby Client::MatchApi.new
team_key = 'team_key_example' # String | TBA Team Key, eg `frc254`
year = 56 # Integer | Competition Year (or Season). Must be 4 digits.
opts = {
  if_modified_since: 'if_modified_since_example' # String | Value of the `Last-Modified` header in the most recently cached response by the client.
}

begin
  result = api_instance.get_team_matches_by_year_simple(team_key, year, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling MatchApi->get_team_matches_by_year_simple: #{e}"
end

Parameters

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

Return type

Array<MatchSimple>

Authorization

apiKey

HTTP request headers

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