Class: Lishogi::TeamsApi
- Inherits:
-
Object
- Object
- Lishogi::TeamsApi
- Defined in:
- lib/lishogi/api/teams_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#api_team_arena(team_id, opts = {}) ⇒ Array<Object>
Get team Arena tournaments Get all Arena tournaments relevant to a team.
-
#api_team_arena_with_http_info(team_id, opts = {}) ⇒ Array<(Array<Object>, Integer, Hash)>
Get team Arena tournaments Get all Arena tournaments relevant to a team.
-
#initialize(api_client = ApiClient.default) ⇒ TeamsApi
constructor
A new instance of TeamsApi.
-
#team_all(opts = {}) ⇒ TeamAll200Response
Get popular teams Paginator of the most popular teams.
-
#team_all_with_http_info(opts = {}) ⇒ Array<(TeamAll200Response, Integer, Hash)>
Get popular teams Paginator of the most popular teams.
-
#team_id_join(team_id, opts = {}) ⇒ Ok
Join a team Join a team.
-
#team_id_join_with_http_info(team_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Join a team Join a team.
-
#team_id_kick_user_id(team_id, user_id, opts = {}) ⇒ Ok
Kick a user from your team Kick a member out of one of your teams.
-
#team_id_kick_user_id_with_http_info(team_id, user_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Kick a user from your team Kick a member out of one of your teams.
-
#team_id_pm_all(team_id, opts = {}) ⇒ Ok
Message all members Send a private message to all members of a team.
-
#team_id_pm_all_with_http_info(team_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Message all members Send a private message to all members of a team.
-
#team_id_quit(team_id, opts = {}) ⇒ Ok
Leave a team Leave a team.
-
#team_id_quit_with_http_info(team_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Leave a team Leave a team.
-
#team_id_users(team_id, opts = {}) ⇒ UserExtended
Get members of a team Members are sorted by reverse chronological order of joining the team (most recent first).
-
#team_id_users_with_http_info(team_id, opts = {}) ⇒ Array<(UserExtended, Integer, Hash)>
Get members of a team Members are sorted by reverse chronological order of joining the team (most recent first).
-
#team_of_username(username, opts = {}) ⇒ Array<Team>
Teams of a player All the teams a player is a member of.
-
#team_of_username_with_http_info(username, opts = {}) ⇒ Array<(Array<Team>, Integer, Hash)>
Teams of a player All the teams a player is a member of.
-
#team_search(opts = {}) ⇒ Array<Team>
Search teams Paginator of team search results for a keyword.
-
#team_search_with_http_info(opts = {}) ⇒ Array<(Array<Team>, Integer, Hash)>
Search teams Paginator of team search results for a keyword.
-
#team_show(team_id, opts = {}) ⇒ Team
Get a single team Infos about a team.
-
#team_show_with_http_info(team_id, opts = {}) ⇒ Array<(Team, Integer, Hash)>
Get a single team Infos about a team.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/lishogi/api/teams_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#api_team_arena(team_id, opts = {}) ⇒ Array<Object>
Get team Arena tournaments Get all Arena tournaments relevant to a team. Tournaments are sorted by reverse chronological order of start date (last starting first). Tournaments are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
28 29 30 31 |
# File 'lib/lishogi/api/teams_api.rb', line 28 def api_team_arena(team_id, opts = {}) data, _status_code, _headers = api_team_arena_with_http_info(team_id, opts) data end |
#api_team_arena_with_http_info(team_id, opts = {}) ⇒ Array<(Array<Object>, Integer, Hash)>
Get team Arena tournaments Get all Arena tournaments relevant to a team. Tournaments are sorted by reverse chronological order of start date (last starting first). Tournaments are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
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 90 |
# File 'lib/lishogi/api/teams_api.rb', line 39 def api_team_arena_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.api_team_arena ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.api_team_arena" end if @api_client.config.client_side_validation && !opts[:'max'].nil? && opts[:'max'] < 1 fail ArgumentError, 'invalid value for "opts[:"max"]" when calling TeamsApi.api_team_arena, must be greater than or equal to 1.' end # resource path local_var_path = '/api/team/{teamId}/arena'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'max'] = opts[:'max'] if !opts[:'max'].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] || 'Array<Object>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TeamsApi.api_team_arena", :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#api_team_arena\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_all(opts = {}) ⇒ TeamAll200Response
Get popular teams Paginator of the most popular teams.
97 98 99 100 |
# File 'lib/lishogi/api/teams_api.rb', line 97 def team_all(opts = {}) data, _status_code, _headers = team_all_with_http_info(opts) data end |
#team_all_with_http_info(opts = {}) ⇒ Array<(TeamAll200Response, Integer, Hash)>
Get popular teams Paginator of the most popular teams.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/lishogi/api/teams_api.rb', line 107 def team_all_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_all ...' end # resource path local_var_path = '/api/team/all' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].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] || 'TeamAll200Response' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TeamsApi.team_all", :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#team_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_id_join(team_id, opts = {}) ⇒ Ok
Join a team Join a team. If the team join policy requires a confirmation but the ‘message` parameter is not given, then the call fails with `403 Forbidden`.
158 159 160 161 |
# File 'lib/lishogi/api/teams_api.rb', line 158 def team_id_join(team_id, opts = {}) data, _status_code, _headers = team_id_join_with_http_info(team_id, opts) data end |
#team_id_join_with_http_info(team_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Join a team Join a team. If the team join policy requires a confirmation but the `message` parameter is not given, then the call fails with `403 Forbidden`.
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 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/lishogi/api/teams_api.rb', line 169 def team_id_join_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_id_join ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_join" end # resource path local_var_path = '/team/{teamId}/join'.sub('{' + 'teamId' + '}', CGI.escape(team_id.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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['message'] = opts[:'message'] if !opts[:'message'].nil? # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Ok' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"TeamsApi.team_id_join", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#team_id_join\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_id_kick_user_id(team_id, user_id, opts = {}) ⇒ Ok
Kick a user from your team Kick a member out of one of your teams. - <lishogi.org/team>
229 230 231 232 |
# File 'lib/lishogi/api/teams_api.rb', line 229 def team_id_kick_user_id(team_id, user_id, opts = {}) data, _status_code, _headers = team_id_kick_user_id_with_http_info(team_id, user_id, opts) data end |
#team_id_kick_user_id_with_http_info(team_id, user_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Kick a user from your team Kick a member out of one of your teams. - <lishogi.org/team>
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 285 286 287 288 289 290 |
# File 'lib/lishogi/api/teams_api.rb', line 240 def team_id_kick_user_id_with_http_info(team_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_id_kick_user_id ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_kick_user_id" end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsApi.team_id_kick_user_id" end # resource path local_var_path = '/team/{teamId}/kick/{userId}'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.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] || 'Ok' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"TeamsApi.team_id_kick_user_id", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#team_id_kick_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_id_pm_all(team_id, opts = {}) ⇒ Ok
Message all members Send a private message to all members of a team. You must own the team.
298 299 300 301 |
# File 'lib/lishogi/api/teams_api.rb', line 298 def team_id_pm_all(team_id, opts = {}) data, _status_code, _headers = team_id_pm_all_with_http_info(team_id, opts) data end |
#team_id_pm_all_with_http_info(team_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Message all members Send a private message to all members of a team. You must own the team.
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 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/lishogi/api/teams_api.rb', line 309 def team_id_pm_all_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_id_pm_all ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_pm_all" end # resource path local_var_path = '/team/{teamId}/pm-all'.sub('{' + 'teamId' + '}', CGI.escape(team_id.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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['message'] = opts[:'message'] if !opts[:'message'].nil? # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Ok' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"TeamsApi.team_id_pm_all", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#team_id_pm_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_id_quit(team_id, opts = {}) ⇒ Ok
Leave a team Leave a team. - <lishogi.org/team>
368 369 370 371 |
# File 'lib/lishogi/api/teams_api.rb', line 368 def team_id_quit(team_id, opts = {}) data, _status_code, _headers = team_id_quit_with_http_info(team_id, opts) data end |
#team_id_quit_with_http_info(team_id, opts = {}) ⇒ Array<(Ok, Integer, Hash)>
Leave a team Leave a team. - <lishogi.org/team>
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/lishogi/api/teams_api.rb', line 378 def team_id_quit_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_id_quit ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_quit" end # resource path local_var_path = '/team/{teamId}/quit'.sub('{' + 'teamId' + '}', CGI.escape(team_id.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] || 'Ok' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"TeamsApi.team_id_quit", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamsApi#team_id_quit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_id_users(team_id, opts = {}) ⇒ UserExtended
Get members of a team Members are sorted by reverse chronological order of joining the team (most recent first). OAuth only required if the list of members is private. Members are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
431 432 433 434 |
# File 'lib/lishogi/api/teams_api.rb', line 431 def team_id_users(team_id, opts = {}) data, _status_code, _headers = team_id_users_with_http_info(team_id, opts) data end |
#team_id_users_with_http_info(team_id, opts = {}) ⇒ Array<(UserExtended, Integer, Hash)>
Get members of a team Members are sorted by reverse chronological order of joining the team (most recent first). OAuth only required if the list of members is private. Members are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/lishogi/api/teams_api.rb', line 441 def team_id_users_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_id_users ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_users" end # resource path local_var_path = '/api/team/{teamId}/users'.sub('{' + 'teamId' + '}', CGI.escape(team_id.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/x-ndjson']) 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] || 'UserExtended' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"TeamsApi.team_id_users", :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#team_id_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_of_username(username, opts = {}) ⇒ Array<Team>
Teams of a player All the teams a player is a member of.
494 495 496 497 |
# File 'lib/lishogi/api/teams_api.rb', line 494 def team_of_username(username, opts = {}) data, _status_code, _headers = team_of_username_with_http_info(username, opts) data end |
#team_of_username_with_http_info(username, opts = {}) ⇒ Array<(Array<Team>, Integer, Hash)>
Teams of a player All the teams a player is a member of.
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/lishogi/api/teams_api.rb', line 504 def team_of_username_with_http_info(username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_of_username ...' end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling TeamsApi.team_of_username" end # resource path local_var_path = '/api/team/of/{username}'.sub('{' + 'username' + '}', CGI.escape(username.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] || 'Array<Team>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TeamsApi.team_of_username", :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#team_of_username\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_search(opts = {}) ⇒ Array<Team>
Search teams Paginator of team search results for a keyword.
558 559 560 561 |
# File 'lib/lishogi/api/teams_api.rb', line 558 def team_search(opts = {}) data, _status_code, _headers = team_search_with_http_info(opts) data end |
#team_search_with_http_info(opts = {}) ⇒ Array<(Array<Team>, Integer, Hash)>
Search teams Paginator of team search results for a keyword.
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/lishogi/api/teams_api.rb', line 569 def team_search_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_search ...' end # resource path local_var_path = '/api/team/search' # query parameters query_params = opts[:query_params] || {} query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].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] || 'Array<Team>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TeamsApi.team_search", :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#team_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#team_show(team_id, opts = {}) ⇒ Team
Get a single team Infos about a team
620 621 622 623 |
# File 'lib/lishogi/api/teams_api.rb', line 620 def team_show(team_id, opts = {}) data, _status_code, _headers = team_show_with_http_info(team_id, opts) data end |
#team_show_with_http_info(team_id, opts = {}) ⇒ Array<(Team, Integer, Hash)>
Get a single team Infos about a team
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 |
# File 'lib/lishogi/api/teams_api.rb', line 630 def team_show_with_http_info(team_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamsApi.team_show ...' end # verify the required parameter 'team_id' is set if @api_client.config.client_side_validation && team_id.nil? fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_show" end # resource path local_var_path = '/api/team/{teamId}'.sub('{' + 'teamId' + '}', CGI.escape(team_id.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] || 'Team' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TeamsApi.team_show", :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#team_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |