Class: FtcApiV3Client::TeamsApi
- Inherits:
-
Object
- Object
- FtcApiV3Client::TeamsApi
- Defined in:
- lib/ftc_api_v3_client/api/teams_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_team(cmp_year, number, opts = {}) ⇒ ApiV3Team
Get teams information Get information for a specific team.
-
#get_team_details(cmp_year, number, opts = {}) ⇒ ApiV3TeamDetails
Get detailed team information Get detailed information for a specific team.
-
#get_team_details_with_http_info(cmp_year, number, opts = {}) ⇒ Array<(ApiV3TeamDetails, Integer, Hash)>
Get detailed team information Get detailed information for a specific team.
-
#get_team_history(number, opts = {}) ⇒ ApiV3TeamHistory
Get team history Get cross-season history for a specific team number.
-
#get_team_history_with_http_info(number, opts = {}) ⇒ Array<(ApiV3TeamHistory, Integer, Hash)>
Get team history Get cross-season history for a specific team number.
-
#get_team_with_http_info(cmp_year, number, opts = {}) ⇒ Array<(ApiV3Team, Integer, Hash)>
Get teams information Get information for a specific team.
-
#initialize(api_client = ApiClient.default) ⇒ TeamsApi
constructor
A new instance of TeamsApi.
-
#list_team_avatars(cmp_year, opts = {}) ⇒ ApiV3TeamAvatars
List team avatars for a season Lists all current team avatars for a season.
-
#list_team_avatars_with_http_info(cmp_year, opts = {}) ⇒ Array<(ApiV3TeamAvatars, Integer, Hash)>
List team avatars for a season Lists all current team avatars for a season.
-
#list_teams(cmp_year, opts = {}) ⇒ ApiV3Teams
List teams for a season Lists all registered teams for the given FTC season.
-
#list_teams_with_http_info(cmp_year, opts = {}) ⇒ Array<(ApiV3Teams, Integer, Hash)>
List teams for a season Lists all registered teams for the given FTC season.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_team(cmp_year, number, opts = {}) ⇒ ApiV3Team
Get teams information Get information for a specific team. If a team's number changed during the season, this endpoint can be called with the old number and it will return the new one.
28 29 30 31 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 28 def get_team(cmp_year, number, opts = {}) data, _status_code, _headers = get_team_with_http_info(cmp_year, number, opts) data end |
#get_team_details(cmp_year, number, opts = {}) ⇒ ApiV3TeamDetails
Get detailed team information Get detailed information for a specific team. Includes all awards, events, matches, and leagues. If a team's number changed during the season, this endpoint can be called with the old number and it will return the new one.
97 98 99 100 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 97 def get_team_details(cmp_year, number, opts = {}) data, _status_code, _headers = get_team_details_with_http_info(cmp_year, number, opts) data end |
#get_team_details_with_http_info(cmp_year, number, opts = {}) ⇒ Array<(ApiV3TeamDetails, Integer, Hash)>
Get detailed team information Get detailed information for a specific team. Includes all awards, events, matches, and leagues. If a team's number changed during the season, this endpoint can be called with the old number and it will return the new one.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 108 def get_team_details_with_http_info(cmp_year, number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.get_team_details ...' end # verify the required parameter 'cmp_year' is set if @api_client.config.client_side_validation && cmp_year.nil? fail ArgumentError, "Missing the required parameter 'cmp_year' when calling TeamsApi.get_team_details" 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 TeamsApi.get_team_details" end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/teams/{number}/details'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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] || 'ApiV3TeamDetails' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TeamsApi.get_team_details", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#get_team_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_history(number, opts = {}) ⇒ ApiV3TeamHistory
Get team history Get cross-season history for a specific team number. General information will be from the last season the team competed in.
165 166 167 168 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 165 def get_team_history(number, opts = {}) data, _status_code, _headers = get_team_history_with_http_info(number, opts) data end |
#get_team_history_with_http_info(number, opts = {}) ⇒ Array<(ApiV3TeamHistory, Integer, Hash)>
Get team history Get cross-season history for a specific team number. General information will be from the last season the team competed in.
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 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 175 def get_team_history_with_http_info(number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.get_team_history ...' 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 TeamsApi.get_team_history" end # resource path local_var_path = '/api/v3/teams/{number}'.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] || 'ApiV3TeamHistory' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TeamsApi.get_team_history", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#get_team_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_team_with_http_info(cmp_year, number, opts = {}) ⇒ Array<(ApiV3Team, Integer, Hash)>
Get teams information Get information for a specific team. If a team's number changed during the season, this endpoint can be called with the old number and it will return the new one.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 39 def get_team_with_http_info(cmp_year, number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.get_team ...' end # verify the required parameter 'cmp_year' is set if @api_client.config.client_side_validation && cmp_year.nil? fail ArgumentError, "Missing the required parameter 'cmp_year' when calling TeamsApi.get_team" 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 TeamsApi.get_team" end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/teams/{number}'.sub('{' + 'cmpYear' + '}', CGI.escape(cmp_year.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] || 'ApiV3Team' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TeamsApi.get_team", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#get_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_team_avatars(cmp_year, opts = {}) ⇒ ApiV3TeamAvatars
List team avatars for a season
Lists all current team avatars for a season. If all you need is to display avatars with the standard FIRST fallback and scaling, directly link /avatars/composed/{cmpYear}.css instead of using this endpoint. Use a div with the classes team-avatar and team-{number} to display the avatar. Use the css variable --avatar-size to control the size of the avatar in px (defaults to 40).
228 229 230 231 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 228 def list_team_avatars(cmp_year, opts = {}) data, _status_code, _headers = list_team_avatars_with_http_info(cmp_year, opts) data end |
#list_team_avatars_with_http_info(cmp_year, opts = {}) ⇒ Array<(ApiV3TeamAvatars, Integer, Hash)>
List team avatars for a season Lists all current team avatars for a season. If all you need is to display avatars with the standard FIRST fallback and scaling, directly link `/avatars/composed/cmpYear.css` instead of using this endpoint. Use a div with the classes `team-avatar` and `team-number` to display the avatar. Use the css variable `--avatar-size` to control the size of the avatar in px (defaults to 40).
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 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 238 def list_team_avatars_with_http_info(cmp_year, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.list_team_avatars ...' end # verify the required parameter 'cmp_year' is set if @api_client.config.client_side_validation && cmp_year.nil? fail ArgumentError, "Missing the required parameter 'cmp_year' when calling TeamsApi.list_team_avatars" end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/avatars'.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] || 'ApiV3TeamAvatars' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TeamsApi.list_team_avatars", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#list_team_avatars\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_teams(cmp_year, opts = {}) ⇒ ApiV3Teams
List teams for a season Lists all registered teams for the given FTC season. In some cases, teams with incomplete registrations may be included in event results but not returned in this list. Use the event's team list for that information if necessary.
291 292 293 294 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 291 def list_teams(cmp_year, opts = {}) data, _status_code, _headers = list_teams_with_http_info(cmp_year, opts) data end |
#list_teams_with_http_info(cmp_year, opts = {}) ⇒ Array<(ApiV3Teams, Integer, Hash)>
List teams for a season Lists all registered teams for the given FTC season. In some cases, teams with incomplete registrations may be included in event results but not returned in this list. Use the event's team list for that information if necessary.
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 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 301 def list_teams_with_http_info(cmp_year, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.list_teams ...' end # verify the required parameter 'cmp_year' is set if @api_client.config.client_side_validation && cmp_year.nil? fail ArgumentError, "Missing the required parameter 'cmp_year' when calling TeamsApi.list_teams" end # resource path local_var_path = '/api/v3/seasons/{cmpYear}/teams'.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] || 'ApiV3Teams' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"TeamsApi.list_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#list_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |