Class: FtcEventsClient::AdvancementApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ftc_events_client/api/advancement_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AdvancementApi



16
17
18
# File 'lib/ftc_events_client/api/advancement_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/ftc_events_client/api/advancement_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#v20_season_advancement_event_code_get(season, event_code, opts = {}) ⇒ AdvancementModel

Event Advancement The event advancement endpoint returns details about teams advancing from a particular event in a particular season.

Options Hash (opts):

  • :exclude_skipped (BOOLEAN)

    `excludeSkipped=true` to exclude skipped advancement slots. Slots are skipped if no team meets the criteria, the team has already advanced, or the team was ineligible.



26
27
28
29
# File 'lib/ftc_events_client/api/advancement_api.rb', line 26

def v20_season_advancement_event_code_get(season, event_code, opts = {})
  data, _status_code, _headers = v20_season_advancement_event_code_get_with_http_info(season, event_code, opts)
  data
end

#v20_season_advancement_event_code_get_with_http_info(season, event_code, opts = {}) ⇒ Array<(AdvancementModel, Integer, Hash)>

Event Advancement The event advancement endpoint returns details about teams advancing from a particular event in a particular season.

Options Hash (opts):

  • :exclude_skipped (BOOLEAN)

    &#x60;excludeSkipped&#x3D;true&#x60; to exclude skipped advancement slots. Slots are skipped if no team meets the criteria, the team has already advanced, or the team was ineligible.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/ftc_events_client/api/advancement_api.rb', line 38

def v20_season_advancement_event_code_get_with_http_info(season, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdvancementApi.v20_season_advancement_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 AdvancementApi.v20_season_advancement_event_code_get"
  end
  # verify the required parameter 'event_code' is set
  if @api_client.config.client_side_validation && event_code.nil?
    fail ArgumentError, "Missing the required parameter 'event_code' when calling AdvancementApi.v20_season_advancement_event_code_get"
  end
  # resource path
  local_var_path = '/v2.0/{season}/advancement/{eventCode}'.sub('{' + 'season' + '}', season.to_s).sub('{' + 'eventCode' + '}', event_code.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'excludeSkipped'] = opts[:'exclude_skipped'] if !opts[:'exclude_skipped'].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[:body] 

  return_type = opts[:return_type] || 'AdvancementModel' 

  auth_names = opts[:auth_names] || ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdvancementApi#v20_season_advancement_event_code_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v20_season_advancement_event_code_source_get(season, event_code, opts = {}) ⇒ Array<AdvancementSourceModel>

Advancement Source The advancement source API returns details about where teams advanced to a specified event from.



90
91
92
93
# File 'lib/ftc_events_client/api/advancement_api.rb', line 90

def v20_season_advancement_event_code_source_get(season, event_code, opts = {})
  data, _status_code, _headers = v20_season_advancement_event_code_source_get_with_http_info(season, event_code, opts)
  data
end

#v20_season_advancement_event_code_source_get_with_http_info(season, event_code, opts = {}) ⇒ Array<(Array<AdvancementSourceModel>, Integer, Hash)>

Advancement Source The advancement source API returns details about where teams advanced to a specified event from.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/ftc_events_client/api/advancement_api.rb', line 101

def v20_season_advancement_event_code_source_get_with_http_info(season, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdvancementApi.v20_season_advancement_event_code_source_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 AdvancementApi.v20_season_advancement_event_code_source_get"
  end
  # verify the required parameter 'event_code' is set
  if @api_client.config.client_side_validation && event_code.nil?
    fail ArgumentError, "Missing the required parameter 'event_code' when calling AdvancementApi.v20_season_advancement_event_code_source_get"
  end
  # resource path
  local_var_path = '/v2.0/{season}/advancement/{eventCode}/source'.sub('{' + 'season' + '}', season.to_s).sub('{' + 'eventCode' + '}', 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[:body] 

  return_type = opts[:return_type] || 'Array<AdvancementSourceModel>' 

  auth_names = opts[:auth_names] || ['basic']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AdvancementApi#v20_season_advancement_event_code_source_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end