class FtcEventsClient::AwardsApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

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

Event Awards The event awards API returns details about awards presented at a particular event in a particular season. Return values may contain either `teamNumber` or `person` values, and if the winner was a `person`, and that person is from a team, the `teamNumber` value might be set with their `teamNumber`. You must specify either an `eventCode` or a `teamNumber` or both. If you specify the `teamNumber` parameter, you will receive only awards where the team was listed as the winner, regardless of whether or not the `person` field is `null` or empty. If you specify only the `eventCode` field, you will receive all award listings for the requested event. If you specify both, you will receive all awards won by the `teamNumber` at the `eventCode`. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric `eventCode` of the event from which the awards are requested. @param [Hash] opts the optional parameters @option opts [Integer] :team_number `teamNumber` to search for within the results. (default to 0) @return [AwardsModel]

# File lib/ftc_events_client/api/awards_api.rb, line 29
def v20_season_awards_event_code_get(season, event_code, opts = {})
  data, _status_code, _headers = v20_season_awards_event_code_get_with_http_info(season, event_code, opts)
  data
end
v20_season_awards_event_code_get_with_http_info(season, event_code, opts = {}) click to toggle source

Event Awards The event awards API returns details about awards presented at a particular event in a particular season. Return values may contain either &#x60;teamNumber&#x60; or &#x60;person&#x60; values, and if the winner was a &#x60;person&#x60;, and that person is from a team, the &#x60;teamNumber&#x60; value might be set with their &#x60;teamNumber&#x60;. You must specify either an &#x60;eventCode&#x60; or a &#x60;teamNumber&#x60; or both. If you specify the &#x60;teamNumber&#x60; parameter, you will receive only awards where the team was listed as the winner, regardless of whether or not the &#x60;person&#x60; field is &#x60;null&#x60; or empty. If you specify only the &#x60;eventCode&#x60; field, you will receive all award listings for the requested event. If you specify both, you will receive all awards won by the &#x60;teamNumber&#x60; at the &#x60;eventCode&#x60;. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric &#x60;eventCode&#x60; of the event from which the awards are requested. @param [Hash] opts the optional parameters @option opts [Integer] :team_number &#x60;teamNumber&#x60; to search for within the results. @return [Array<(AwardsModel, Integer, Hash)>] AwardsModel data, response status code and response headers

# File lib/ftc_events_client/api/awards_api.rb, line 41
def v20_season_awards_event_code_get_with_http_info(season, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AwardsApi.v20_season_awards_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 AwardsApi.v20_season_awards_event_code_get"
  end
  # resource path
  local_var_path = '/v2.0/{season}/awards/{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[:'teamNumber'] = opts[:'team_number'] if !opts[:'team_number'].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] || 'AwardsModel'

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

  new_options = opts.merge(
    :operation => :"AwardsApi.v20_season_awards_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: AwardsApi#v20_season_awards_event_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
v20_season_awards_event_code_team_number_get(season, event_code, team_number, opts = {}) click to toggle source

Event Awards The event awards API returns details about awards presented at a particular event in a particular season. Return values may contain either `teamNumber` or `person` values, and if the winner was a `person`, and that person is from a team, the `teamNumber` value might be set with their `teamNumber`. You must specify either an `eventCode` or a `teamNumber` or both. If you specify the `teamNumber` parameter, you will receive only awards where the team was listed as the winner, regardless of whether or not the `person` field is `null` or empty. If you specify only the `eventCode` field, you will receive all award listings for the requested event. If you specify both, you will receive all awards won by the `teamNumber` at the `eventCode`. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric &#x60;eventCode&#x60; of the event from which the awards are requested. @param team_number [Integer] &#x60;teamNumber&#x60; to search for within the results. @param [Hash] opts the optional parameters @return [AwardsModel]

# File lib/ftc_events_client/api/awards_api.rb, line 97
def v20_season_awards_event_code_team_number_get(season, event_code, team_number, opts = {})
  data, _status_code, _headers = v20_season_awards_event_code_team_number_get_with_http_info(season, event_code, team_number, opts)
  data
end
v20_season_awards_event_code_team_number_get_with_http_info(season, event_code, team_number, opts = {}) click to toggle source

Event Awards The event awards API returns details about awards presented at a particular event in a particular season. Return values may contain either &#x60;teamNumber&#x60; or &#x60;person&#x60; values, and if the winner was a &#x60;person&#x60;, and that person is from a team, the &#x60;teamNumber&#x60; value might be set with their &#x60;teamNumber&#x60;. You must specify either an &#x60;eventCode&#x60; or a &#x60;teamNumber&#x60; or both. If you specify the &#x60;teamNumber&#x60; parameter, you will receive only awards where the team was listed as the winner, regardless of whether or not the &#x60;person&#x60; field is &#x60;null&#x60; or empty. If you specify only the &#x60;eventCode&#x60; field, you will receive all award listings for the requested event. If you specify both, you will receive all awards won by the &#x60;teamNumber&#x60; at the &#x60;eventCode&#x60;. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param event_code [String] Case insensitive alphanumeric &#x60;eventCode&#x60; of the event from which the awards are requested. @param team_number [Integer] &#x60;teamNumber&#x60; to search for within the results. @param [Hash] opts the optional parameters @return [Array<(AwardsModel, Integer, Hash)>] AwardsModel data, response status code and response headers

# File lib/ftc_events_client/api/awards_api.rb, line 109
def v20_season_awards_event_code_team_number_get_with_http_info(season, event_code, team_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AwardsApi.v20_season_awards_event_code_team_number_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 AwardsApi.v20_season_awards_event_code_team_number_get"
  end
  # verify the required parameter 'team_number' is set
  if @api_client.config.client_side_validation && team_number.nil?
    fail ArgumentError, "Missing the required parameter 'team_number' when calling AwardsApi.v20_season_awards_event_code_team_number_get"
  end
  # resource path
  local_var_path = '/v2.0/{season}/awards/{eventCode}/{teamNumber}'.sub('{' + 'season' + '}', CGI.escape(season.to_s)).sub('{' + 'eventCode' + '}', CGI.escape(event_code.to_s)).sub('{' + 'teamNumber' + '}', CGI.escape(team_number.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] || 'AwardsModel'

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

  new_options = opts.merge(
    :operation => :"AwardsApi.v20_season_awards_event_code_team_number_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: AwardsApi#v20_season_awards_event_code_team_number_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
v20_season_awards_list_get(season, opts = {}) click to toggle source

Award Listings The award listings API returns a listing of the various awards that can be distributed in the requested season. This is especially useful in order to avoid having to use the name field of the event awards API to know which award was won. Instead the awardId field can be matched between the two APIs. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param [Hash] opts the optional parameters @return [SeasonAwardListingsModel]

# File lib/ftc_events_client/api/awards_api.rb, line 166
def v20_season_awards_list_get(season, opts = {})
  data, _status_code, _headers = v20_season_awards_list_get_with_http_info(season, opts)
  data
end
v20_season_awards_list_get_with_http_info(season, opts = {}) click to toggle source

Award Listings The award listings API returns a listing of the various awards that can be distributed in the requested season. This is especially useful in order to avoid having to use the name field of the event awards API to know which award was won. Instead the awardId field can be matched between the two APIs. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param [Hash] opts the optional parameters @return [Array<(SeasonAwardListingsModel, Integer, Hash)>] SeasonAwardListingsModel data, response status code and response headers

# File lib/ftc_events_client/api/awards_api.rb, line 176
def v20_season_awards_list_get_with_http_info(season, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AwardsApi.v20_season_awards_list_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 AwardsApi.v20_season_awards_list_get"
  end
  # resource path
  local_var_path = '/v2.0/{season}/awards/list'.sub('{' + 'season' + '}', CGI.escape(season.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] || 'SeasonAwardListingsModel'

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

  new_options = opts.merge(
    :operation => :"AwardsApi.v20_season_awards_list_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: AwardsApi#v20_season_awards_list_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
v20_season_awards_team_number_get(season, team_number, opts = {}) click to toggle source

Event Awards The event awards API returns details about awards presented at a particular event in a particular season. Return values may contain either `teamNumber` or `person` values, and if the winner was a `person`, and that person is from a team, the `teamNumber` value might be set with their `teamNumber`. You must specify either an `eventCode` or a `teamNumber` or both. If you specify the `teamNumber` parameter, you will receive only awards where the team was listed as the winner, regardless of whether or not the `person` field is `null` or empty. If you specify only the `eventCode` field, you will receive all award listings for the requested event. If you specify both, you will receive all awards won by the `teamNumber` at the `eventCode`. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param team_number [Integer] &#x60;teamNumber&#x60; to search for within the results. @param [Hash] opts the optional parameters @option opts [String] :event_code Case insensitive alphanumeric &#x60;eventCode&#x60; of the event from which the awards are requested. (default to '') @return [AwardsModel]

# File lib/ftc_events_client/api/awards_api.rb, line 231
def v20_season_awards_team_number_get(season, team_number, opts = {})
  data, _status_code, _headers = v20_season_awards_team_number_get_with_http_info(season, team_number, opts)
  data
end
v20_season_awards_team_number_get_with_http_info(season, team_number, opts = {}) click to toggle source

Event Awards The event awards API returns details about awards presented at a particular event in a particular season. Return values may contain either &#x60;teamNumber&#x60; or &#x60;person&#x60; values, and if the winner was a &#x60;person&#x60;, and that person is from a team, the &#x60;teamNumber&#x60; value might be set with their &#x60;teamNumber&#x60;. You must specify either an &#x60;eventCode&#x60; or a &#x60;teamNumber&#x60; or both. If you specify the &#x60;teamNumber&#x60; parameter, you will receive only awards where the team was listed as the winner, regardless of whether or not the &#x60;person&#x60; field is &#x60;null&#x60; or empty. If you specify only the &#x60;eventCode&#x60; field, you will receive all award listings for the requested event. If you specify both, you will receive all awards won by the &#x60;teamNumber&#x60; at the &#x60;eventCode&#x60;. @param season [Integer] Numeric year of the event from which the award listings are requested. Must be 4 digits @param team_number [Integer] &#x60;teamNumber&#x60; to search for within the results. @param [Hash] opts the optional parameters @option opts [String] :event_code Case insensitive alphanumeric &#x60;eventCode&#x60; of the event from which the awards are requested. @return [Array<(AwardsModel, Integer, Hash)>] AwardsModel data, response status code and response headers

# File lib/ftc_events_client/api/awards_api.rb, line 243
def v20_season_awards_team_number_get_with_http_info(season, team_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AwardsApi.v20_season_awards_team_number_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 AwardsApi.v20_season_awards_team_number_get"
  end
  # verify the required parameter 'team_number' is set
  if @api_client.config.client_side_validation && team_number.nil?
    fail ArgumentError, "Missing the required parameter 'team_number' when calling AwardsApi.v20_season_awards_team_number_get"
  end
  # resource path
  local_var_path = '/v2.0/{season}/awards/{teamNumber}'.sub('{' + 'season' + '}', CGI.escape(season.to_s)).sub('{' + 'teamNumber' + '}', CGI.escape(team_number.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'eventCode'] = opts[:'event_code'] if !opts[:'event_code'].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] || 'AwardsModel'

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

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