Class: FtcApiV3Client::EventsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ftc_api_v3_client/api/events_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EventsApi

Returns a new instance of EventsApi.



19
20
21
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_event(cmp_year, event_code, opts = {}) ⇒ ApiV3Event

Get event from season Get detailed information about a single event

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 28

def get_event(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_advancement_from(cmp_year, event_code, opts = {}) ⇒ ApiV3AdvancementFrom

Get event advancement (from) Gets advancement list for teams advancing from this event to the next level of competition

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



89
90
91
92
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 89

def get_event_advancement_from(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_advancement_from_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_advancement_from_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3AdvancementFrom, Integer, Hash)>

Get event advancement (from) Gets advancement list for teams advancing from this event to the next level of competition

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3AdvancementFrom, Integer, Hash)>)

    ApiV3AdvancementFrom data, response status code and response headers



100
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
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 100

def get_event_advancement_from_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_advancement_from ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/advancement/from'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3AdvancementFrom'

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

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

#get_event_alliance_selections(cmp_year, event_code, opts = {}) ⇒ ApiV3AllianceSelections

Get event alliance selections Gets alliance selection operations for the given event, including accepts and declines. These are presented in the order in which they occurred. Refer to the season's competition manual to confirm the order of alliance selections that year. If you are looking for the final alliances and are not interested in analyzing the selection process itself, we recommend using the GetEventAlliances endpoint instead.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



150
151
152
153
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 150

def get_event_alliance_selections(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_alliance_selections_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_alliance_selections_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3AllianceSelections, Integer, Hash)>

Get event alliance selections Gets alliance selection operations for the given event, including accepts and declines. These are presented in the order in which they occurred. Refer to the season's competition manual to confirm the order of alliance selections that year. If you are looking for the final alliances and are not interested in analyzing the selection process itself, we recommend using the GetEventAlliances endpoint instead.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3AllianceSelections, Integer, Hash)>)

    ApiV3AllianceSelections data, response status code and response headers



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 161

def get_event_alliance_selections_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_alliance_selections ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/alliances/selections'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3AllianceSelections'

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

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

#get_event_alliances(cmp_year, event_code, opts = {}) ⇒ ApiV3PlayoffAlliances

Get event alliances Gets playoff alliances for the given event

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



211
212
213
214
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 211

def get_event_alliances(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_alliances_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_alliances_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3PlayoffAlliances, Integer, Hash)>

Get event alliances Gets playoff alliances for the given event

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3PlayoffAlliances, Integer, Hash)>)

    ApiV3PlayoffAlliances data, response status code and response headers



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 222

def get_event_alliances_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_alliances ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/alliances'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3PlayoffAlliances'

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

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

#get_event_awards(cmp_year, event_code, opts = {}) ⇒ ApiV3Awards

Get event awards Gets award information and recipients for the given event.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



272
273
274
275
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 272

def get_event_awards(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_awards_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_awards_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3Awards, Integer, Hash)>

Get event awards Gets award information and recipients for the given event.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3Awards, Integer, Hash)>)

    ApiV3Awards data, response status code and response headers



283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 283

def get_event_awards_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_awards ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/awards'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3Awards'

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

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

#get_event_match(cmp_year, event_code, tournament_level, series, number, opts = {}) ⇒ ApiV3MatchDetails

Get match details Gets details for a single match, including season-specific score details.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • tournament_level (ApiV3TournamentLevel)

    The tournament level of the match

  • series (String)

    The series of the match (0 for non-playoff matches). For remote events, the team number for the match.

  • number (Integer)

    The match number

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



336
337
338
339
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 336

def get_event_match(cmp_year, event_code, tournament_level, series, number, opts = {})
  data, _status_code, _headers = get_event_match_with_http_info(cmp_year, event_code, tournament_level, series, number, opts)
  data
end

#get_event_match_with_http_info(cmp_year, event_code, tournament_level, series, number, opts = {}) ⇒ Array<(ApiV3MatchDetails, Integer, Hash)>

Get match details Gets details for a single match, including season-specific score details.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • tournament_level (ApiV3TournamentLevel)

    The tournament level of the match

  • series (String)

    The series of the match (0 for non-playoff matches). For remote events, the team number for the match.

  • number (Integer)

    The match number

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3MatchDetails, Integer, Hash)>)

    ApiV3MatchDetails data, response status code and response headers



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 350

def get_event_match_with_http_info(cmp_year, event_code, tournament_level, series, number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_match ...'
  end
  # verify the required parameter 'tournament_level' is set
  if @api_client.config.client_side_validation && tournament_level.nil?
    fail ArgumentError, "Missing the required parameter 'tournament_level' when calling EventsApi.get_event_match"
  end
  # verify the required parameter 'number' is set
  if @api_client.config.client_side_validation && number.nil?
    fail ArgumentError, "Missing the required parameter 'number' when calling EventsApi.get_event_match"
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/matches/{tournamentLevel}/{series}/{number}'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.to_s)).sub('{' + 'eventCode' + '}', CGI.escape(event_code.to_s)).sub('{' + 'tournamentLevel' + '}', CGI.escape(tournament_level.to_s)).sub('{' + 'series' + '}', CGI.escape(series.to_s)).sub('{' + 'number' + '}', CGI.escape(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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3MatchDetails'

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

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

#get_event_pit_map(cmp_year, event_code, opts = {}) ⇒ ApiV3PitMap

Get pit map Gets data representation of pit map

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



408
409
410
411
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 408

def get_event_pit_map(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_pit_map_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_pit_map_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3PitMap, Integer, Hash)>

Get pit map Gets data representation of pit map

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3PitMap, Integer, Hash)>)

    ApiV3PitMap data, response status code and response headers



419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 419

def get_event_pit_map_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_pit_map ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/pitMap'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3PitMap'

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

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

#get_event_playoff_rankings(cmp_year, event_code, opts = {}) ⇒ ApiV3PlayoffRankings

Get event playoff rankings Gets playoff rankings for a given event. Each sort order field is season-specific: see the season's competition manual for definitions. Only applicable to events using round-robin playoffs (e.g. FIRST Championship da Vinci)

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



469
470
471
472
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 469

def get_event_playoff_rankings(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_playoff_rankings_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_playoff_rankings_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3PlayoffRankings, Integer, Hash)>

Get event playoff rankings Gets playoff rankings for a given event. Each sort order field is season-specific: see the season's competition manual for definitions. Only applicable to events using round-robin playoffs (e.g. FIRST Championship da Vinci)

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3PlayoffRankings, Integer, Hash)>)

    ApiV3PlayoffRankings data, response status code and response headers



480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 480

def get_event_playoff_rankings_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_playoff_rankings ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/playoffRankings'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3PlayoffRankings'

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

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

#get_event_playoff_structure(cmp_year, event_code, opts = {}) ⇒ ApiV3PlayoffStructure

Get playoff structure Gets programmatic description of the playoff structure (e.g. bracket) structure for event. Contains sufficient information to construct a bracket display.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



530
531
532
533
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 530

def get_event_playoff_structure(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_playoff_structure_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_playoff_structure_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3PlayoffStructure, Integer, Hash)>

Get playoff structure Gets programmatic description of the playoff structure (e.g. bracket) structure for event. Contains sufficient information to construct a bracket display.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3PlayoffStructure, Integer, Hash)>)

    ApiV3PlayoffStructure data, response status code and response headers



541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 541

def get_event_playoff_structure_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_playoff_structure ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/playoffStructure'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3PlayoffStructure'

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

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

#get_event_rankings(cmp_year, event_code, opts = {}) ⇒ ApiV3Rankings

Get event rankings Gets rankings for a given event. Each sort order field is season-specific: see the season's competition manual for definitions. Do not use for league meets or multi-division parent events

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



591
592
593
594
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 591

def get_event_rankings(cmp_year, event_code, opts = {})
  data, _status_code, _headers = get_event_rankings_with_http_info(cmp_year, event_code, opts)
  data
end

#get_event_rankings_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3Rankings, Integer, Hash)>

Get event rankings Gets rankings for a given event. Each sort order field is season-specific: see the season's competition manual for definitions. Do not use for league meets or multi-division parent events

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3Rankings, Integer, Hash)>)

    ApiV3Rankings data, response status code and response headers



602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 602

def get_event_rankings_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event_rankings ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/rankings'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3Rankings'

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

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

#get_event_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3Event, Integer, Hash)>

Get event from season Get detailed information about a single event

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3Event, Integer, Hash)>)

    ApiV3Event data, response status code and response headers



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
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 39

def get_event_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.get_event ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3Event'

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

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

#list_event_matches(cmp_year, event_code, opts = {}) ⇒ ApiV3Matches

List event matches Gets matches for a given event. Includes winner and score information if available. Score details must be fetched per match.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



653
654
655
656
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 653

def list_event_matches(cmp_year, event_code, opts = {})
  data, _status_code, _headers = list_event_matches_with_http_info(cmp_year, event_code, opts)
  data
end

#list_event_matches_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3Matches, Integer, Hash)>

List event matches Gets matches for a given event. Includes winner and score information if available. Score details must be fetched per match.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ApiV3Matches, Integer, Hash)>)

    ApiV3Matches data, response status code and response headers



665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 665

def list_event_matches_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.list_event_matches ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/matches'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.to_s)).sub('{' + 'eventCode' + '}', CGI.escape(event_code.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'phase'] = opts[:'phase'] if !opts[:'phase'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3Matches'

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

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

#list_event_teams(cmp_year, event_code, opts = {}) ⇒ ApiV3EventParticipants

List teams for an event Lists all teams competing at the event. This includes division assignments if published for this event (and this event is a multi-division parent event). In some cases, teams may be award recipients but not returned in this list. Their information can be fetched individually by number.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



716
717
718
719
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 716

def list_event_teams(cmp_year, event_code, opts = {})
  data, _status_code, _headers = list_event_teams_with_http_info(cmp_year, event_code, opts)
  data
end

#list_event_teams_with_http_info(cmp_year, event_code, opts = {}) ⇒ Array<(ApiV3EventParticipants, Integer, Hash)>

List teams for an event Lists all teams competing at the event. This includes division assignments if published for this event (and this event is a multi-division parent event). In some cases, teams may be award recipients but not returned in this list. Their information can be fetched individually by number.

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • event_code (String)

    The code (abbreviation) for the event

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3EventParticipants, Integer, Hash)>)

    ApiV3EventParticipants data, response status code and response headers



727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 727

def list_event_teams_with_http_info(cmp_year, event_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.list_event_teams ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events/{eventCode}/teams'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3EventParticipants'

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

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

#list_events(cmp_year, opts = {}) ⇒ ApiV3Events

List events for a season Lists all events for a season

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



776
777
778
779
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 776

def list_events(cmp_year, opts = {})
  data, _status_code, _headers = list_events_with_http_info(cmp_year, opts)
  data
end

#list_events_with_http_info(cmp_year, opts = {}) ⇒ Array<(ApiV3Events, Integer, Hash)>

List events for a season Lists all events for a season

Parameters:

  • cmp_year (String)

    The year of the FIRST Championship for the requested season

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ApiV3Events, Integer, Hash)>)

    ApiV3Events data, response status code and response headers



786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
# File 'lib/ftc_api_v3_client/api/events_api.rb', line 786

def list_events_with_http_info(cmp_year, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EventsApi.list_events ...'
  end
  # resource path
  local_var_path = '/api/v3/seasons/{cmpYear}/events'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ApiV3Events'

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

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