class FtcEventsClient::AllianceSelectionApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/ftc_events_client/api/alliance_selection_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

v20_season_alliances_event_code_get(season, event_code, opts = {}) click to toggle source

Event Alliances The alliances API returns details about alliance selection at a particular event in a particular season. @param season [Integer] Numeric year of the event from which the event alliances are requested. Must be 4 digits. @param event_code [String] Case insensitive alphanumeric `eventCode` of the event from which the alliance selection results are requested. Must be at least 3 characters. @param [Hash] opts the optional parameters @return [AllianceSelectionModelVersion2]

# File lib/ftc_events_client/api/alliance_selection_api.rb, line 28
def v20_season_alliances_event_code_get(season, event_code, opts = {})
  data, _status_code, _headers = v20_season_alliances_event_code_get_with_http_info(season, event_code, opts)
  data
end
v20_season_alliances_event_code_get_with_http_info(season, event_code, opts = {}) click to toggle source

Event Alliances The alliances API returns details about alliance selection at a particular event in a particular season. @param season [Integer] Numeric year of the event from which the event alliances are requested. Must be 4 digits. @param event_code [String] Case insensitive alphanumeric &#x60;eventCode&#x60; of the event from which the alliance selection results are requested. Must be at least 3 characters. @param [Hash] opts the optional parameters @return [Array<(AllianceSelectionModelVersion2, Integer, Hash)>] AllianceSelectionModelVersion2 data, response status code and response headers

# File lib/ftc_events_client/api/alliance_selection_api.rb, line 39
def v20_season_alliances_event_code_get_with_http_info(season, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AllianceSelectionApi.v20_season_alliances_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 AllianceSelectionApi.v20_season_alliances_event_code_get"
  end
  # resource path
  local_var_path = '/v2.0/{season}/alliances/{eventCode}'.sub('{' + 'season' + '}', CGI.escape(season.to_s)).sub('{' + 'eventCode' + '}', CGI.escape(event_code.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # 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] || 'AllianceSelectionModelVersion2'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic']

  new_options = opts.merge(
    :operation => :"AllianceSelectionApi.v20_season_alliances_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: AllianceSelectionApi#v20_season_alliances_event_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end