ftc_events_client 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +351 -101
  3. data/Rakefile +0 -2
  4. data/config.json +1 -1
  5. data/docs/AllianceModelVersion2.md +10 -28
  6. data/docs/AllianceScore2020.md +37 -82
  7. data/docs/AllianceSelectionApi.md +14 -14
  8. data/docs/AllianceSelectionModelVersion2.md +4 -16
  9. data/docs/ApiIndexModel.md +11 -30
  10. data/docs/AutoNavigatedStatus.md +6 -0
  11. data/docs/AwardAssignmentModel.md +13 -34
  12. data/docs/AwardsApi.md +47 -49
  13. data/docs/AwardsModel.md +3 -14
  14. data/docs/BarcodeElement.md +6 -0
  15. data/docs/EndgameParkedStatus.md +6 -0
  16. data/docs/EventMatchResultsModelVersion2.md +3 -14
  17. data/docs/EventRankingsModel.md +3 -14
  18. data/docs/EventScheduleHybridModelVersion2.md +3 -14
  19. data/docs/EventScheduleModelVersion2.md +3 -14
  20. data/docs/FTCEventLevel.md +6 -0
  21. data/docs/GeneralApi.md +9 -11
  22. data/docs/LeagueMemberListModel.md +7 -0
  23. data/docs/LeaguesApi.md +179 -0
  24. data/docs/MatchResultModelVersion2.md +16 -40
  25. data/docs/MatchResultTeamModelVersion2.md +6 -18
  26. data/docs/MatchResultsApi.md +33 -35
  27. data/docs/MatchScoresModel.md +3 -14
  28. data/docs/MatchScoresModelMatchScoresOneOf.md +5 -1
  29. data/docs/OneOfMatchScoresModelMatchScoresItems.md +6 -0
  30. data/docs/RankingsApi.md +16 -17
  31. data/docs/ScheduleApi.md +30 -32
  32. data/docs/ScheduleHybridModelTeamVersion2.md +8 -22
  33. data/docs/ScheduleHybridModelVersion2.md +18 -40
  34. data/docs/ScheduledMatchModelVersion2.md +10 -28
  35. data/docs/ScheduledMatchTeamModelVersion2.md +6 -20
  36. data/docs/ScoreDetailAllianceModel2020.md +39 -86
  37. data/docs/ScoreDetailAllianceModel2021.md +48 -0
  38. data/docs/ScoreDetailModel2019.md +6 -18
  39. data/docs/ScoreDetailModel2020.md +6 -18
  40. data/docs/ScoreDetailModel2021.md +10 -0
  41. data/docs/ScoreDetailModelAlliance2019.md +36 -80
  42. data/docs/ScoreDetailModelSinglePlayer2020.md +6 -20
  43. data/docs/ScoreDetailModelSinglePlayer2021.md +10 -0
  44. data/docs/ScoreDetailSinglePlayer2021.md +39 -0
  45. data/docs/SeasonAwardListingsModel.md +3 -14
  46. data/docs/SeasonAwardsModel.md +6 -20
  47. data/docs/SeasonDataApi.md +35 -37
  48. data/docs/SeasonEventListingsModelVersion2.md +4 -16
  49. data/docs/SeasonEventModelVersion2.md +24 -46
  50. data/docs/SeasonLeagueListingsModelVersion2.md +8 -0
  51. data/docs/SeasonLeagueModelVersion2.md +11 -0
  52. data/docs/SeasonSummaryModelChampionship.md +5 -18
  53. data/docs/SeasonSummaryModelVersion2.md +8 -24
  54. data/docs/SeasonTeamListingsModelVersion2.md +7 -22
  55. data/docs/SeasonTeamModelVersion2.md +14 -36
  56. data/docs/Stone.md +2 -11
  57. data/docs/TeamRankingModel.md +17 -42
  58. data/ftc_events_client.gemspec +5 -5
  59. data/git_push.sh +7 -10
  60. data/lib/ftc_events_client/api/alliance_selection_api.rb +17 -22
  61. data/lib/ftc_events_client/api/awards_api.rb +52 -74
  62. data/lib/ftc_events_client/api/general_api.rb +8 -17
  63. data/lib/ftc_events_client/api/leagues_api.rb +218 -0
  64. data/lib/ftc_events_client/api/match_results_api.rb +44 -45
  65. data/lib/ftc_events_client/api/rankings_api.rb +17 -22
  66. data/lib/ftc_events_client/api/schedule_api.rb +44 -45
  67. data/lib/ftc_events_client/api/season_data_api.rb +30 -53
  68. data/lib/ftc_events_client/api_client.rb +52 -54
  69. data/lib/ftc_events_client/api_error.rb +4 -4
  70. data/lib/ftc_events_client/configuration.rb +6 -76
  71. data/lib/ftc_events_client/models/alliance_model_version2.rb +19 -31
  72. data/lib/ftc_events_client/models/{alliance_score2020.rb → alliance_score_2020.rb} +46 -58
  73. data/lib/ftc_events_client/models/alliance_selection_model_version2.rb +13 -25
  74. data/lib/ftc_events_client/models/api_index_model.rb +20 -32
  75. data/lib/ftc_events_client/models/{tournament_level.rb → auto_navigated_status.rb} +11 -21
  76. data/lib/ftc_events_client/models/award_assignment_model.rb +22 -34
  77. data/lib/ftc_events_client/models/awards_model.rb +12 -24
  78. data/lib/ftc_events_client/models/barcode_element.rb +28 -0
  79. data/lib/ftc_events_client/models/endgame_parked_status.rb +29 -0
  80. data/lib/ftc_events_client/models/event_match_results_model_version2.rb +12 -24
  81. data/lib/ftc_events_client/models/event_rankings_model.rb +12 -24
  82. data/lib/ftc_events_client/models/event_schedule_hybrid_model_version2.rb +12 -24
  83. data/lib/ftc_events_client/models/event_schedule_model_version2.rb +12 -24
  84. data/lib/ftc_events_client/models/ftc_event_level.rb +31 -0
  85. data/lib/ftc_events_client/models/league_member_list_model.rb +209 -0
  86. data/lib/ftc_events_client/models/match_result_model_version2.rb +25 -37
  87. data/lib/ftc_events_client/models/match_result_team_model_version2.rb +26 -29
  88. data/lib/ftc_events_client/models/match_scores_model.rb +12 -24
  89. data/lib/ftc_events_client/models/one_of_match_scores_model_match_scores_items.rb +197 -0
  90. data/lib/ftc_events_client/models/schedule_hybrid_model_team_version2.rb +30 -32
  91. data/lib/ftc_events_client/models/schedule_hybrid_model_version2.rb +46 -38
  92. data/lib/ftc_events_client/models/scheduled_match_model_version2.rb +19 -31
  93. data/lib/ftc_events_client/models/scheduled_match_team_model_version2.rb +15 -27
  94. data/lib/ftc_events_client/models/{score_detail_alliance_model2020.rb → score_detail_alliance_model_2020.rb} +48 -60
  95. data/lib/ftc_events_client/models/score_detail_alliance_model_2021.rb +576 -0
  96. data/lib/ftc_events_client/models/{score_detail_model2019.rb → score_detail_model_2019.rb} +24 -27
  97. data/lib/ftc_events_client/models/{score_detail_model2020.rb → score_detail_model_2020.rb} +24 -27
  98. data/lib/ftc_events_client/models/score_detail_model_2021.rb +236 -0
  99. data/lib/ftc_events_client/models/{score_detail_model_alliance2019.rb → score_detail_model_alliance_2019.rb} +45 -57
  100. data/lib/ftc_events_client/models/{score_detail_model_single_player2020.rb → score_detail_model_single_player_2020.rb} +15 -27
  101. data/lib/ftc_events_client/models/score_detail_model_single_player_2021.rb +233 -0
  102. data/lib/ftc_events_client/models/score_detail_single_player_2021.rb +494 -0
  103. data/lib/ftc_events_client/models/season_award_listings_model.rb +12 -24
  104. data/lib/ftc_events_client/models/season_awards_model.rb +22 -34
  105. data/lib/ftc_events_client/models/season_event_listings_model_version2.rb +13 -25
  106. data/lib/ftc_events_client/models/season_event_model_version2.rb +77 -41
  107. data/lib/ftc_events_client/models/season_league_listings_model_version2.rb +218 -0
  108. data/lib/ftc_events_client/models/season_league_model_version2.rb +247 -0
  109. data/lib/ftc_events_client/models/season_summary_model_championship.rb +14 -26
  110. data/lib/ftc_events_client/models/season_summary_model_version2.rb +17 -29
  111. data/lib/ftc_events_client/models/season_team_listings_model_version2.rb +16 -28
  112. data/lib/ftc_events_client/models/season_team_model_version2.rb +23 -35
  113. data/lib/ftc_events_client/models/stone.rb +6 -15
  114. data/lib/ftc_events_client/models/team_ranking_model.rb +26 -38
  115. data/lib/ftc_events_client/version.rb +4 -5
  116. data/lib/ftc_events_client.rb +22 -12
  117. data/spec/api/leagues_api_spec.rb +77 -0
  118. data/spec/base_object_spec.rb +109 -0
  119. data/spec/configuration_spec.rb +3 -3
  120. data/spec/models/alliance_score_2020_spec.rb +244 -0
  121. data/spec/models/auto_navigated_status_spec.rb +28 -0
  122. data/spec/models/barcode_element_spec.rb +28 -0
  123. data/spec/models/endgame_parked_status_spec.rb +28 -0
  124. data/spec/models/ftc_event_level_spec.rb +28 -0
  125. data/spec/models/league_member_list_model_spec.rb +34 -0
  126. data/spec/models/one_of_match_scores_model_match_scores_items_spec.rb +34 -0
  127. data/spec/models/score_detail_alliance_model2021_spec.rb +280 -0
  128. data/spec/models/score_detail_alliance_model_2020_spec.rb +256 -0
  129. data/spec/models/score_detail_alliance_model_2021_spec.rb +286 -0
  130. data/spec/models/score_detail_model2021_spec.rb +52 -0
  131. data/spec/models/score_detail_model_2019_spec.rb +58 -0
  132. data/spec/models/score_detail_model_2020_spec.rb +58 -0
  133. data/spec/models/score_detail_model_2021_spec.rb +58 -0
  134. data/spec/models/score_detail_model_alliance_2019_spec.rb +238 -0
  135. data/spec/models/score_detail_model_single_player2021_spec.rb +52 -0
  136. data/spec/models/score_detail_model_single_player_2020_spec.rb +58 -0
  137. data/spec/models/score_detail_model_single_player_2021_spec.rb +58 -0
  138. data/spec/models/score_detail_single_player2021_spec.rb +226 -0
  139. data/spec/models/score_detail_single_player_2021_spec.rb +232 -0
  140. data/spec/models/season_league_listings_model_version2_spec.rb +40 -0
  141. data/{lib/ftc_events_client/models/match_scores_model_match_scores_one_of.rb → spec/models/season_league_model_version2_spec.rb} +35 -83
  142. data/update.sh +2 -2
  143. metadata +103 -11
@@ -3,21 +3,19 @@
3
3
 
4
4
  #FTC Events API is a service to return relevant information about the _FIRST_ Tech Challenge (FTC). Information is made available from events operating around the world Information is currently made available after the conclusion of the tournament. The API will provide data as soon as it has synced, and we do not add any artificial delays. ## Documentation Notes ### Timezones All times are listed in the local time to the event venue. HTTP-date values will show their timezone. ### Query Parameters If you specify a parameter, but no value for that parameter, it will be ignored. For example, if you request `URL?teamNumber=` the `teamNumber` parameter would be ignored. For all APIs that accept a query string in addition to the base URI, the order of parameters do not matter, but the name shown in the documentation must match exactly, as does the associated value format as described in details. For response codes that are not HTTP 200 (OK), the documentation will show a body message that represents a possible response value. While the \"title\" of the HTTP Status Code will match those shown in the response codes documentation section exactly, the body of the response will be a more detailed explanation of why that status code is being returned and may not always be exactly as shown in the examples. ### Experimenting with the API This documentation is rendered at both [api-docs](https://ftc-events.firstinspires.org/api-docs) and [try-it-out](https://ftc-events.firstinspires.org/try-it-out). [api-docs](https://ftc-events.firstinspires.org/api-docs) has a three panel, easy to read layout, while [try-it-out](https://ftc-events.firstinspires.org/try-it-out) has a feature that allows you try out endpoints from within the page. Additionally, the Open API Json is availabe at [Open API](https://ftc-events.firstinspires.org/swagger/v2.0/swagger.json). This can be imported into a tool such as [Postman](https://www.postman.com) for experimentation as well. ### Last-Modified, FMS-OnlyModifiedSince, and If-Modified-Since Headers The FTC Events API utilizes the `Last-Modified` and `If-Modified-Since` Headers to communicate with consumers regarding the age of the data they are requesting. With a couple of exceptions, all calls will return a `Last-Modified` Header set with the time at which the data at that endpoint was last modified. The Header will always be set in the HTTP-date format, as described in the HTTP Protocol. There are two exceptions: the `Last-Modified` Header is not set if the endpoint returns no results (such as a request for a schedule with no matches). Consumers should keep track of the `Last-Modified` Header, and return it on subsequent calls to the same endpoint as the If-Modified-Since. The server will recognize this request, and will only return a result if the data has been modified since the last request. If no changes have been made, an HTTP 304 will be returned. If data has been modified, ALL data on that call will be returned (for \"only modified\" data, see below). The FTC Events API also allows a custom header used to filter the return data to a specific subset. This is done by specifying a `FMS-OnlyModifiedSince` header with each call. As with the `If-Modified-Since` header, consumers should keep track of the Last-Modified Header, and return it on subsequent calls to the same endpoint as the `FMS-OnlyModifiedSince` Header. The server will recognize this request, and will only return a result if the data has been modified since the last request, and, if returned, the data will only be those portions modified since the included date. If no changes, have been made, an HTTP 304 will be returned. Using this method, the server and consumer save processing time by only receiving modified data that is in need of update on the consumer side. If the Headers are improperly passed (such as the wrong Day of Week for the matching date, or a date in the future), the endpoint will simply ignore the Header and return all results. If both headers are specified, the request will be denied. ## Response Codes The FTC Events API HTTP Status Codes correspond with the [common codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), but occasionally with different \"titles\". The \"title\" used by the API is shown next to each of the below possible response HTTP Status Codes. Throughout the documentation, Apiary may automatically show the common \"title\" in example returns (like \"Not Found\" for 404) but on the production server, the \"title\" will instead match those listed below. ### HTTP 200 - \"OK\" The request has succeeded. An entity corresponding to the requested resource is sent in the response. This will be returned as the HTTP Status Code for all request that succeed, even if the body is empty (such as an event that has no rankings, but with a valid season and event code were used) ### HTTP 304 - \"Not Modified\" When utilizing a Header that allows filtered data returns, such as `If-Modified-Since`, this response indicates that no data meets the request. ### HTTP 400 - \"Invalid Season Requested\"/\"Malformed Parameter Format In Request\"/\"Missing Parameter In Request\"/\"Invalid API Version Requested\": The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. Specifically for this API, a 400 response indicates that the requested URI matches with a valid API, but one or more required parameter was malformed or invalid. Examples include an event code that is too short or team number that contains a letter. ### HTTP 401 - \"Unauthorized\" All requests against the API require authentication via a valid user token. Failing to provide one, or providing an invalid one, will warrant a 401 response. The client MAY repeat the request with a suitable Authorization header field. ### HTTP 404 - \"Invalid Event Requested\" Even though the 404 code usually indicates any not found status, a 404 will only be issued in this API when an event cannot be found for the requested season and event code. If the request didn't match a valid API or there were malformed parameters, the response would not receive a 404 but rather a 400 or 501. If this HTTP code is received, the season was a valid season and the event code matched the acceptable style of an event code, but there were no records of an event matching the combination of that season and event code. For example, HTTP 404 would be issued when the event had a different code in the requested season (the codes can change year to year based on event location). ### HTTP 500 - \"Internal Server Error\" The server encountered an unexpected condition which prevented it from fulfilling the request. This is a code sent directly by the server, and has no special alternate definition specific to this API. ### HTTP 501 - \"Request Did Not Match Any Current API Pattern\" The server does not support the functionality required to fulfill the request. Specifically, the request pattern did not match any of the possible APIs, and thus processing was discontinued. This code is also issued when too many optional parameters were included in a single request and fulfilling it would make the result confusing or misleading. Each API will specify which parameters or combination of parameters can be used at the same time. ### HTTP 503 - \"Service Unavailable\" The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a `Retry-After` header. This code will not always appear, sometimes the server may outright refuse the connection instead. This is a code sent directly by the server, and has no special alternate definition specific to this API. ## Authorization In order to make calls against the FTC Events API, you must include an HTTP Header called `Authorization` with the value set as specified below. If a request is made without this header, processing stops and an HTTP 401 is issued. All `Authorization` headers follow the same format: ``` Authorization: Basic 000000000000000000000000000000000000000000000000000000000000 ``` Where the Zeros are replaced by your Token. The Token can be formed by taking your username and your AuthorizationKey and adding a colon. For example, if your username is `sampleuser` and your AuthorizationKey is `7eaa6338-a097-4221-ac04-b6120fcc4d49` you would have this string: ``` sampleuser:7eaa6338-a097-4221-ac04-b6120fcc4d49 ``` This string must then be encoded using Base64 Encoded to form the Token, which will be the same length as the example above, but include letters and numbers. For our example, we would have: ``` c2FtcGxldXNlcjo3ZWFhNjMzOC1hMDk3LTQyMjEtYWMwNC1iNjEyMGZjYzRkNDk= ``` Most API client libraries can handle computing the authorization header using a username and password for you NOTICE: Publicly distributing an application, code snippet, etc, that has your username and token in it, encoded or not, WILL result in your token being blocked from the API. Each user should apply for their own token. If you wish to acquire a token for your development, you may do so by requesting a token through our automated system on this website.
5
5
 
6
- The version of the OpenAPI document: v2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-SNAPSHOT
6
+ OpenAPI spec version: v2.0
10
7
 
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.29
11
10
  =end
12
11
 
13
12
  require 'date'
14
- require 'time'
15
13
 
16
14
  module FtcEventsClient
17
15
  class SeasonAwardsModel
18
16
  attr_accessor :award_id
19
17
 
20
- attr_accessor :event_type
18
+ attr_accessor :name
21
19
 
22
20
  attr_accessor :description
23
21
 
@@ -27,35 +25,30 @@ module FtcEventsClient
27
25
  def self.attribute_map
28
26
  {
29
27
  :'award_id' => :'awardId',
30
- :'event_type' => :'eventType',
28
+ :'name' => :'name',
31
29
  :'description' => :'description',
32
30
  :'for_person' => :'forPerson'
33
31
  }
34
32
  end
35
33
 
36
- # Returns all the JSON keys this model knows about
37
- def self.acceptable_attributes
38
- attribute_map.values
39
- end
40
-
41
34
  # Attribute type mapping.
42
35
  def self.openapi_types
43
36
  {
44
- :'award_id' => :'Integer',
45
- :'event_type' => :'String',
46
- :'description' => :'String',
47
- :'for_person' => :'Boolean'
37
+ :'award_id' => :'Object',
38
+ :'name' => :'Object',
39
+ :'description' => :'Object',
40
+ :'for_person' => :'Object'
48
41
  }
49
42
  end
50
43
 
51
44
  # List of attributes with nullable: true
52
45
  def self.openapi_nullable
53
46
  Set.new([
54
- :'event_type',
47
+ :'name',
55
48
  :'description',
56
49
  ])
57
50
  end
58
-
51
+
59
52
  # Initializes the object
60
53
  # @param [Hash] attributes Model attributes in the form of hash
61
54
  def initialize(attributes = {})
@@ -75,8 +68,8 @@ module FtcEventsClient
75
68
  self.award_id = attributes[:'award_id']
76
69
  end
77
70
 
78
- if attributes.key?(:'event_type')
79
- self.event_type = attributes[:'event_type']
71
+ if attributes.key?(:'name')
72
+ self.name = attributes[:'name']
80
73
  end
81
74
 
82
75
  if attributes.key?(:'description')
@@ -107,7 +100,7 @@ module FtcEventsClient
107
100
  return true if self.equal?(o)
108
101
  self.class == o.class &&
109
102
  award_id == o.award_id &&
110
- event_type == o.event_type &&
103
+ name == o.name &&
111
104
  description == o.description &&
112
105
  for_person == o.for_person
113
106
  end
@@ -121,7 +114,7 @@ module FtcEventsClient
121
114
  # Calculates hash code according to all attributes.
122
115
  # @return [Integer] Hash code
123
116
  def hash
124
- [award_id, event_type, description, for_person].hash
117
+ [award_id, name, description, for_person].hash
125
118
  end
126
119
 
127
120
  # Builds the object from hash
@@ -137,9 +130,7 @@ module FtcEventsClient
137
130
  def build_from_hash(attributes)
138
131
  return nil unless attributes.is_a?(Hash)
139
132
  self.class.openapi_types.each_pair do |key, type|
140
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
141
- self.send("#{key}=", nil)
142
- elsif type =~ /\AArray<(.*)>/i
133
+ if type =~ /\AArray<(.*)>/i
143
134
  # check to ensure the input is an array given that the attribute
144
135
  # is documented as an array but the input is not
145
136
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -147,6 +138,8 @@ module FtcEventsClient
147
138
  end
148
139
  elsif !attributes[self.class.attribute_map[key]].nil?
149
140
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
142
+ self.send("#{key}=", nil)
150
143
  end
151
144
  end
152
145
 
@@ -159,8 +152,8 @@ module FtcEventsClient
159
152
  # @return [Object] Deserialized data
160
153
  def _deserialize(type, value)
161
154
  case type.to_sym
162
- when :Time
163
- Time.parse(value)
155
+ when :DateTime
156
+ DateTime.parse(value)
164
157
  when :Date
165
158
  Date.parse(value)
166
159
  when :String
@@ -190,9 +183,7 @@ module FtcEventsClient
190
183
  end
191
184
  end
192
185
  else # model
193
- # models (e.g. Pet) or oneOf
194
- klass = FtcEventsClient.const_get(type)
195
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ FtcEventsClient.const_get(type).build_from_hash(value)
196
187
  end
197
188
  end
198
189
 
@@ -240,8 +231,5 @@ module FtcEventsClient
240
231
  else
241
232
  value
242
233
  end
243
- end
244
-
245
- end
246
-
234
+ end end
247
235
  end
@@ -3,15 +3,13 @@
3
3
 
4
4
  #FTC Events API is a service to return relevant information about the _FIRST_ Tech Challenge (FTC). Information is made available from events operating around the world Information is currently made available after the conclusion of the tournament. The API will provide data as soon as it has synced, and we do not add any artificial delays. ## Documentation Notes ### Timezones All times are listed in the local time to the event venue. HTTP-date values will show their timezone. ### Query Parameters If you specify a parameter, but no value for that parameter, it will be ignored. For example, if you request `URL?teamNumber=` the `teamNumber` parameter would be ignored. For all APIs that accept a query string in addition to the base URI, the order of parameters do not matter, but the name shown in the documentation must match exactly, as does the associated value format as described in details. For response codes that are not HTTP 200 (OK), the documentation will show a body message that represents a possible response value. While the \"title\" of the HTTP Status Code will match those shown in the response codes documentation section exactly, the body of the response will be a more detailed explanation of why that status code is being returned and may not always be exactly as shown in the examples. ### Experimenting with the API This documentation is rendered at both [api-docs](https://ftc-events.firstinspires.org/api-docs) and [try-it-out](https://ftc-events.firstinspires.org/try-it-out). [api-docs](https://ftc-events.firstinspires.org/api-docs) has a three panel, easy to read layout, while [try-it-out](https://ftc-events.firstinspires.org/try-it-out) has a feature that allows you try out endpoints from within the page. Additionally, the Open API Json is availabe at [Open API](https://ftc-events.firstinspires.org/swagger/v2.0/swagger.json). This can be imported into a tool such as [Postman](https://www.postman.com) for experimentation as well. ### Last-Modified, FMS-OnlyModifiedSince, and If-Modified-Since Headers The FTC Events API utilizes the `Last-Modified` and `If-Modified-Since` Headers to communicate with consumers regarding the age of the data they are requesting. With a couple of exceptions, all calls will return a `Last-Modified` Header set with the time at which the data at that endpoint was last modified. The Header will always be set in the HTTP-date format, as described in the HTTP Protocol. There are two exceptions: the `Last-Modified` Header is not set if the endpoint returns no results (such as a request for a schedule with no matches). Consumers should keep track of the `Last-Modified` Header, and return it on subsequent calls to the same endpoint as the If-Modified-Since. The server will recognize this request, and will only return a result if the data has been modified since the last request. If no changes have been made, an HTTP 304 will be returned. If data has been modified, ALL data on that call will be returned (for \"only modified\" data, see below). The FTC Events API also allows a custom header used to filter the return data to a specific subset. This is done by specifying a `FMS-OnlyModifiedSince` header with each call. As with the `If-Modified-Since` header, consumers should keep track of the Last-Modified Header, and return it on subsequent calls to the same endpoint as the `FMS-OnlyModifiedSince` Header. The server will recognize this request, and will only return a result if the data has been modified since the last request, and, if returned, the data will only be those portions modified since the included date. If no changes, have been made, an HTTP 304 will be returned. Using this method, the server and consumer save processing time by only receiving modified data that is in need of update on the consumer side. If the Headers are improperly passed (such as the wrong Day of Week for the matching date, or a date in the future), the endpoint will simply ignore the Header and return all results. If both headers are specified, the request will be denied. ## Response Codes The FTC Events API HTTP Status Codes correspond with the [common codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), but occasionally with different \"titles\". The \"title\" used by the API is shown next to each of the below possible response HTTP Status Codes. Throughout the documentation, Apiary may automatically show the common \"title\" in example returns (like \"Not Found\" for 404) but on the production server, the \"title\" will instead match those listed below. ### HTTP 200 - \"OK\" The request has succeeded. An entity corresponding to the requested resource is sent in the response. This will be returned as the HTTP Status Code for all request that succeed, even if the body is empty (such as an event that has no rankings, but with a valid season and event code were used) ### HTTP 304 - \"Not Modified\" When utilizing a Header that allows filtered data returns, such as `If-Modified-Since`, this response indicates that no data meets the request. ### HTTP 400 - \"Invalid Season Requested\"/\"Malformed Parameter Format In Request\"/\"Missing Parameter In Request\"/\"Invalid API Version Requested\": The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. Specifically for this API, a 400 response indicates that the requested URI matches with a valid API, but one or more required parameter was malformed or invalid. Examples include an event code that is too short or team number that contains a letter. ### HTTP 401 - \"Unauthorized\" All requests against the API require authentication via a valid user token. Failing to provide one, or providing an invalid one, will warrant a 401 response. The client MAY repeat the request with a suitable Authorization header field. ### HTTP 404 - \"Invalid Event Requested\" Even though the 404 code usually indicates any not found status, a 404 will only be issued in this API when an event cannot be found for the requested season and event code. If the request didn't match a valid API or there were malformed parameters, the response would not receive a 404 but rather a 400 or 501. If this HTTP code is received, the season was a valid season and the event code matched the acceptable style of an event code, but there were no records of an event matching the combination of that season and event code. For example, HTTP 404 would be issued when the event had a different code in the requested season (the codes can change year to year based on event location). ### HTTP 500 - \"Internal Server Error\" The server encountered an unexpected condition which prevented it from fulfilling the request. This is a code sent directly by the server, and has no special alternate definition specific to this API. ### HTTP 501 - \"Request Did Not Match Any Current API Pattern\" The server does not support the functionality required to fulfill the request. Specifically, the request pattern did not match any of the possible APIs, and thus processing was discontinued. This code is also issued when too many optional parameters were included in a single request and fulfilling it would make the result confusing or misleading. Each API will specify which parameters or combination of parameters can be used at the same time. ### HTTP 503 - \"Service Unavailable\" The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a `Retry-After` header. This code will not always appear, sometimes the server may outright refuse the connection instead. This is a code sent directly by the server, and has no special alternate definition specific to this API. ## Authorization In order to make calls against the FTC Events API, you must include an HTTP Header called `Authorization` with the value set as specified below. If a request is made without this header, processing stops and an HTTP 401 is issued. All `Authorization` headers follow the same format: ``` Authorization: Basic 000000000000000000000000000000000000000000000000000000000000 ``` Where the Zeros are replaced by your Token. The Token can be formed by taking your username and your AuthorizationKey and adding a colon. For example, if your username is `sampleuser` and your AuthorizationKey is `7eaa6338-a097-4221-ac04-b6120fcc4d49` you would have this string: ``` sampleuser:7eaa6338-a097-4221-ac04-b6120fcc4d49 ``` This string must then be encoded using Base64 Encoded to form the Token, which will be the same length as the example above, but include letters and numbers. For our example, we would have: ``` c2FtcGxldXNlcjo3ZWFhNjMzOC1hMDk3LTQyMjEtYWMwNC1iNjEyMGZjYzRkNDk= ``` Most API client libraries can handle computing the authorization header using a username and password for you NOTICE: Publicly distributing an application, code snippet, etc, that has your username and token in it, encoded or not, WILL result in your token being blocked from the API. Each user should apply for their own token. If you wish to acquire a token for your development, you may do so by requesting a token through our automated system on this website.
5
5
 
6
- The version of the OpenAPI document: v2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-SNAPSHOT
6
+ OpenAPI spec version: v2.0
10
7
 
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.29
11
10
  =end
12
11
 
13
12
  require 'date'
14
- require 'time'
15
13
 
16
14
  module FtcEventsClient
17
15
  class SeasonEventListingsModelVersion2
@@ -27,16 +25,11 @@ module FtcEventsClient
27
25
  }
28
26
  end
29
27
 
30
- # Returns all the JSON keys this model knows about
31
- def self.acceptable_attributes
32
- attribute_map.values
33
- end
34
-
35
28
  # Attribute type mapping.
36
29
  def self.openapi_types
37
30
  {
38
- :'events' => :'Array<SeasonEventModelVersion2>',
39
- :'event_count' => :'Integer'
31
+ :'events' => :'Object',
32
+ :'event_count' => :'Object'
40
33
  }
41
34
  end
42
35
 
@@ -46,7 +39,7 @@ module FtcEventsClient
46
39
  :'events',
47
40
  ])
48
41
  end
49
-
42
+
50
43
  # Initializes the object
51
44
  # @param [Hash] attributes Model attributes in the form of hash
52
45
  def initialize(attributes = {})
@@ -120,9 +113,7 @@ module FtcEventsClient
120
113
  def build_from_hash(attributes)
121
114
  return nil unless attributes.is_a?(Hash)
122
115
  self.class.openapi_types.each_pair do |key, type|
123
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
125
- elsif type =~ /\AArray<(.*)>/i
116
+ if type =~ /\AArray<(.*)>/i
126
117
  # check to ensure the input is an array given that the attribute
127
118
  # is documented as an array but the input is not
128
119
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -130,6 +121,8 @@ module FtcEventsClient
130
121
  end
131
122
  elsif !attributes[self.class.attribute_map[key]].nil?
132
123
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
+ self.send("#{key}=", nil)
133
126
  end
134
127
  end
135
128
 
@@ -142,8 +135,8 @@ module FtcEventsClient
142
135
  # @return [Object] Deserialized data
143
136
  def _deserialize(type, value)
144
137
  case type.to_sym
145
- when :Time
146
- Time.parse(value)
138
+ when :DateTime
139
+ DateTime.parse(value)
147
140
  when :Date
148
141
  Date.parse(value)
149
142
  when :String
@@ -173,9 +166,7 @@ module FtcEventsClient
173
166
  end
174
167
  end
175
168
  else # model
176
- # models (e.g. Pet) or oneOf
177
- klass = FtcEventsClient.const_get(type)
178
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ FtcEventsClient.const_get(type).build_from_hash(value)
179
170
  end
180
171
  end
181
172
 
@@ -223,8 +214,5 @@ module FtcEventsClient
223
214
  else
224
215
  value
225
216
  end
226
- end
227
-
228
- end
229
-
217
+ end end
230
218
  end
@@ -3,15 +3,13 @@
3
3
 
4
4
  #FTC Events API is a service to return relevant information about the _FIRST_ Tech Challenge (FTC). Information is made available from events operating around the world Information is currently made available after the conclusion of the tournament. The API will provide data as soon as it has synced, and we do not add any artificial delays. ## Documentation Notes ### Timezones All times are listed in the local time to the event venue. HTTP-date values will show their timezone. ### Query Parameters If you specify a parameter, but no value for that parameter, it will be ignored. For example, if you request `URL?teamNumber=` the `teamNumber` parameter would be ignored. For all APIs that accept a query string in addition to the base URI, the order of parameters do not matter, but the name shown in the documentation must match exactly, as does the associated value format as described in details. For response codes that are not HTTP 200 (OK), the documentation will show a body message that represents a possible response value. While the \"title\" of the HTTP Status Code will match those shown in the response codes documentation section exactly, the body of the response will be a more detailed explanation of why that status code is being returned and may not always be exactly as shown in the examples. ### Experimenting with the API This documentation is rendered at both [api-docs](https://ftc-events.firstinspires.org/api-docs) and [try-it-out](https://ftc-events.firstinspires.org/try-it-out). [api-docs](https://ftc-events.firstinspires.org/api-docs) has a three panel, easy to read layout, while [try-it-out](https://ftc-events.firstinspires.org/try-it-out) has a feature that allows you try out endpoints from within the page. Additionally, the Open API Json is availabe at [Open API](https://ftc-events.firstinspires.org/swagger/v2.0/swagger.json). This can be imported into a tool such as [Postman](https://www.postman.com) for experimentation as well. ### Last-Modified, FMS-OnlyModifiedSince, and If-Modified-Since Headers The FTC Events API utilizes the `Last-Modified` and `If-Modified-Since` Headers to communicate with consumers regarding the age of the data they are requesting. With a couple of exceptions, all calls will return a `Last-Modified` Header set with the time at which the data at that endpoint was last modified. The Header will always be set in the HTTP-date format, as described in the HTTP Protocol. There are two exceptions: the `Last-Modified` Header is not set if the endpoint returns no results (such as a request for a schedule with no matches). Consumers should keep track of the `Last-Modified` Header, and return it on subsequent calls to the same endpoint as the If-Modified-Since. The server will recognize this request, and will only return a result if the data has been modified since the last request. If no changes have been made, an HTTP 304 will be returned. If data has been modified, ALL data on that call will be returned (for \"only modified\" data, see below). The FTC Events API also allows a custom header used to filter the return data to a specific subset. This is done by specifying a `FMS-OnlyModifiedSince` header with each call. As with the `If-Modified-Since` header, consumers should keep track of the Last-Modified Header, and return it on subsequent calls to the same endpoint as the `FMS-OnlyModifiedSince` Header. The server will recognize this request, and will only return a result if the data has been modified since the last request, and, if returned, the data will only be those portions modified since the included date. If no changes, have been made, an HTTP 304 will be returned. Using this method, the server and consumer save processing time by only receiving modified data that is in need of update on the consumer side. If the Headers are improperly passed (such as the wrong Day of Week for the matching date, or a date in the future), the endpoint will simply ignore the Header and return all results. If both headers are specified, the request will be denied. ## Response Codes The FTC Events API HTTP Status Codes correspond with the [common codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), but occasionally with different \"titles\". The \"title\" used by the API is shown next to each of the below possible response HTTP Status Codes. Throughout the documentation, Apiary may automatically show the common \"title\" in example returns (like \"Not Found\" for 404) but on the production server, the \"title\" will instead match those listed below. ### HTTP 200 - \"OK\" The request has succeeded. An entity corresponding to the requested resource is sent in the response. This will be returned as the HTTP Status Code for all request that succeed, even if the body is empty (such as an event that has no rankings, but with a valid season and event code were used) ### HTTP 304 - \"Not Modified\" When utilizing a Header that allows filtered data returns, such as `If-Modified-Since`, this response indicates that no data meets the request. ### HTTP 400 - \"Invalid Season Requested\"/\"Malformed Parameter Format In Request\"/\"Missing Parameter In Request\"/\"Invalid API Version Requested\": The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. Specifically for this API, a 400 response indicates that the requested URI matches with a valid API, but one or more required parameter was malformed or invalid. Examples include an event code that is too short or team number that contains a letter. ### HTTP 401 - \"Unauthorized\" All requests against the API require authentication via a valid user token. Failing to provide one, or providing an invalid one, will warrant a 401 response. The client MAY repeat the request with a suitable Authorization header field. ### HTTP 404 - \"Invalid Event Requested\" Even though the 404 code usually indicates any not found status, a 404 will only be issued in this API when an event cannot be found for the requested season and event code. If the request didn't match a valid API or there were malformed parameters, the response would not receive a 404 but rather a 400 or 501. If this HTTP code is received, the season was a valid season and the event code matched the acceptable style of an event code, but there were no records of an event matching the combination of that season and event code. For example, HTTP 404 would be issued when the event had a different code in the requested season (the codes can change year to year based on event location). ### HTTP 500 - \"Internal Server Error\" The server encountered an unexpected condition which prevented it from fulfilling the request. This is a code sent directly by the server, and has no special alternate definition specific to this API. ### HTTP 501 - \"Request Did Not Match Any Current API Pattern\" The server does not support the functionality required to fulfill the request. Specifically, the request pattern did not match any of the possible APIs, and thus processing was discontinued. This code is also issued when too many optional parameters were included in a single request and fulfilling it would make the result confusing or misleading. Each API will specify which parameters or combination of parameters can be used at the same time. ### HTTP 503 - \"Service Unavailable\" The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a `Retry-After` header. This code will not always appear, sometimes the server may outright refuse the connection instead. This is a code sent directly by the server, and has no special alternate definition specific to this API. ## Authorization In order to make calls against the FTC Events API, you must include an HTTP Header called `Authorization` with the value set as specified below. If a request is made without this header, processing stops and an HTTP 401 is issued. All `Authorization` headers follow the same format: ``` Authorization: Basic 000000000000000000000000000000000000000000000000000000000000 ``` Where the Zeros are replaced by your Token. The Token can be formed by taking your username and your AuthorizationKey and adding a colon. For example, if your username is `sampleuser` and your AuthorizationKey is `7eaa6338-a097-4221-ac04-b6120fcc4d49` you would have this string: ``` sampleuser:7eaa6338-a097-4221-ac04-b6120fcc4d49 ``` This string must then be encoded using Base64 Encoded to form the Token, which will be the same length as the example above, but include letters and numbers. For our example, we would have: ``` c2FtcGxldXNlcjo3ZWFhNjMzOC1hMDk3LTQyMjEtYWMwNC1iNjEyMGZjYzRkNDk= ``` Most API client libraries can handle computing the authorization header using a username and password for you NOTICE: Publicly distributing an application, code snippet, etc, that has your username and token in it, encoded or not, WILL result in your token being blocked from the API. Each user should apply for their own token. If you wish to acquire a token for your development, you may do so by requesting a token through our automated system on this website.
5
5
 
6
- The version of the OpenAPI document: v2.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.0.0-SNAPSHOT
6
+ OpenAPI spec version: v2.0
10
7
 
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.29
11
10
  =end
12
11
 
13
12
  require 'date'
14
- require 'time'
15
13
 
16
14
  module FtcEventsClient
17
15
  class SeasonEventModelVersion2
@@ -23,10 +21,20 @@ module FtcEventsClient
23
21
 
24
22
  attr_accessor :remote
25
23
 
24
+ attr_accessor :hybrid
25
+
26
+ attr_accessor :field_count
27
+
26
28
  attr_accessor :published
27
29
 
28
30
  attr_accessor :type
29
31
 
32
+ attr_accessor :type_name
33
+
34
+ attr_accessor :region_code
35
+
36
+ attr_accessor :league_code
37
+
30
38
  attr_accessor :district_code
31
39
 
32
40
  attr_accessor :venue
@@ -56,8 +64,13 @@ module FtcEventsClient
56
64
  :'division_code' => :'divisionCode',
57
65
  :'name' => :'name',
58
66
  :'remote' => :'remote',
67
+ :'hybrid' => :'hybrid',
68
+ :'field_count' => :'fieldCount',
59
69
  :'published' => :'published',
60
70
  :'type' => :'type',
71
+ :'type_name' => :'typeName',
72
+ :'region_code' => :'regionCode',
73
+ :'league_code' => :'leagueCode',
61
74
  :'district_code' => :'districtCode',
62
75
  :'venue' => :'venue',
63
76
  :'address' => :'address',
@@ -72,31 +85,31 @@ module FtcEventsClient
72
85
  }
73
86
  end
74
87
 
75
- # Returns all the JSON keys this model knows about
76
- def self.acceptable_attributes
77
- attribute_map.values
78
- end
79
-
80
88
  # Attribute type mapping.
81
89
  def self.openapi_types
82
90
  {
83
- :'code' => :'String',
84
- :'division_code' => :'String',
85
- :'name' => :'String',
86
- :'remote' => :'Boolean',
87
- :'published' => :'Boolean',
88
- :'type' => :'String',
89
- :'district_code' => :'String',
90
- :'venue' => :'String',
91
- :'address' => :'String',
92
- :'city' => :'String',
93
- :'stateprov' => :'String',
94
- :'country' => :'String',
95
- :'website' => :'String',
96
- :'webcasts' => :'Array<String>',
97
- :'timezone' => :'String',
98
- :'date_start' => :'Time',
99
- :'date_end' => :'Time'
91
+ :'code' => :'Object',
92
+ :'division_code' => :'Object',
93
+ :'name' => :'Object',
94
+ :'remote' => :'Object',
95
+ :'hybrid' => :'Object',
96
+ :'field_count' => :'Object',
97
+ :'published' => :'Object',
98
+ :'type' => :'Object',
99
+ :'type_name' => :'Object',
100
+ :'region_code' => :'Object',
101
+ :'league_code' => :'Object',
102
+ :'district_code' => :'Object',
103
+ :'venue' => :'Object',
104
+ :'address' => :'Object',
105
+ :'city' => :'Object',
106
+ :'stateprov' => :'Object',
107
+ :'country' => :'Object',
108
+ :'website' => :'Object',
109
+ :'webcasts' => :'Object',
110
+ :'timezone' => :'Object',
111
+ :'date_start' => :'Object',
112
+ :'date_end' => :'Object'
100
113
  }
101
114
  end
102
115
 
@@ -107,6 +120,9 @@ module FtcEventsClient
107
120
  :'division_code',
108
121
  :'name',
109
122
  :'type',
123
+ :'type_name',
124
+ :'region_code',
125
+ :'league_code',
110
126
  :'district_code',
111
127
  :'venue',
112
128
  :'address',
@@ -118,7 +134,7 @@ module FtcEventsClient
118
134
  :'timezone',
119
135
  ])
120
136
  end
121
-
137
+
122
138
  # Initializes the object
123
139
  # @param [Hash] attributes Model attributes in the form of hash
124
140
  def initialize(attributes = {})
@@ -150,6 +166,14 @@ module FtcEventsClient
150
166
  self.remote = attributes[:'remote']
151
167
  end
152
168
 
169
+ if attributes.key?(:'hybrid')
170
+ self.hybrid = attributes[:'hybrid']
171
+ end
172
+
173
+ if attributes.key?(:'field_count')
174
+ self.field_count = attributes[:'field_count']
175
+ end
176
+
153
177
  if attributes.key?(:'published')
154
178
  self.published = attributes[:'published']
155
179
  end
@@ -158,6 +182,18 @@ module FtcEventsClient
158
182
  self.type = attributes[:'type']
159
183
  end
160
184
 
185
+ if attributes.key?(:'type_name')
186
+ self.type_name = attributes[:'type_name']
187
+ end
188
+
189
+ if attributes.key?(:'region_code')
190
+ self.region_code = attributes[:'region_code']
191
+ end
192
+
193
+ if attributes.key?(:'league_code')
194
+ self.league_code = attributes[:'league_code']
195
+ end
196
+
161
197
  if attributes.key?(:'district_code')
162
198
  self.district_code = attributes[:'district_code']
163
199
  end
@@ -227,8 +263,13 @@ module FtcEventsClient
227
263
  division_code == o.division_code &&
228
264
  name == o.name &&
229
265
  remote == o.remote &&
266
+ hybrid == o.hybrid &&
267
+ field_count == o.field_count &&
230
268
  published == o.published &&
231
269
  type == o.type &&
270
+ type_name == o.type_name &&
271
+ region_code == o.region_code &&
272
+ league_code == o.league_code &&
232
273
  district_code == o.district_code &&
233
274
  venue == o.venue &&
234
275
  address == o.address &&
@@ -251,7 +292,7 @@ module FtcEventsClient
251
292
  # Calculates hash code according to all attributes.
252
293
  # @return [Integer] Hash code
253
294
  def hash
254
- [code, division_code, name, remote, published, type, district_code, venue, address, city, stateprov, country, website, webcasts, timezone, date_start, date_end].hash
295
+ [code, division_code, name, remote, hybrid, field_count, published, type, type_name, region_code, league_code, district_code, venue, address, city, stateprov, country, website, webcasts, timezone, date_start, date_end].hash
255
296
  end
256
297
 
257
298
  # Builds the object from hash
@@ -267,9 +308,7 @@ module FtcEventsClient
267
308
  def build_from_hash(attributes)
268
309
  return nil unless attributes.is_a?(Hash)
269
310
  self.class.openapi_types.each_pair do |key, type|
270
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
271
- self.send("#{key}=", nil)
272
- elsif type =~ /\AArray<(.*)>/i
311
+ if type =~ /\AArray<(.*)>/i
273
312
  # check to ensure the input is an array given that the attribute
274
313
  # is documented as an array but the input is not
275
314
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -277,6 +316,8 @@ module FtcEventsClient
277
316
  end
278
317
  elsif !attributes[self.class.attribute_map[key]].nil?
279
318
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
319
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
320
+ self.send("#{key}=", nil)
280
321
  end
281
322
  end
282
323
 
@@ -289,8 +330,8 @@ module FtcEventsClient
289
330
  # @return [Object] Deserialized data
290
331
  def _deserialize(type, value)
291
332
  case type.to_sym
292
- when :Time
293
- Time.parse(value)
333
+ when :DateTime
334
+ DateTime.parse(value)
294
335
  when :Date
295
336
  Date.parse(value)
296
337
  when :String
@@ -320,9 +361,7 @@ module FtcEventsClient
320
361
  end
321
362
  end
322
363
  else # model
323
- # models (e.g. Pet) or oneOf
324
- klass = FtcEventsClient.const_get(type)
325
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
364
+ FtcEventsClient.const_get(type).build_from_hash(value)
326
365
  end
327
366
  end
328
367
 
@@ -370,8 +409,5 @@ module FtcEventsClient
370
409
  else
371
410
  value
372
411
  end
373
- end
374
-
375
- end
376
-
412
+ end end
377
413
  end