lishogi 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +661 -0
- data/LICENSE~ +1 -0
- data/Makefile +39 -0
- data/Makefile~ +7 -0
- data/README.md +276 -0
- data/Rakefile +10 -0
- data/docs/Account200Response.md +20 -0
- data/docs/AccountApi.md +345 -0
- data/docs/AccountEmail200Response.md +18 -0
- data/docs/AccountKid200Response.md +18 -0
- data/docs/AnalysisApi.md +77 -0
- data/docs/ApiStreamEvent200Response.md +53 -0
- data/docs/ApiUsersStatus200ResponseInner.md +30 -0
- data/docs/ArenaTournaments.md +22 -0
- data/docs/ArenaTournamentsApi.md +601 -0
- data/docs/BoardApi.md +659 -0
- data/docs/BoardGameStream200Response.md +51 -0
- data/docs/BoardGameTakebackAcceptParameter.md +15 -0
- data/docs/BotApi.md +634 -0
- data/docs/ChallengeDeclinedEvent.md +20 -0
- data/docs/ChallengeEvent.md +20 -0
- data/docs/ChallengeJson.md +42 -0
- data/docs/ChallengeJsonPerf.md +20 -0
- data/docs/ChallengeJsonTimeControl.md +51 -0
- data/docs/ChallengeJsonTimeControlOneOf.md +28 -0
- data/docs/ChallengeJsonTimeControlOneOf1.md +20 -0
- data/docs/ChallengeJsonTimeControlOneOf2.md +18 -0
- data/docs/ChallengeUser.md +30 -0
- data/docs/ChallengesApi.md +414 -0
- data/docs/ChatLineEvent.md +24 -0
- data/docs/Clock.md +24 -0
- data/docs/Count.md +38 -0
- data/docs/Error.md +18 -0
- data/docs/GameEventInfo.md +22 -0
- data/docs/GameEventInfoCompat.md +20 -0
- data/docs/GameEventPlayer.md +28 -0
- data/docs/GameFinishEvent.md +20 -0
- data/docs/GameFullEvent.md +42 -0
- data/docs/GameFullEventPerf.md +18 -0
- data/docs/GameJson.md +50 -0
- data/docs/GameJsonAnalysisInner.md +24 -0
- data/docs/GameJsonAnalysisInnerJudgment.md +20 -0
- data/docs/GameJsonClock.md +26 -0
- data/docs/GameJsonPlayers.md +20 -0
- data/docs/GameStartEvent.md +20 -0
- data/docs/GameStateEvent.md +38 -0
- data/docs/GameStatus.md +15 -0
- data/docs/GameUser.md +32 -0
- data/docs/GameUserAnalysis.md +24 -0
- data/docs/GamesApi.md +473 -0
- data/docs/LightUser.md +24 -0
- data/docs/LightUserTitle.md +49 -0
- data/docs/MessagingApi.md +79 -0
- data/docs/Move.md +28 -0
- data/docs/NotFound.md +18 -0
- data/docs/OAuthError.md +20 -0
- data/docs/Ok.md +18 -0
- data/docs/Perf.md +26 -0
- data/docs/PerfType.md +15 -0
- data/docs/Perfs.md +30 -0
- data/docs/PlayTime.md +20 -0
- data/docs/Profile.md +28 -0
- data/docs/PuzzleRoundJson.md +24 -0
- data/docs/PuzzlesApi.md +211 -0
- data/docs/SimulsApi.md +69 -0
- data/docs/Speed.md +15 -0
- data/docs/StudiesApi.md +233 -0
- data/docs/TVApi.md +208 -0
- data/docs/Team.md +32 -0
- data/docs/TeamAll200Response.md +30 -0
- data/docs/TeamRequest.md +24 -0
- data/docs/TeamRequestWithUser.md +20 -0
- data/docs/TeamsApi.md +702 -0
- data/docs/Title.md +15 -0
- data/docs/User.md +42 -0
- data/docs/UserExtended.md +60 -0
- data/docs/UserPreferences.md +72 -0
- data/docs/UsersApi.md +667 -0
- data/docs/Variant.md +22 -0
- data/docs/VariantKey.md +15 -0
- data/git_push.sh +57 -0
- data/lib/lishogi/api/account_api.rb +314 -0
- data/lib/lishogi/api/analysis_api.rb +92 -0
- data/lib/lishogi/api/arena_tournaments_api.rb +681 -0
- data/lib/lishogi/api/board_api.rb +685 -0
- data/lib/lishogi/api/bot_api.rb +608 -0
- data/lib/lishogi/api/challenges_api.rb +554 -0
- data/lib/lishogi/api/games_api.rb +514 -0
- data/lib/lishogi/api/messaging_api.rb +97 -0
- data/lib/lishogi/api/puzzles_api.rb +210 -0
- data/lib/lishogi/api/simuls_api.rb +79 -0
- data/lib/lishogi/api/studies_api.rb +244 -0
- data/lib/lishogi/api/teams_api.rb +678 -0
- data/lib/lishogi/api/tv_api.rb +222 -0
- data/lib/lishogi/api/users_api.rb +677 -0
- data/lib/lishogi/api_client.rb +437 -0
- data/lib/lishogi/api_error.rb +58 -0
- data/lib/lishogi/configuration.rb +392 -0
- data/lib/lishogi/models/account200_response.rb +223 -0
- data/lib/lishogi/models/account_email200_response.rb +214 -0
- data/lib/lishogi/models/account_kid200_response.rb +214 -0
- data/lib/lishogi/models/api_stream_event200_response.rb +107 -0
- data/lib/lishogi/models/api_users_status200_response_inner.rb +273 -0
- data/lib/lishogi/models/arena_tournaments.rb +238 -0
- data/lib/lishogi/models/board_game_stream200_response.rb +106 -0
- data/lib/lishogi/models/board_game_takeback_accept_parameter.rb +104 -0
- data/lib/lishogi/models/challenge_declined_event.rb +257 -0
- data/lib/lishogi/models/challenge_event.rb +257 -0
- data/lib/lishogi/models/challenge_json.rb +453 -0
- data/lib/lishogi/models/challenge_json_perf.rb +223 -0
- data/lib/lishogi/models/challenge_json_time_control.rb +106 -0
- data/lib/lishogi/models/challenge_json_time_control_one_of.rb +259 -0
- data/lib/lishogi/models/challenge_json_time_control_one_of1.rb +223 -0
- data/lib/lishogi/models/challenge_json_time_control_one_of2.rb +214 -0
- data/lib/lishogi/models/challenge_user.rb +275 -0
- data/lib/lishogi/models/chat_line_event.rb +315 -0
- data/lib/lishogi/models/clock.rb +242 -0
- data/lib/lishogi/models/count.rb +304 -0
- data/lib/lishogi/models/error.rb +215 -0
- data/lib/lishogi/models/game_event_info.rb +266 -0
- data/lib/lishogi/models/game_event_info_compat.rb +223 -0
- data/lib/lishogi/models/game_event_player.rb +260 -0
- data/lib/lishogi/models/game_finish_event.rb +257 -0
- data/lib/lishogi/models/game_full_event.rb +436 -0
- data/lib/lishogi/models/game_full_event_perf.rb +215 -0
- data/lib/lishogi/models/game_json.rb +457 -0
- data/lib/lishogi/models/game_json_analysis_inner.rb +251 -0
- data/lib/lishogi/models/game_json_analysis_inner_judgment.rb +258 -0
- data/lib/lishogi/models/game_json_clock.rb +250 -0
- data/lib/lishogi/models/game_json_players.rb +223 -0
- data/lib/lishogi/models/game_start_event.rb +257 -0
- data/lib/lishogi/models/game_state_event.rb +396 -0
- data/lib/lishogi/models/game_status.rb +52 -0
- data/lib/lishogi/models/game_user.rb +277 -0
- data/lib/lishogi/models/game_user_analysis.rb +269 -0
- data/lib/lishogi/models/light_user.rb +241 -0
- data/lib/lishogi/models/light_user_title.rb +105 -0
- data/lib/lishogi/models/move.rb +259 -0
- data/lib/lishogi/models/not_found.rb +214 -0
- data/lib/lishogi/models/o_auth_error.rb +225 -0
- data/lib/lishogi/models/ok.rb +214 -0
- data/lib/lishogi/models/perf.rb +250 -0
- data/lib/lishogi/models/perf_type.rb +49 -0
- data/lib/lishogi/models/perfs.rb +268 -0
- data/lib/lishogi/models/play_time.rb +223 -0
- data/lib/lishogi/models/profile.rb +259 -0
- data/lib/lishogi/models/puzzle_round_json.rb +241 -0
- data/lib/lishogi/models/speed.rb +44 -0
- data/lib/lishogi/models/team.rb +280 -0
- data/lib/lishogi/models/team_all200_response.rb +272 -0
- data/lib/lishogi/models/team_request.rb +241 -0
- data/lib/lishogi/models/team_request_with_user.rb +223 -0
- data/lib/lishogi/models/title.rb +64 -0
- data/lib/lishogi/models/user.rb +322 -0
- data/lib/lishogi/models/user_extended.rb +410 -0
- data/lib/lishogi/models/user_preferences.rb +515 -0
- data/lib/lishogi/models/variant.rb +256 -0
- data/lib/lishogi/models/variant_key.rb +44 -0
- data/lib/lishogi/version.rb +15 -0
- data/lib/lishogi.rb +112 -0
- data/lishogi-api.patched.yaml +5806 -0
- data/lishogi-api.yaml +5811 -0
- data/lishogi.gemspec +41 -0
- data/manifest.scm +1 -0
- data/manifest.scm~ +1 -0
- data/patch +5 -0
- data/patch~ +1 -0
- data/pkg/lishogi-0.1.0.gem +0 -0
- data/smoke +5 -0
- data/smoke~ +2 -0
- data/spec/api/account_api_spec.rb +91 -0
- data/spec/api/analysis_api_spec.rb +49 -0
- data/spec/api/arena_tournaments_api_spec.rb +160 -0
- data/spec/api/board_api_spec.rb +154 -0
- data/spec/api/bot_api_spec.rb +144 -0
- data/spec/api/challenges_api_spec.rb +123 -0
- data/spec/api/games_api_spec.rb +135 -0
- data/spec/api/messaging_api_spec.rb +48 -0
- data/spec/api/puzzles_api_spec.rb +70 -0
- data/spec/api/simuls_api_spec.rb +46 -0
- data/spec/api/studies_api_spec.rb +81 -0
- data/spec/api/teams_api_spec.rb +160 -0
- data/spec/api/tv_api_spec.rb +74 -0
- data/spec/api/users_api_spec.rb +157 -0
- data/spec/models/account200_response_spec.rb +42 -0
- data/spec/models/account_email200_response_spec.rb +36 -0
- data/spec/models/account_kid200_response_spec.rb +36 -0
- data/spec/models/api_stream_event200_response_spec.rb +32 -0
- data/spec/models/api_users_status200_response_inner_spec.rb +72 -0
- data/spec/models/arena_tournaments_spec.rb +48 -0
- data/spec/models/board_game_stream200_response_spec.rb +32 -0
- data/spec/models/board_game_takeback_accept_parameter_spec.rb +21 -0
- data/spec/models/challenge_declined_event_spec.rb +46 -0
- data/spec/models/challenge_event_spec.rb +46 -0
- data/spec/models/challenge_json_perf_spec.rb +42 -0
- data/spec/models/challenge_json_spec.rb +120 -0
- data/spec/models/challenge_json_time_control_one_of1_spec.rb +42 -0
- data/spec/models/challenge_json_time_control_one_of2_spec.rb +36 -0
- data/spec/models/challenge_json_time_control_one_of_spec.rb +66 -0
- data/spec/models/challenge_json_time_control_spec.rb +32 -0
- data/spec/models/challenge_user_spec.rb +72 -0
- data/spec/models/chat_line_event_spec.rb +62 -0
- data/spec/models/clock_spec.rb +54 -0
- data/spec/models/count_spec.rb +96 -0
- data/spec/models/error_spec.rb +36 -0
- data/spec/models/game_event_info_compat_spec.rb +42 -0
- data/spec/models/game_event_info_spec.rb +52 -0
- data/spec/models/game_event_player_spec.rb +66 -0
- data/spec/models/game_finish_event_spec.rb +46 -0
- data/spec/models/game_full_event_perf_spec.rb +36 -0
- data/spec/models/game_full_event_spec.rb +112 -0
- data/spec/models/game_json_analysis_inner_judgment_spec.rb +46 -0
- data/spec/models/game_json_analysis_inner_spec.rb +54 -0
- data/spec/models/game_json_clock_spec.rb +60 -0
- data/spec/models/game_json_players_spec.rb +42 -0
- data/spec/models/game_json_spec.rb +136 -0
- data/spec/models/game_start_event_spec.rb +46 -0
- data/spec/models/game_state_event_spec.rb +100 -0
- data/spec/models/game_status_spec.rb +30 -0
- data/spec/models/game_user_analysis_spec.rb +54 -0
- data/spec/models/game_user_spec.rb +78 -0
- data/spec/models/light_user_spec.rb +54 -0
- data/spec/models/light_user_title_spec.rb +32 -0
- data/spec/models/move_spec.rb +66 -0
- data/spec/models/not_found_spec.rb +36 -0
- data/spec/models/o_auth_error_spec.rb +42 -0
- data/spec/models/ok_spec.rb +36 -0
- data/spec/models/perf_spec.rb +60 -0
- data/spec/models/perf_type_spec.rb +30 -0
- data/spec/models/perfs_spec.rb +72 -0
- data/spec/models/play_time_spec.rb +42 -0
- data/spec/models/profile_spec.rb +66 -0
- data/spec/models/puzzle_round_json_spec.rb +54 -0
- data/spec/models/speed_spec.rb +30 -0
- data/spec/models/team_all200_response_spec.rb +72 -0
- data/spec/models/team_request_spec.rb +54 -0
- data/spec/models/team_request_with_user_spec.rb +42 -0
- data/spec/models/team_spec.rb +78 -0
- data/spec/models/title_spec.rb +30 -0
- data/spec/models/user_extended_spec.rb +162 -0
- data/spec/models/user_preferences_spec.rb +210 -0
- data/spec/models/user_spec.rb +108 -0
- data/spec/models/variant_key_spec.rb +30 -0
- data/spec/models/variant_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +446 -0
@@ -0,0 +1,678 @@
|
|
1
|
+
=begin
|
2
|
+
#Lishogi.org API reference
|
3
|
+
|
4
|
+
## Introduction Welcome to the reference for the Lishogi API! Lishogi is free/libre, open-source shogi server forked from lichess powered by volunteers and donations. Currently this page is a work in progress, certain information here might be wrong and incorrect! Expect it to be done during 2022. - Get help in the [Lishogi Discord channel](https://discord.gg/YFtpMGg3rR) - [Contribute to this documentation on Github](https://github.com/WandererXII/lishogi/blob/master/public/doc/lishogi-api.yaml) - Check out [Lishogi widgets to embed in your website](https://lishogi.org/developers) ## Endpoint All requests go to `https://lishogi.org` (unless otherwise specified). ## Rate limiting All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. ## Streaming with ND-JSON Some API endpoints stream their responses as [Newline Delimited JSON a.k.a. **nd-json**](http://ndjson.org/), with one JSON object per line. Here's a [JavaScript utility function (for lichess)](https://gist.github.com/ornicar/a097406810939cf7be1df8ea30e94f3e) to help reading NDJSON streamed responses.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: contact@lishogi.org
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.10.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Lishogi
|
16
|
+
class TeamsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get team Arena tournaments
|
23
|
+
# 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).
|
24
|
+
# @param team_id [String] ID of the team
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Integer] :max How many tournaments to download. (default to 100)
|
27
|
+
# @return [Array<Object>]
|
28
|
+
def api_team_arena(team_id, opts = {})
|
29
|
+
data, _status_code, _headers = api_team_arena_with_http_info(team_id, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get team Arena tournaments
|
34
|
+
# 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).
|
35
|
+
# @param team_id [String] ID of the team
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [Integer] :max How many tournaments to download. (default to 100)
|
38
|
+
# @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
|
39
|
+
def api_team_arena_with_http_info(team_id, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.api_team_arena ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'team_id' is set
|
44
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.api_team_arena"
|
46
|
+
end
|
47
|
+
if @api_client.config.client_side_validation && !opts[:'max'].nil? && opts[:'max'] < 1
|
48
|
+
fail ArgumentError, 'invalid value for "opts[:"max"]" when calling TeamsApi.api_team_arena, must be greater than or equal to 1.'
|
49
|
+
end
|
50
|
+
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/api/team/{teamId}/arena'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s))
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
query_params[:'max'] = opts[:'max'] if !opts[:'max'].nil?
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[:header_params] || {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = opts[:form_params] || {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = opts[:debug_body]
|
68
|
+
|
69
|
+
# return_type
|
70
|
+
return_type = opts[:debug_return_type] || 'Array<Object>'
|
71
|
+
|
72
|
+
# auth_names
|
73
|
+
auth_names = opts[:debug_auth_names] || []
|
74
|
+
|
75
|
+
new_options = opts.merge(
|
76
|
+
:operation => :"TeamsApi.api_team_arena",
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: TeamsApi#api_team_arena\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Get popular teams
|
93
|
+
# Paginator of the most popular teams.
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @option opts [Float] :page (default to 1)
|
96
|
+
# @return [TeamAll200Response]
|
97
|
+
def team_all(opts = {})
|
98
|
+
data, _status_code, _headers = team_all_with_http_info(opts)
|
99
|
+
data
|
100
|
+
end
|
101
|
+
|
102
|
+
# Get popular teams
|
103
|
+
# Paginator of the most popular teams.
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [Float] :page (default to 1)
|
106
|
+
# @return [Array<(TeamAll200Response, Integer, Hash)>] TeamAll200Response data, response status code and response headers
|
107
|
+
def team_all_with_http_info(opts = {})
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_all ...'
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = '/api/team/all'
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = opts[:query_params] || {}
|
116
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
122
|
+
|
123
|
+
# form parameters
|
124
|
+
form_params = opts[:form_params] || {}
|
125
|
+
|
126
|
+
# http body (model)
|
127
|
+
post_body = opts[:debug_body]
|
128
|
+
|
129
|
+
# return_type
|
130
|
+
return_type = opts[:debug_return_type] || 'TeamAll200Response'
|
131
|
+
|
132
|
+
# auth_names
|
133
|
+
auth_names = opts[:debug_auth_names] || []
|
134
|
+
|
135
|
+
new_options = opts.merge(
|
136
|
+
:operation => :"TeamsApi.team_all",
|
137
|
+
:header_params => header_params,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body,
|
141
|
+
:auth_names => auth_names,
|
142
|
+
:return_type => return_type
|
143
|
+
)
|
144
|
+
|
145
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
# Join a team
|
153
|
+
# 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`.
|
154
|
+
# @param team_id [String]
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [String] :message Optional request message, if the team requires one.
|
157
|
+
# @return [Ok]
|
158
|
+
def team_id_join(team_id, opts = {})
|
159
|
+
data, _status_code, _headers = team_id_join_with_http_info(team_id, opts)
|
160
|
+
data
|
161
|
+
end
|
162
|
+
|
163
|
+
# Join a team
|
164
|
+
# 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`.
|
165
|
+
# @param team_id [String]
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @option opts [String] :message Optional request message, if the team requires one.
|
168
|
+
# @return [Array<(Ok, Integer, Hash)>] Ok data, response status code and response headers
|
169
|
+
def team_id_join_with_http_info(team_id, opts = {})
|
170
|
+
if @api_client.config.debugging
|
171
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_id_join ...'
|
172
|
+
end
|
173
|
+
# verify the required parameter 'team_id' is set
|
174
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
175
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_join"
|
176
|
+
end
|
177
|
+
# resource path
|
178
|
+
local_var_path = '/team/{teamId}/join'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s))
|
179
|
+
|
180
|
+
# query parameters
|
181
|
+
query_params = opts[:query_params] || {}
|
182
|
+
|
183
|
+
# header parameters
|
184
|
+
header_params = opts[:header_params] || {}
|
185
|
+
# HTTP header 'Accept' (if needed)
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
187
|
+
# HTTP header 'Content-Type'
|
188
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
189
|
+
if !content_type.nil?
|
190
|
+
header_params['Content-Type'] = content_type
|
191
|
+
end
|
192
|
+
|
193
|
+
# form parameters
|
194
|
+
form_params = opts[:form_params] || {}
|
195
|
+
form_params['message'] = opts[:'message'] if !opts[:'message'].nil?
|
196
|
+
|
197
|
+
# http body (model)
|
198
|
+
post_body = opts[:debug_body]
|
199
|
+
|
200
|
+
# return_type
|
201
|
+
return_type = opts[:debug_return_type] || 'Ok'
|
202
|
+
|
203
|
+
# auth_names
|
204
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
205
|
+
|
206
|
+
new_options = opts.merge(
|
207
|
+
:operation => :"TeamsApi.team_id_join",
|
208
|
+
:header_params => header_params,
|
209
|
+
:query_params => query_params,
|
210
|
+
:form_params => form_params,
|
211
|
+
:body => post_body,
|
212
|
+
:auth_names => auth_names,
|
213
|
+
:return_type => return_type
|
214
|
+
)
|
215
|
+
|
216
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
217
|
+
if @api_client.config.debugging
|
218
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_id_join\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
|
+
end
|
220
|
+
return data, status_code, headers
|
221
|
+
end
|
222
|
+
|
223
|
+
# Kick a user from your team
|
224
|
+
# Kick a member out of one of your teams. - <https://lishogi.org/team>
|
225
|
+
# @param team_id [String]
|
226
|
+
# @param user_id [String]
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @return [Ok]
|
229
|
+
def team_id_kick_user_id(team_id, user_id, opts = {})
|
230
|
+
data, _status_code, _headers = team_id_kick_user_id_with_http_info(team_id, user_id, opts)
|
231
|
+
data
|
232
|
+
end
|
233
|
+
|
234
|
+
# Kick a user from your team
|
235
|
+
# Kick a member out of one of your teams. - <https://lishogi.org/team>
|
236
|
+
# @param team_id [String]
|
237
|
+
# @param user_id [String]
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [Array<(Ok, Integer, Hash)>] Ok data, response status code and response headers
|
240
|
+
def team_id_kick_user_id_with_http_info(team_id, user_id, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_id_kick_user_id ...'
|
243
|
+
end
|
244
|
+
# verify the required parameter 'team_id' is set
|
245
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
246
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_kick_user_id"
|
247
|
+
end
|
248
|
+
# verify the required parameter 'user_id' is set
|
249
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
250
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling TeamsApi.team_id_kick_user_id"
|
251
|
+
end
|
252
|
+
# resource path
|
253
|
+
local_var_path = '/team/{teamId}/kick/{userId}'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
|
254
|
+
|
255
|
+
# query parameters
|
256
|
+
query_params = opts[:query_params] || {}
|
257
|
+
|
258
|
+
# header parameters
|
259
|
+
header_params = opts[:header_params] || {}
|
260
|
+
# HTTP header 'Accept' (if needed)
|
261
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
262
|
+
|
263
|
+
# form parameters
|
264
|
+
form_params = opts[:form_params] || {}
|
265
|
+
|
266
|
+
# http body (model)
|
267
|
+
post_body = opts[:debug_body]
|
268
|
+
|
269
|
+
# return_type
|
270
|
+
return_type = opts[:debug_return_type] || 'Ok'
|
271
|
+
|
272
|
+
# auth_names
|
273
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
274
|
+
|
275
|
+
new_options = opts.merge(
|
276
|
+
:operation => :"TeamsApi.team_id_kick_user_id",
|
277
|
+
:header_params => header_params,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body,
|
281
|
+
:auth_names => auth_names,
|
282
|
+
:return_type => return_type
|
283
|
+
)
|
284
|
+
|
285
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
286
|
+
if @api_client.config.debugging
|
287
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_id_kick_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
288
|
+
end
|
289
|
+
return data, status_code, headers
|
290
|
+
end
|
291
|
+
|
292
|
+
# Message all members
|
293
|
+
# Send a private message to all members of a team. You must own the team.
|
294
|
+
# @param team_id [String]
|
295
|
+
# @param [Hash] opts the optional parameters
|
296
|
+
# @option opts [String] :message The message to send to all your team members.
|
297
|
+
# @return [Ok]
|
298
|
+
def team_id_pm_all(team_id, opts = {})
|
299
|
+
data, _status_code, _headers = team_id_pm_all_with_http_info(team_id, opts)
|
300
|
+
data
|
301
|
+
end
|
302
|
+
|
303
|
+
# Message all members
|
304
|
+
# Send a private message to all members of a team. You must own the team.
|
305
|
+
# @param team_id [String]
|
306
|
+
# @param [Hash] opts the optional parameters
|
307
|
+
# @option opts [String] :message The message to send to all your team members.
|
308
|
+
# @return [Array<(Ok, Integer, Hash)>] Ok data, response status code and response headers
|
309
|
+
def team_id_pm_all_with_http_info(team_id, opts = {})
|
310
|
+
if @api_client.config.debugging
|
311
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_id_pm_all ...'
|
312
|
+
end
|
313
|
+
# verify the required parameter 'team_id' is set
|
314
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
315
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_pm_all"
|
316
|
+
end
|
317
|
+
# resource path
|
318
|
+
local_var_path = '/team/{teamId}/pm-all'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s))
|
319
|
+
|
320
|
+
# query parameters
|
321
|
+
query_params = opts[:query_params] || {}
|
322
|
+
|
323
|
+
# header parameters
|
324
|
+
header_params = opts[:header_params] || {}
|
325
|
+
# HTTP header 'Accept' (if needed)
|
326
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
327
|
+
# HTTP header 'Content-Type'
|
328
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
329
|
+
if !content_type.nil?
|
330
|
+
header_params['Content-Type'] = content_type
|
331
|
+
end
|
332
|
+
|
333
|
+
# form parameters
|
334
|
+
form_params = opts[:form_params] || {}
|
335
|
+
form_params['message'] = opts[:'message'] if !opts[:'message'].nil?
|
336
|
+
|
337
|
+
# http body (model)
|
338
|
+
post_body = opts[:debug_body]
|
339
|
+
|
340
|
+
# return_type
|
341
|
+
return_type = opts[:debug_return_type] || 'Ok'
|
342
|
+
|
343
|
+
# auth_names
|
344
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
345
|
+
|
346
|
+
new_options = opts.merge(
|
347
|
+
:operation => :"TeamsApi.team_id_pm_all",
|
348
|
+
:header_params => header_params,
|
349
|
+
:query_params => query_params,
|
350
|
+
:form_params => form_params,
|
351
|
+
:body => post_body,
|
352
|
+
:auth_names => auth_names,
|
353
|
+
:return_type => return_type
|
354
|
+
)
|
355
|
+
|
356
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
357
|
+
if @api_client.config.debugging
|
358
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_id_pm_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
359
|
+
end
|
360
|
+
return data, status_code, headers
|
361
|
+
end
|
362
|
+
|
363
|
+
# Leave a team
|
364
|
+
# Leave a team. - <https://lishogi.org/team>
|
365
|
+
# @param team_id [String]
|
366
|
+
# @param [Hash] opts the optional parameters
|
367
|
+
# @return [Ok]
|
368
|
+
def team_id_quit(team_id, opts = {})
|
369
|
+
data, _status_code, _headers = team_id_quit_with_http_info(team_id, opts)
|
370
|
+
data
|
371
|
+
end
|
372
|
+
|
373
|
+
# Leave a team
|
374
|
+
# Leave a team. - <https://lishogi.org/team>
|
375
|
+
# @param team_id [String]
|
376
|
+
# @param [Hash] opts the optional parameters
|
377
|
+
# @return [Array<(Ok, Integer, Hash)>] Ok data, response status code and response headers
|
378
|
+
def team_id_quit_with_http_info(team_id, opts = {})
|
379
|
+
if @api_client.config.debugging
|
380
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_id_quit ...'
|
381
|
+
end
|
382
|
+
# verify the required parameter 'team_id' is set
|
383
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
384
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_quit"
|
385
|
+
end
|
386
|
+
# resource path
|
387
|
+
local_var_path = '/team/{teamId}/quit'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s))
|
388
|
+
|
389
|
+
# query parameters
|
390
|
+
query_params = opts[:query_params] || {}
|
391
|
+
|
392
|
+
# header parameters
|
393
|
+
header_params = opts[:header_params] || {}
|
394
|
+
# HTTP header 'Accept' (if needed)
|
395
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
396
|
+
|
397
|
+
# form parameters
|
398
|
+
form_params = opts[:form_params] || {}
|
399
|
+
|
400
|
+
# http body (model)
|
401
|
+
post_body = opts[:debug_body]
|
402
|
+
|
403
|
+
# return_type
|
404
|
+
return_type = opts[:debug_return_type] || 'Ok'
|
405
|
+
|
406
|
+
# auth_names
|
407
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
408
|
+
|
409
|
+
new_options = opts.merge(
|
410
|
+
:operation => :"TeamsApi.team_id_quit",
|
411
|
+
:header_params => header_params,
|
412
|
+
:query_params => query_params,
|
413
|
+
:form_params => form_params,
|
414
|
+
:body => post_body,
|
415
|
+
:auth_names => auth_names,
|
416
|
+
:return_type => return_type
|
417
|
+
)
|
418
|
+
|
419
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
420
|
+
if @api_client.config.debugging
|
421
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_id_quit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
422
|
+
end
|
423
|
+
return data, status_code, headers
|
424
|
+
end
|
425
|
+
|
426
|
+
# Get members of a team
|
427
|
+
# 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).
|
428
|
+
# @param team_id [String]
|
429
|
+
# @param [Hash] opts the optional parameters
|
430
|
+
# @return [UserExtended]
|
431
|
+
def team_id_users(team_id, opts = {})
|
432
|
+
data, _status_code, _headers = team_id_users_with_http_info(team_id, opts)
|
433
|
+
data
|
434
|
+
end
|
435
|
+
|
436
|
+
# Get members of a team
|
437
|
+
# 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).
|
438
|
+
# @param team_id [String]
|
439
|
+
# @param [Hash] opts the optional parameters
|
440
|
+
# @return [Array<(UserExtended, Integer, Hash)>] UserExtended data, response status code and response headers
|
441
|
+
def team_id_users_with_http_info(team_id, opts = {})
|
442
|
+
if @api_client.config.debugging
|
443
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_id_users ...'
|
444
|
+
end
|
445
|
+
# verify the required parameter 'team_id' is set
|
446
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
447
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_id_users"
|
448
|
+
end
|
449
|
+
# resource path
|
450
|
+
local_var_path = '/api/team/{teamId}/users'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s))
|
451
|
+
|
452
|
+
# query parameters
|
453
|
+
query_params = opts[:query_params] || {}
|
454
|
+
|
455
|
+
# header parameters
|
456
|
+
header_params = opts[:header_params] || {}
|
457
|
+
# HTTP header 'Accept' (if needed)
|
458
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/x-ndjson']) unless header_params['Accept']
|
459
|
+
|
460
|
+
# form parameters
|
461
|
+
form_params = opts[:form_params] || {}
|
462
|
+
|
463
|
+
# http body (model)
|
464
|
+
post_body = opts[:debug_body]
|
465
|
+
|
466
|
+
# return_type
|
467
|
+
return_type = opts[:debug_return_type] || 'UserExtended'
|
468
|
+
|
469
|
+
# auth_names
|
470
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
471
|
+
|
472
|
+
new_options = opts.merge(
|
473
|
+
:operation => :"TeamsApi.team_id_users",
|
474
|
+
:header_params => header_params,
|
475
|
+
:query_params => query_params,
|
476
|
+
:form_params => form_params,
|
477
|
+
:body => post_body,
|
478
|
+
:auth_names => auth_names,
|
479
|
+
:return_type => return_type
|
480
|
+
)
|
481
|
+
|
482
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
483
|
+
if @api_client.config.debugging
|
484
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_id_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
485
|
+
end
|
486
|
+
return data, status_code, headers
|
487
|
+
end
|
488
|
+
|
489
|
+
# Teams of a player
|
490
|
+
# All the teams a player is a member of.
|
491
|
+
# @param username [String]
|
492
|
+
# @param [Hash] opts the optional parameters
|
493
|
+
# @return [Array<Team>]
|
494
|
+
def team_of_username(username, opts = {})
|
495
|
+
data, _status_code, _headers = team_of_username_with_http_info(username, opts)
|
496
|
+
data
|
497
|
+
end
|
498
|
+
|
499
|
+
# Teams of a player
|
500
|
+
# All the teams a player is a member of.
|
501
|
+
# @param username [String]
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @return [Array<(Array<Team>, Integer, Hash)>] Array<Team> data, response status code and response headers
|
504
|
+
def team_of_username_with_http_info(username, opts = {})
|
505
|
+
if @api_client.config.debugging
|
506
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_of_username ...'
|
507
|
+
end
|
508
|
+
# verify the required parameter 'username' is set
|
509
|
+
if @api_client.config.client_side_validation && username.nil?
|
510
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling TeamsApi.team_of_username"
|
511
|
+
end
|
512
|
+
# resource path
|
513
|
+
local_var_path = '/api/team/of/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
514
|
+
|
515
|
+
# query parameters
|
516
|
+
query_params = opts[:query_params] || {}
|
517
|
+
|
518
|
+
# header parameters
|
519
|
+
header_params = opts[:header_params] || {}
|
520
|
+
# HTTP header 'Accept' (if needed)
|
521
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
522
|
+
|
523
|
+
# form parameters
|
524
|
+
form_params = opts[:form_params] || {}
|
525
|
+
|
526
|
+
# http body (model)
|
527
|
+
post_body = opts[:debug_body]
|
528
|
+
|
529
|
+
# return_type
|
530
|
+
return_type = opts[:debug_return_type] || 'Array<Team>'
|
531
|
+
|
532
|
+
# auth_names
|
533
|
+
auth_names = opts[:debug_auth_names] || []
|
534
|
+
|
535
|
+
new_options = opts.merge(
|
536
|
+
:operation => :"TeamsApi.team_of_username",
|
537
|
+
:header_params => header_params,
|
538
|
+
:query_params => query_params,
|
539
|
+
:form_params => form_params,
|
540
|
+
:body => post_body,
|
541
|
+
:auth_names => auth_names,
|
542
|
+
:return_type => return_type
|
543
|
+
)
|
544
|
+
|
545
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
546
|
+
if @api_client.config.debugging
|
547
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_of_username\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
548
|
+
end
|
549
|
+
return data, status_code, headers
|
550
|
+
end
|
551
|
+
|
552
|
+
# Search teams
|
553
|
+
# Paginator of team search results for a keyword.
|
554
|
+
# @param [Hash] opts the optional parameters
|
555
|
+
# @option opts [String] :text
|
556
|
+
# @option opts [Float] :page (default to 1)
|
557
|
+
# @return [Array<Team>]
|
558
|
+
def team_search(opts = {})
|
559
|
+
data, _status_code, _headers = team_search_with_http_info(opts)
|
560
|
+
data
|
561
|
+
end
|
562
|
+
|
563
|
+
# Search teams
|
564
|
+
# Paginator of team search results for a keyword.
|
565
|
+
# @param [Hash] opts the optional parameters
|
566
|
+
# @option opts [String] :text
|
567
|
+
# @option opts [Float] :page (default to 1)
|
568
|
+
# @return [Array<(Array<Team>, Integer, Hash)>] Array<Team> data, response status code and response headers
|
569
|
+
def team_search_with_http_info(opts = {})
|
570
|
+
if @api_client.config.debugging
|
571
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_search ...'
|
572
|
+
end
|
573
|
+
# resource path
|
574
|
+
local_var_path = '/api/team/search'
|
575
|
+
|
576
|
+
# query parameters
|
577
|
+
query_params = opts[:query_params] || {}
|
578
|
+
query_params[:'text'] = opts[:'text'] if !opts[:'text'].nil?
|
579
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
580
|
+
|
581
|
+
# header parameters
|
582
|
+
header_params = opts[:header_params] || {}
|
583
|
+
# HTTP header 'Accept' (if needed)
|
584
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
585
|
+
|
586
|
+
# form parameters
|
587
|
+
form_params = opts[:form_params] || {}
|
588
|
+
|
589
|
+
# http body (model)
|
590
|
+
post_body = opts[:debug_body]
|
591
|
+
|
592
|
+
# return_type
|
593
|
+
return_type = opts[:debug_return_type] || 'Array<Team>'
|
594
|
+
|
595
|
+
# auth_names
|
596
|
+
auth_names = opts[:debug_auth_names] || []
|
597
|
+
|
598
|
+
new_options = opts.merge(
|
599
|
+
:operation => :"TeamsApi.team_search",
|
600
|
+
:header_params => header_params,
|
601
|
+
:query_params => query_params,
|
602
|
+
:form_params => form_params,
|
603
|
+
:body => post_body,
|
604
|
+
:auth_names => auth_names,
|
605
|
+
:return_type => return_type
|
606
|
+
)
|
607
|
+
|
608
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
609
|
+
if @api_client.config.debugging
|
610
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
611
|
+
end
|
612
|
+
return data, status_code, headers
|
613
|
+
end
|
614
|
+
|
615
|
+
# Get a single team
|
616
|
+
# Infos about a team
|
617
|
+
# @param team_id [String]
|
618
|
+
# @param [Hash] opts the optional parameters
|
619
|
+
# @return [Team]
|
620
|
+
def team_show(team_id, opts = {})
|
621
|
+
data, _status_code, _headers = team_show_with_http_info(team_id, opts)
|
622
|
+
data
|
623
|
+
end
|
624
|
+
|
625
|
+
# Get a single team
|
626
|
+
# Infos about a team
|
627
|
+
# @param team_id [String]
|
628
|
+
# @param [Hash] opts the optional parameters
|
629
|
+
# @return [Array<(Team, Integer, Hash)>] Team data, response status code and response headers
|
630
|
+
def team_show_with_http_info(team_id, opts = {})
|
631
|
+
if @api_client.config.debugging
|
632
|
+
@api_client.config.logger.debug 'Calling API: TeamsApi.team_show ...'
|
633
|
+
end
|
634
|
+
# verify the required parameter 'team_id' is set
|
635
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
636
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.team_show"
|
637
|
+
end
|
638
|
+
# resource path
|
639
|
+
local_var_path = '/api/team/{teamId}'.sub('{' + 'teamId' + '}', CGI.escape(team_id.to_s))
|
640
|
+
|
641
|
+
# query parameters
|
642
|
+
query_params = opts[:query_params] || {}
|
643
|
+
|
644
|
+
# header parameters
|
645
|
+
header_params = opts[:header_params] || {}
|
646
|
+
# HTTP header 'Accept' (if needed)
|
647
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
648
|
+
|
649
|
+
# form parameters
|
650
|
+
form_params = opts[:form_params] || {}
|
651
|
+
|
652
|
+
# http body (model)
|
653
|
+
post_body = opts[:debug_body]
|
654
|
+
|
655
|
+
# return_type
|
656
|
+
return_type = opts[:debug_return_type] || 'Team'
|
657
|
+
|
658
|
+
# auth_names
|
659
|
+
auth_names = opts[:debug_auth_names] || []
|
660
|
+
|
661
|
+
new_options = opts.merge(
|
662
|
+
:operation => :"TeamsApi.team_show",
|
663
|
+
:header_params => header_params,
|
664
|
+
:query_params => query_params,
|
665
|
+
:form_params => form_params,
|
666
|
+
:body => post_body,
|
667
|
+
:auth_names => auth_names,
|
668
|
+
:return_type => return_type
|
669
|
+
)
|
670
|
+
|
671
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
672
|
+
if @api_client.config.debugging
|
673
|
+
@api_client.config.logger.debug "API called: TeamsApi#team_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
674
|
+
end
|
675
|
+
return data, status_code, headers
|
676
|
+
end
|
677
|
+
end
|
678
|
+
end
|