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.
89 90 91 92 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 89 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.
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/teams_api.rb', line 100 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 # 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.
149 150 151 152 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 149 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.
159 160 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 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 159 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 # 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 |
# 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 # 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).
208 209 210 211 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 208 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).
218 219 220 221 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 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 218 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 # 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.
267 268 269 270 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 267 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.
277 278 279 280 281 282 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 |
# File 'lib/ftc_api_v3_client/api/teams_api.rb', line 277 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 # 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 |