ftc_api_v3_client
FtcApiV3Client - the Ruby gem for the FTC Scoring Data API
THIS API IS CURRENTLY IN EARLY DEVELOPMENT AND MAY CHANGE WITHOUT WARNING. THIS PAGE WILL BE UPDATED ONCE THE API IS OFFICIALLY RELEASED.
This API provides event and scoring data for FIRST Tech Challenge. Applications that present result data directly are encouraged to directly call this API rather than maintaining their own copies of the data. All endpoints are cached by our CDN and may return data up to one hour old for data that changes infrequently. During an event, data that changes frequently (e.g. match results and rankings) should not be more than 30 seconds old.
NOTE: For developers who have integrated with the v2 API in the past, this is a policy shift, as previously developers were encouraged to maintain their own copy of relevant data. In the interest of providing the community with the most up-to-date data and reducing the burden for applications that are not performing their own analytics on event data, we are now encouraging directly integrating our API into websites and apps.
Also note that all endpoints that accept a year argument now expect the year in which the FIRST Championship for that season is held. This is a change from the previous API and FTC-events website, which used the kickoff year.
To report any issues, please report an issue here: https://github.com/FIRST-Tech-Challenge/scorekeeper/issues/new?template=api-bug-report.md To request additional data, please submit a feature request here: https://github.com/FIRST-Tech-Challenge/scorekeeper/issues/new?template=api-feature-request.md
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v3
- Package version: 0.1.2
- Generator version: 7.20.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build ftc_api_v3_client.gemspec
Then either install the gem locally:
gem install ./ftc_api_v3_client-0.1.2.gem
(for development, run gem install --dev ./ftc_api_v3_client-0.1.2.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 'ftc_api_v3_client', '~> 0.1.2'
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 'ftc_api_v3_client', :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 'ftc_api_v3_client'
# Setup authorization
FtcApiV3Client.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['api_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['api_key'] = 'Bearer'
end
api_instance = FtcApiV3Client::EventsApi.new
cmp_year = 'cmp_year_example' # String | The year of the FIRST Championship for the requested season
event_code = 'event_code_example' # String | The code (abbreviation) for the event
begin
#Get event from season
result = api_instance.get_event(cmp_year, event_code)
p result
rescue FtcApiV3Client::ApiError => e
puts "Exception when calling EventsApi->get_event: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://ftc-api.firstinspires.org
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FtcApiV3Client::EventsApi | get_event | GET /api/v3/seasons/cmpYear/events/eventCode | Get event from season |
| FtcApiV3Client::EventsApi | get_event_advancement_from | GET /api/v3/seasons/cmpYear/events/eventCode/advancement/from | Get event advancement (from) |
| FtcApiV3Client::EventsApi | get_event_alliance_selections | GET /api/v3/seasons/cmpYear/events/eventCode/alliances/selections | Get event alliance selections |
| FtcApiV3Client::EventsApi | get_event_alliances | GET /api/v3/seasons/cmpYear/events/eventCode/alliances | Get event alliances |
| FtcApiV3Client::EventsApi | get_event_awards | GET /api/v3/seasons/cmpYear/events/eventCode/awards | Get event awards |
| FtcApiV3Client::EventsApi | get_event_match | GET /api/v3/seasons/cmpYear/events/eventCode/matches/tournamentLevel/series/number | Get match details |
| FtcApiV3Client::EventsApi | get_event_pit_map | GET /api/v3/seasons/cmpYear/events/eventCode/pitMap | Get pit map |
| FtcApiV3Client::EventsApi | get_event_playoff_rankings | GET /api/v3/seasons/cmpYear/events/eventCode/playoffRankings | Get event playoff rankings |
| FtcApiV3Client::EventsApi | get_event_playoff_structure | GET /api/v3/seasons/cmpYear/events/eventCode/playoffStructure | Get playoff structure |
| FtcApiV3Client::EventsApi | get_event_rankings | GET /api/v3/seasons/cmpYear/events/eventCode/rankings | Get event rankings |
| FtcApiV3Client::EventsApi | list_event_matches | GET /api/v3/seasons/cmpYear/events/eventCode/matches | List event matches |
| FtcApiV3Client::EventsApi | list_event_teams | GET /api/v3/seasons/cmpYear/events/eventCode/teams | List teams for an event |
| FtcApiV3Client::EventsApi | list_events | GET /api/v3/seasons/cmpYear/events | List events for a season |
| FtcApiV3Client::LeaguesApi | get_league | GET /api/v3/seasons/cmpYear/regions/regionCode/leagues/leagueCode | Gets a single league from a region |
| FtcApiV3Client::LeaguesApi | get_league_rankings | GET /api/v3/seasons/cmpYear/regions/regionCode/leagues/leagueCode/rankings | Get rankings for a league |
| FtcApiV3Client::LeaguesApi | list_league_events | GET /api/v3/seasons/cmpYear/regions/regionCode/leagues/leagueCode/events | List events for a league |
| FtcApiV3Client::LeaguesApi | list_league_teams | GET /api/v3/seasons/cmpYear/regions/regionCode/leagues/leagueCode/teams | List teams for a league |
| FtcApiV3Client::LeaguesApi | list_leagues | GET /api/v3/seasons/cmpYear/regions/regionCode/leagues | Lists leagues for a region |
| FtcApiV3Client::RegionsApi | get_region | GET /api/v3/seasons/cmpYear/regions/regionCode | Get region from a season |
| FtcApiV3Client::RegionsApi | list_region_events | GET /api/v3/seasons/cmpYear/regions/regionCode/events | List events for a regions |
| FtcApiV3Client::RegionsApi | list_region_teams | GET /api/v3/seasons/cmpYear/regions/regionCode/teams | List teams for a region |
| FtcApiV3Client::RegionsApi | list_regions | GET /api/v3/seasons/cmpYear/regions | List regions for a season |
| FtcApiV3Client::SeasonsApi | get_season | GET /api/v3/seasons/cmpYear | Get single FTC season |
| FtcApiV3Client::SeasonsApi | list_seasons | GET /api/v3/seasons | List all FTC seasons |
| FtcApiV3Client::TeamsApi | get_team | GET /api/v3/seasons/cmpYear/teams/number | Get teams information |
| FtcApiV3Client::TeamsApi | get_team_details | GET /api/v3/seasons/cmpYear/teams/number/details | Get detailed team information |
| FtcApiV3Client::TeamsApi | get_team_history | GET /api/v3/teams/number | Get team history |
| FtcApiV3Client::TeamsApi | list_team_avatars | GET /api/v3/seasons/cmpYear/avatars | List team avatars for a season |
| FtcApiV3Client::TeamsApi | list_teams | GET /api/v3/seasons/cmpYear/teams | List teams for a season |
Documentation for Models
- FtcApiV3Client::ApiV3AdvancementFrom
- FtcApiV3Client::ApiV3AdvancementFromSlot
- FtcApiV3Client::ApiV3AdvancementStatus
- FtcApiV3Client::ApiV3AllianceColor
- FtcApiV3Client::ApiV3AllianceDescription
- FtcApiV3Client::ApiV3AllianceMatch
- FtcApiV3Client::ApiV3AllianceMatchDetails
- FtcApiV3Client::ApiV3AllianceMatchParticipants
- FtcApiV3Client::ApiV3AllianceMatchResults
- FtcApiV3Client::ApiV3AllianceMatchResultsDetails
- FtcApiV3Client::ApiV3AlliancePlayoffMatchParticipants
- FtcApiV3Client::ApiV3AllianceSelection
- FtcApiV3Client::ApiV3AllianceSelections
- FtcApiV3Client::ApiV3AllianceSimpleMatchParticipants
- FtcApiV3Client::ApiV3Award
- FtcApiV3Client::ApiV3AwardRecipient
- FtcApiV3Client::ApiV3AwardType
- FtcApiV3Client::ApiV3Awards
- FtcApiV3Client::ApiV3BasePlayoffSeriesDescription
- FtcApiV3Client::ApiV3BasicAllianceDescription
- FtcApiV3Client::ApiV3CenterStageRemoteScoreDetail
- FtcApiV3Client::ApiV3CenterStageScoreDetail
- FtcApiV3Client::ApiV3CompetingType
- FtcApiV3Client::ApiV3Coordinates
- FtcApiV3Client::ApiV3CsAchievementsDetail
- FtcApiV3Client::ApiV3CsEndLocation
- FtcApiV3Client::ApiV3CsPointsDetail
- FtcApiV3Client::ApiV3CsRemoteAchievementsDetail
- FtcApiV3Client::ApiV3CsRemotePointsDetail
- FtcApiV3Client::ApiV3DecodeAchievementsDetail
- FtcApiV3Client::ApiV3DecodeArtifactType
- FtcApiV3Client::ApiV3DecodePointsDetail
- FtcApiV3Client::ApiV3DecodeScoreDetail
- FtcApiV3Client::ApiV3DecodeTeleopBaseLocation
- FtcApiV3Client::ApiV3Division
- FtcApiV3Client::ApiV3DoubleEliminationSeriesDescription
- FtcApiV3Client::ApiV3DoubleElimsBracketHalf
- FtcApiV3Client::ApiV3Event
- FtcApiV3Client::ApiV3EventFormat
- FtcApiV3Client::ApiV3EventLiveStream
- FtcApiV3Client::ApiV3EventParticipant
- FtcApiV3Client::ApiV3EventParticipants
- FtcApiV3Client::ApiV3EventType
- FtcApiV3Client::ApiV3Events
- FtcApiV3Client::ApiV3FFAchievementsDetail
- FtcApiV3Client::ApiV3FFAutoLocation
- FtcApiV3Client::ApiV3FFEndLocation
- FtcApiV3Client::ApiV3FFPointsDetail
- FtcApiV3Client::ApiV3FFRemoteAchievementsDetail
- FtcApiV3Client::ApiV3FFRemotePointsDetail
- FtcApiV3Client::ApiV3FreightFrenzyRemoteScoreDetail
- FtcApiV3Client::ApiV3FreightFrenzyScoreDetail
- FtcApiV3Client::ApiV3IntoTheDeepScoreDetail
- FtcApiV3Client::ApiV3ItdAchievementsDetail
- FtcApiV3Client::ApiV3ItdAutoLocation
- FtcApiV3Client::ApiV3ItdPointsDetail
- FtcApiV3Client::ApiV3ItdTeleopLocation
- FtcApiV3Client::ApiV3JunctionElement
- FtcApiV3Client::ApiV3League
- FtcApiV3Client::ApiV3LeagueDetails
- FtcApiV3Client::ApiV3LeagueMembershipDetails
- FtcApiV3Client::ApiV3Leagues
- FtcApiV3Client::ApiV3Match
- FtcApiV3Client::ApiV3MatchAlliance
- FtcApiV3Client::ApiV3MatchDetails
- FtcApiV3Client::ApiV3MatchTeam
- FtcApiV3Client::ApiV3Matches
- FtcApiV3Client::ApiV3PitMap
- FtcApiV3Client::ApiV3PitMapCellType
- FtcApiV3Client::ApiV3PitMapElement
- FtcApiV3Client::ApiV3PitMapLabelOrientation
- FtcApiV3Client::ApiV3PlayoffAlliance
- FtcApiV3Client::ApiV3PlayoffAlliances
- FtcApiV3Client::ApiV3PlayoffMatchAlliance
- FtcApiV3Client::ApiV3PlayoffRanking
- FtcApiV3Client::ApiV3PlayoffRankings
- FtcApiV3Client::ApiV3PlayoffSeriesDescription
- FtcApiV3Client::ApiV3PlayoffStructure
- FtcApiV3Client::ApiV3PlayoffType
- FtcApiV3Client::ApiV3PowerPlayAchievementsDetail
- FtcApiV3Client::ApiV3PowerPlayAutoLocation
- FtcApiV3Client::ApiV3PowerPlayPointsDetail
- FtcApiV3Client::ApiV3PowerPlayRemoteAchievementsDetail
- FtcApiV3Client::ApiV3PowerPlayRemotePointsDetail
- FtcApiV3Client::ApiV3PowerPlayRemoteScoreDetail
- FtcApiV3Client::ApiV3PowerPlayScoreDetail
- FtcApiV3Client::ApiV3Ranking
- FtcApiV3Client::ApiV3Rankings
- FtcApiV3Client::ApiV3Region
- FtcApiV3Client::ApiV3Regions
- FtcApiV3Client::ApiV3RemoteJunctionElement
- FtcApiV3Client::ApiV3RemoteScoreDetail
- FtcApiV3Client::ApiV3RoundRobinAllianceDescription
- FtcApiV3Client::ApiV3ScoreDetail
- FtcApiV3Client::ApiV3Season
- FtcApiV3Client::ApiV3Seasons
- FtcApiV3Client::ApiV3SelectionOperation
- FtcApiV3Client::ApiV3SeriesAllianceDescription
- FtcApiV3Client::ApiV3SeriesAllianceState
- FtcApiV3Client::ApiV3SimpleEvent
- FtcApiV3Client::ApiV3SimpleTeam
- FtcApiV3Client::ApiV3SingleAwardRecipient
- FtcApiV3Client::ApiV3SingleTeamMatch
- FtcApiV3Client::ApiV3SingleTeamMatchDetails
- FtcApiV3Client::ApiV3SingleTeamMatchParticipants
- FtcApiV3Client::ApiV3SingleTeamMatchResults
- FtcApiV3Client::ApiV3SingleTeamMatchResultsDetails
- FtcApiV3Client::ApiV3SkystoneAchievementsDetail
- FtcApiV3Client::ApiV3SkystonePointsDetail
- FtcApiV3Client::ApiV3SkystoneScoreDetail
- FtcApiV3Client::ApiV3Stone
- FtcApiV3Client::ApiV3Team
- FtcApiV3Client::ApiV3TeamAvatar
- FtcApiV3Client::ApiV3TeamAvatars
- FtcApiV3Client::ApiV3TeamDetails
- FtcApiV3Client::ApiV3TeamEventParticipation
- FtcApiV3Client::ApiV3TeamEventParticipationDetails
- FtcApiV3Client::ApiV3TeamHistory
- FtcApiV3Client::ApiV3TeamSeasonHistory
- FtcApiV3Client::ApiV3Teams
- FtcApiV3Client::ApiV3TournamentLevel
- FtcApiV3Client::ApiV3UgAchievementsDetail
- FtcApiV3Client::ApiV3UgPointsDetail
- FtcApiV3Client::ApiV3UgRemoteAchievementsDetail
- FtcApiV3Client::ApiV3UgRemotePointsDetail
- FtcApiV3Client::ApiV3UgWobbleLocation
- FtcApiV3Client::ApiV3UltimateGoalRemoteScoreDetail
- FtcApiV3Client::ApiV3UltimateGoalScoreDetail
Documentation for Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: api_key
- Location: URL query string