Skip to content

TBA-API/tba-api-client-ruby

Repository files navigation

tba-api-v3client

TBA API v3 Ruby Client - the Ruby gem for the The Blue Alliance API v3

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

  • API version: 3.8.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build tba-api-v3client.gemspec

Then either install the gem locally:

gem install ./tba-api-v3client-1.0.0.gem

(for development, run gem install --dev ./tba-api-v3client-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'tba-api-v3client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'tba-api-v3client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# 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::DistrictApi.new
district_key = 'district_key_example' # String | TBA District Key, eg `2016fim`
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_district_events(district_key, opts)
  p result
rescue TBA API v3 Ruby Client::ApiError => e
  puts "Exception when calling DistrictApi->get_district_events: #{e}"
end

Documentation for API Endpoints

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

Class Method HTTP request Description
TBA API v3 Ruby Client::DistrictApi get_district_events GET /district/{district_key}/events
TBA API v3 Ruby Client::DistrictApi get_district_events_keys GET /district/{district_key}/events/keys
TBA API v3 Ruby Client::DistrictApi get_district_events_simple GET /district/{district_key}/events/simple
TBA API v3 Ruby Client::DistrictApi get_district_rankings GET /district/{district_key}/rankings
TBA API v3 Ruby Client::DistrictApi get_district_teams GET /district/{district_key}/teams
TBA API v3 Ruby Client::DistrictApi get_district_teams_keys GET /district/{district_key}/teams/keys
TBA API v3 Ruby Client::DistrictApi get_district_teams_simple GET /district/{district_key}/teams/simple
TBA API v3 Ruby Client::DistrictApi get_districts_by_year GET /districts/{year}
TBA API v3 Ruby Client::DistrictApi get_event_district_points GET /event/{event_key}/district_points
TBA API v3 Ruby Client::DistrictApi get_team_districts GET /team/{team_key}/districts
TBA API v3 Ruby Client::EventApi get_district_events GET /district/{district_key}/events
TBA API v3 Ruby Client::EventApi get_district_events_keys GET /district/{district_key}/events/keys
TBA API v3 Ruby Client::EventApi get_district_events_simple GET /district/{district_key}/events/simple
TBA API v3 Ruby Client::EventApi get_event GET /event/{event_key}
TBA API v3 Ruby Client::EventApi get_event_alliances GET /event/{event_key}/alliances
TBA API v3 Ruby Client::EventApi get_event_awards GET /event/{event_key}/awards
TBA API v3 Ruby Client::EventApi get_event_district_points GET /event/{event_key}/district_points
TBA API v3 Ruby Client::EventApi get_event_insights GET /event/{event_key}/insights
TBA API v3 Ruby Client::EventApi get_event_match_timeseries GET /event/{event_key}/matches/timeseries
TBA API v3 Ruby Client::EventApi get_event_matches GET /event/{event_key}/matches
TBA API v3 Ruby Client::EventApi get_event_matches_keys GET /event/{event_key}/matches/keys
TBA API v3 Ruby Client::EventApi get_event_matches_simple GET /event/{event_key}/matches/simple
TBA API v3 Ruby Client::EventApi get_event_op_rs GET /event/{event_key}/oprs
TBA API v3 Ruby Client::EventApi get_event_predictions GET /event/{event_key}/predictions
TBA API v3 Ruby Client::EventApi get_event_rankings GET /event/{event_key}/rankings
TBA API v3 Ruby Client::EventApi get_event_simple GET /event/{event_key}/simple
TBA API v3 Ruby Client::EventApi get_event_teams GET /event/{event_key}/teams
TBA API v3 Ruby Client::EventApi get_event_teams_keys GET /event/{event_key}/teams/keys
TBA API v3 Ruby Client::EventApi get_event_teams_simple GET /event/{event_key}/teams/simple
TBA API v3 Ruby Client::EventApi get_event_teams_statuses GET /event/{event_key}/teams/statuses
TBA API v3 Ruby Client::EventApi get_events_by_year GET /events/{year}
TBA API v3 Ruby Client::EventApi get_events_by_year_keys GET /events/{year}/keys
TBA API v3 Ruby Client::EventApi get_events_by_year_simple GET /events/{year}/simple
TBA API v3 Ruby Client::EventApi get_team_event_awards GET /team/{team_key}/event/{event_key}/awards
TBA API v3 Ruby Client::EventApi get_team_event_matches GET /team/{team_key}/event/{event_key}/matches
TBA API v3 Ruby Client::EventApi get_team_event_matches_keys GET /team/{team_key}/event/{event_key}/matches/keys
TBA API v3 Ruby Client::EventApi get_team_event_matches_simple GET /team/{team_key}/event/{event_key}/matches/simple
TBA API v3 Ruby Client::EventApi get_team_event_status GET /team/{team_key}/event/{event_key}/status
TBA API v3 Ruby Client::EventApi get_team_events GET /team/{team_key}/events
TBA API v3 Ruby Client::EventApi get_team_events_by_year GET /team/{team_key}/events/{year}
TBA API v3 Ruby Client::EventApi get_team_events_by_year_keys GET /team/{team_key}/events/{year}/keys
TBA API v3 Ruby Client::EventApi get_team_events_by_year_simple GET /team/{team_key}/events/{year}/simple
TBA API v3 Ruby Client::EventApi get_team_events_keys GET /team/{team_key}/events/keys
TBA API v3 Ruby Client::EventApi get_team_events_simple GET /team/{team_key}/events/simple
TBA API v3 Ruby Client::EventApi get_team_events_statuses_by_year GET /team/{team_key}/events/{year}/statuses
TBA API v3 Ruby Client::ListApi get_district_events GET /district/{district_key}/events
TBA API v3 Ruby Client::ListApi get_district_events_keys GET /district/{district_key}/events/keys
TBA API v3 Ruby Client::ListApi get_district_events_simple GET /district/{district_key}/events/simple
TBA API v3 Ruby Client::ListApi get_district_rankings GET /district/{district_key}/rankings
TBA API v3 Ruby Client::ListApi get_district_teams GET /district/{district_key}/teams
TBA API v3 Ruby Client::ListApi get_district_teams_keys GET /district/{district_key}/teams/keys
TBA API v3 Ruby Client::ListApi get_district_teams_simple GET /district/{district_key}/teams/simple
TBA API v3 Ruby Client::ListApi get_event_teams GET /event/{event_key}/teams
TBA API v3 Ruby Client::ListApi get_event_teams_keys GET /event/{event_key}/teams/keys
TBA API v3 Ruby Client::ListApi get_event_teams_simple GET /event/{event_key}/teams/simple
TBA API v3 Ruby Client::ListApi get_event_teams_statuses GET /event/{event_key}/teams/statuses
TBA API v3 Ruby Client::ListApi get_events_by_year GET /events/{year}
TBA API v3 Ruby Client::ListApi get_events_by_year_keys GET /events/{year}/keys
TBA API v3 Ruby Client::ListApi get_events_by_year_simple GET /events/{year}/simple
TBA API v3 Ruby Client::ListApi get_team_events_statuses_by_year GET /team/{team_key}/events/{year}/statuses
TBA API v3 Ruby Client::ListApi get_teams GET /teams/{page_num}
TBA API v3 Ruby Client::ListApi get_teams_by_year GET /teams/{year}/{page_num}
TBA API v3 Ruby Client::ListApi get_teams_by_year_keys GET /teams/{year}/{page_num}/keys
TBA API v3 Ruby Client::ListApi get_teams_by_year_simple GET /teams/{year}/{page_num}/simple
TBA API v3 Ruby Client::ListApi get_teams_keys GET /teams/{page_num}/keys
TBA API v3 Ruby Client::ListApi get_teams_simple GET /teams/{page_num}/simple
TBA API v3 Ruby Client::MatchApi get_event_match_timeseries GET /event/{event_key}/matches/timeseries
TBA API v3 Ruby Client::MatchApi get_event_matches GET /event/{event_key}/matches
TBA API v3 Ruby Client::MatchApi get_event_matches_keys GET /event/{event_key}/matches/keys
TBA API v3 Ruby Client::MatchApi get_event_matches_simple GET /event/{event_key}/matches/simple
TBA API v3 Ruby Client::MatchApi get_match GET /match/{match_key}
TBA API v3 Ruby Client::MatchApi get_match_simple GET /match/{match_key}/simple
TBA API v3 Ruby Client::MatchApi get_match_timeseries GET /match/{match_key}/timeseries
TBA API v3 Ruby Client::MatchApi get_match_zebra GET /match/{match_key}/zebra_motionworks
TBA API v3 Ruby Client::MatchApi get_team_event_matches GET /team/{team_key}/event/{event_key}/matches
TBA API v3 Ruby Client::MatchApi get_team_event_matches_keys GET /team/{team_key}/event/{event_key}/matches/keys
TBA API v3 Ruby Client::MatchApi get_team_event_matches_simple GET /team/{team_key}/event/{event_key}/matches/simple
TBA API v3 Ruby Client::MatchApi get_team_matches_by_year GET /team/{team_key}/matches/{year}
TBA API v3 Ruby Client::MatchApi get_team_matches_by_year_keys GET /team/{team_key}/matches/{year}/keys
TBA API v3 Ruby Client::MatchApi get_team_matches_by_year_simple GET /team/{team_key}/matches/{year}/simple
TBA API v3 Ruby Client::TBAApi get_status GET /status
TBA API v3 Ruby Client::TeamApi get_district_rankings GET /district/{district_key}/rankings
TBA API v3 Ruby Client::TeamApi get_district_teams GET /district/{district_key}/teams
TBA API v3 Ruby Client::TeamApi get_district_teams_keys GET /district/{district_key}/teams/keys
TBA API v3 Ruby Client::TeamApi get_district_teams_simple GET /district/{district_key}/teams/simple
TBA API v3 Ruby Client::TeamApi get_event_teams GET /event/{event_key}/teams
TBA API v3 Ruby Client::TeamApi get_event_teams_keys GET /event/{event_key}/teams/keys
TBA API v3 Ruby Client::TeamApi get_event_teams_simple GET /event/{event_key}/teams/simple
TBA API v3 Ruby Client::TeamApi get_event_teams_statuses GET /event/{event_key}/teams/statuses
TBA API v3 Ruby Client::TeamApi get_team GET /team/{team_key}
TBA API v3 Ruby Client::TeamApi get_team_awards GET /team/{team_key}/awards
TBA API v3 Ruby Client::TeamApi get_team_awards_by_year GET /team/{team_key}/awards/{year}
TBA API v3 Ruby Client::TeamApi get_team_districts GET /team/{team_key}/districts
TBA API v3 Ruby Client::TeamApi get_team_event_awards GET /team/{team_key}/event/{event_key}/awards
TBA API v3 Ruby Client::TeamApi get_team_event_matches GET /team/{team_key}/event/{event_key}/matches
TBA API v3 Ruby Client::TeamApi get_team_event_matches_keys GET /team/{team_key}/event/{event_key}/matches/keys
TBA API v3 Ruby Client::TeamApi get_team_event_matches_simple GET /team/{team_key}/event/{event_key}/matches/simple
TBA API v3 Ruby Client::TeamApi get_team_event_status GET /team/{team_key}/event/{event_key}/status
TBA API v3 Ruby Client::TeamApi get_team_events GET /team/{team_key}/events
TBA API v3 Ruby Client::TeamApi get_team_events_by_year GET /team/{team_key}/events/{year}
TBA API v3 Ruby Client::TeamApi get_team_events_by_year_keys GET /team/{team_key}/events/{year}/keys
TBA API v3 Ruby Client::TeamApi get_team_events_by_year_simple GET /team/{team_key}/events/{year}/simple
TBA API v3 Ruby Client::TeamApi get_team_events_keys GET /team/{team_key}/events/keys
TBA API v3 Ruby Client::TeamApi get_team_events_simple GET /team/{team_key}/events/simple
TBA API v3 Ruby Client::TeamApi get_team_events_statuses_by_year GET /team/{team_key}/events/{year}/statuses
TBA API v3 Ruby Client::TeamApi get_team_matches_by_year GET /team/{team_key}/matches/{year}
TBA API v3 Ruby Client::TeamApi get_team_matches_by_year_keys GET /team/{team_key}/matches/{year}/keys
TBA API v3 Ruby Client::TeamApi get_team_matches_by_year_simple GET /team/{team_key}/matches/{year}/simple
TBA API v3 Ruby Client::TeamApi get_team_media_by_tag GET /team/{team_key}/media/tag/{media_tag}
TBA API v3 Ruby Client::TeamApi get_team_media_by_tag_year GET /team/{team_key}/media/tag/{media_tag}/{year}
TBA API v3 Ruby Client::TeamApi get_team_media_by_year GET /team/{team_key}/media/{year}
TBA API v3 Ruby Client::TeamApi get_team_robots GET /team/{team_key}/robots
TBA API v3 Ruby Client::TeamApi get_team_simple GET /team/{team_key}/simple
TBA API v3 Ruby Client::TeamApi get_team_social_media GET /team/{team_key}/social_media
TBA API v3 Ruby Client::TeamApi get_team_years_participated GET /team/{team_key}/years_participated
TBA API v3 Ruby Client::TeamApi get_teams GET /teams/{page_num}
TBA API v3 Ruby Client::TeamApi get_teams_by_year GET /teams/{year}/{page_num}
TBA API v3 Ruby Client::TeamApi get_teams_by_year_keys GET /teams/{year}/{page_num}/keys
TBA API v3 Ruby Client::TeamApi get_teams_by_year_simple GET /teams/{year}/{page_num}/simple
TBA API v3 Ruby Client::TeamApi get_teams_keys GET /teams/{page_num}/keys
TBA API v3 Ruby Client::TeamApi get_teams_simple 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published