class FtcEventsClient::ScheduleApi
Attributes
Public Class Methods
# File lib/ftc_events_client/api/schedule_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Event Schedule The schedule API returns the match schedule for the desired tournament level of a particular event in a particular season. You must also specify a `tournamentLevel` from which to return the results. Alternately, you can specify a `teamNumber` to filter the results to only those in which a particular team is participating. There is no validation that the `teamNumber` you request is actually competing at the event, if they are not, the response will be empty. You can also specify the parameters together, but cannot make a request without at least one of the two. @param season [Integer] Numeric year of the event from which the schedule is requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric `eventCode` of the event from which the schedule are requested. Must be at least 3 characters. @param [Hash] opts the optional parameters @option opts [String] :tournament_level Required tournamentLevel of desired score details. (default to '0') @option opts [Integer] :team_number `teamNumber` to search for within the schedule. Only returns matches in which the requested team participated. (default to 0) @option opts [Integer] :start `start` match number for subset of results to return (inclusive). (default to 0) @option opts [Integer] :_end `end` match number for subset of results to return (inclusive). (default to 999) @return [EventScheduleModelVersion2]
# File lib/ftc_events_client/api/schedule_api.rb, line 32 def v20_season_schedule_event_code_get(season, event_code, opts = {}) data, _status_code, _headers = v20_season_schedule_event_code_get_with_http_info(season, event_code, opts) data end
Event Schedule The schedule API returns the match schedule for the desired tournament level of a particular event in a particular season. You must also specify a `tournamentLevel` from which to return the results. Alternately, you can specify a `teamNumber` to filter the results to only those in which a particular team is participating. There is no validation that the `teamNumber` you request is actually competing at the event, if they are not, the response will be empty. You can also specify the parameters together, but cannot make a request without at least one of the two. @param season [Integer] Numeric year of the event from which the schedule is requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric `eventCode` of the event from which the schedule are requested. Must be at least 3 characters. @param [Hash] opts the optional parameters @option opts [String] :tournament_level Required tournamentLevel of desired score details. @option opts [Integer] :team_number `teamNumber` to search for within the schedule. Only returns matches in which the requested team participated. @option opts [Integer] :start `start` match number for subset of results to return (inclusive). @option opts [Integer] :_end `end` match number for subset of results to return (inclusive). @return [Array<(EventScheduleModelVersion2
, Integer, Hash)>] EventScheduleModelVersion2
data, response status code and response headers
# File lib/ftc_events_client/api/schedule_api.rb, line 47 def v20_season_schedule_event_code_get_with_http_info(season, event_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScheduleApi.v20_season_schedule_event_code_get ...' end # verify the required parameter 'season' is set if @api_client.config.client_side_validation && season.nil? fail ArgumentError, "Missing the required parameter 'season' when calling ScheduleApi.v20_season_schedule_event_code_get" end allowable_values = ["qual", "playoff"] if @api_client.config.client_side_validation && opts[:'tournament_level'] && !allowable_values.include?(opts[:'tournament_level']) fail ArgumentError, "invalid value for \"tournament_level\", must be one of #{allowable_values}" end # resource path local_var_path = '/v2.0/{season}/schedule/{eventCode}'.sub('{' + 'season' + '}', CGI.escape(season.to_s)).sub('{' + 'eventCode' + '}', CGI.escape(event_code.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'tournamentLevel'] = opts[:'tournament_level'] if !opts[:'tournament_level'].nil? query_params[:'teamNumber'] = opts[:'team_number'] if !opts[:'team_number'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EventScheduleModelVersion2' # auth_names auth_names = opts[:debug_auth_names] || ['basic'] new_options = opts.merge( :operation => :"ScheduleApi.v20_season_schedule_event_code_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScheduleApi#v20_season_schedule_event_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Hybrid Schedule The schedule API returns the match schedule for the desired tournament level of a particular event in a particular season in the hybrid format. When a match has been played, the match result related details will be filled. When a match has not yet happened, match result related fields will be null. All parameters, except start and end, are required for the hybrid schedule. @param season [Integer] Numeric year of the event from which the hybrid schedule is requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric eventCode of the event from which the hybrid schedule is requested. Must be at least 3 characters. @param tournament_level [String] Required tournamentLevel of desired score details. @param [Hash] opts the optional parameters @option opts [Integer] :start `start` match number for subset of results to return (inclusive). (default to 0) @option opts [Integer] :_end `end` match number for subset of results to return (inclusive). (default to 999) @return [EventScheduleHybridModelVersion2]
# File lib/ftc_events_client/api/schedule_api.rb, line 112 def v20_season_schedule_event_code_tournament_level_hybrid_get(season, event_code, tournament_level, opts = {}) data, _status_code, _headers = v20_season_schedule_event_code_tournament_level_hybrid_get_with_http_info(season, event_code, tournament_level, opts) data end
Hybrid Schedule The schedule API returns the match schedule for the desired tournament level of a particular event in a particular season in the hybrid format. When a match has been played, the match result related details will be filled. When a match has not yet happened, match result related fields will be null. All parameters, except start and end, are required for the hybrid schedule. @param season [Integer] Numeric year of the event from which the hybrid schedule is requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric eventCode of the event from which the hybrid schedule is requested. Must be at least 3 characters. @param tournament_level [String] Required tournamentLevel of desired score details. @param [Hash] opts the optional parameters @option opts [Integer] :start `start` match number for subset of results to return (inclusive). @option opts [Integer] :_end `end` match number for subset of results to return (inclusive). @return [Array<(EventScheduleHybridModelVersion2
, Integer, Hash)>] EventScheduleHybridModelVersion2
data, response status code and response headers
# File lib/ftc_events_client/api/schedule_api.rb, line 126 def v20_season_schedule_event_code_tournament_level_hybrid_get_with_http_info(season, event_code, tournament_level, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScheduleApi.v20_season_schedule_event_code_tournament_level_hybrid_get ...' end # verify the required parameter 'season' is set if @api_client.config.client_side_validation && season.nil? fail ArgumentError, "Missing the required parameter 'season' when calling ScheduleApi.v20_season_schedule_event_code_tournament_level_hybrid_get" end # resource path local_var_path = '/v2.0/{season}/schedule/{eventCode}/{tournamentLevel}/hybrid'.sub('{' + 'season' + '}', CGI.escape(season.to_s)).sub('{' + 'eventCode' + '}', CGI.escape(event_code.to_s)).sub('{' + 'tournamentLevel' + '}', CGI.escape(tournament_level.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EventScheduleHybridModelVersion2' # auth_names auth_names = opts[:debug_auth_names] || ['basic'] new_options = opts.merge( :operation => :"ScheduleApi.v20_season_schedule_event_code_tournament_level_hybrid_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: ScheduleApi#v20_season_schedule_event_code_tournament_level_hybrid_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end