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
data/docs/AccountApi.md
ADDED
@@ -0,0 +1,345 @@
|
|
1
|
+
# Lishogi::AccountApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://lishogi.org*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**account**](AccountApi.md#account) | **GET** /api/account/preferences | Get my preferences |
|
8
|
+
| [**account_email**](AccountApi.md#account_email) | **GET** /api/account/email | Get my email address |
|
9
|
+
| [**account_kid**](AccountApi.md#account_kid) | **GET** /api/account/kid | Get my kid mode status |
|
10
|
+
| [**account_kid_post**](AccountApi.md#account_kid_post) | **POST** /api/account/kid | Set my kid mode status |
|
11
|
+
| [**account_me**](AccountApi.md#account_me) | **GET** /api/account | Get my profile |
|
12
|
+
|
13
|
+
|
14
|
+
## account
|
15
|
+
|
16
|
+
> <Account200Response> account
|
17
|
+
|
18
|
+
Get my preferences
|
19
|
+
|
20
|
+
Read the preferences of the logged in user. - <https://lishogi.org/account/preferences/game-display> - <https://github.com/WandererXII/lishogi/blob/master/modules/pref/src/main/Pref.scala>
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'lishogi'
|
27
|
+
# setup authorization
|
28
|
+
Lishogi.configure do |config|
|
29
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
30
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = Lishogi::AccountApi.new
|
34
|
+
|
35
|
+
begin
|
36
|
+
# Get my preferences
|
37
|
+
result = api_instance.account
|
38
|
+
p result
|
39
|
+
rescue Lishogi::ApiError => e
|
40
|
+
puts "Error when calling AccountApi->account: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
#### Using the account_with_http_info variant
|
45
|
+
|
46
|
+
This returns an Array which contains the response data, status code and headers.
|
47
|
+
|
48
|
+
> <Array(<Account200Response>, Integer, Hash)> account_with_http_info
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
begin
|
52
|
+
# Get my preferences
|
53
|
+
data, status_code, headers = api_instance.account_with_http_info
|
54
|
+
p status_code # => 2xx
|
55
|
+
p headers # => { ... }
|
56
|
+
p data # => <Account200Response>
|
57
|
+
rescue Lishogi::ApiError => e
|
58
|
+
puts "Error when calling AccountApi->account_with_http_info: #{e}"
|
59
|
+
end
|
60
|
+
```
|
61
|
+
|
62
|
+
### Parameters
|
63
|
+
|
64
|
+
This endpoint does not need any parameter.
|
65
|
+
|
66
|
+
### Return type
|
67
|
+
|
68
|
+
[**Account200Response**](Account200Response.md)
|
69
|
+
|
70
|
+
### Authorization
|
71
|
+
|
72
|
+
[OAuth2](../README.md#OAuth2)
|
73
|
+
|
74
|
+
### HTTP request headers
|
75
|
+
|
76
|
+
- **Content-Type**: Not defined
|
77
|
+
- **Accept**: application/json
|
78
|
+
|
79
|
+
|
80
|
+
## account_email
|
81
|
+
|
82
|
+
> <AccountEmail200Response> account_email
|
83
|
+
|
84
|
+
Get my email address
|
85
|
+
|
86
|
+
Read the email address of the logged in user.
|
87
|
+
|
88
|
+
### Examples
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
require 'time'
|
92
|
+
require 'lishogi'
|
93
|
+
# setup authorization
|
94
|
+
Lishogi.configure do |config|
|
95
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
96
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
97
|
+
end
|
98
|
+
|
99
|
+
api_instance = Lishogi::AccountApi.new
|
100
|
+
|
101
|
+
begin
|
102
|
+
# Get my email address
|
103
|
+
result = api_instance.account_email
|
104
|
+
p result
|
105
|
+
rescue Lishogi::ApiError => e
|
106
|
+
puts "Error when calling AccountApi->account_email: #{e}"
|
107
|
+
end
|
108
|
+
```
|
109
|
+
|
110
|
+
#### Using the account_email_with_http_info variant
|
111
|
+
|
112
|
+
This returns an Array which contains the response data, status code and headers.
|
113
|
+
|
114
|
+
> <Array(<AccountEmail200Response>, Integer, Hash)> account_email_with_http_info
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
begin
|
118
|
+
# Get my email address
|
119
|
+
data, status_code, headers = api_instance.account_email_with_http_info
|
120
|
+
p status_code # => 2xx
|
121
|
+
p headers # => { ... }
|
122
|
+
p data # => <AccountEmail200Response>
|
123
|
+
rescue Lishogi::ApiError => e
|
124
|
+
puts "Error when calling AccountApi->account_email_with_http_info: #{e}"
|
125
|
+
end
|
126
|
+
```
|
127
|
+
|
128
|
+
### Parameters
|
129
|
+
|
130
|
+
This endpoint does not need any parameter.
|
131
|
+
|
132
|
+
### Return type
|
133
|
+
|
134
|
+
[**AccountEmail200Response**](AccountEmail200Response.md)
|
135
|
+
|
136
|
+
### Authorization
|
137
|
+
|
138
|
+
[OAuth2](../README.md#OAuth2)
|
139
|
+
|
140
|
+
### HTTP request headers
|
141
|
+
|
142
|
+
- **Content-Type**: Not defined
|
143
|
+
- **Accept**: application/json
|
144
|
+
|
145
|
+
|
146
|
+
## account_kid
|
147
|
+
|
148
|
+
> <AccountKid200Response> account_kid
|
149
|
+
|
150
|
+
Get my kid mode status
|
151
|
+
|
152
|
+
Read the kid mode status of the logged in user. - <https://lishogi.org/account/kid>
|
153
|
+
|
154
|
+
### Examples
|
155
|
+
|
156
|
+
```ruby
|
157
|
+
require 'time'
|
158
|
+
require 'lishogi'
|
159
|
+
# setup authorization
|
160
|
+
Lishogi.configure do |config|
|
161
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
162
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
163
|
+
end
|
164
|
+
|
165
|
+
api_instance = Lishogi::AccountApi.new
|
166
|
+
|
167
|
+
begin
|
168
|
+
# Get my kid mode status
|
169
|
+
result = api_instance.account_kid
|
170
|
+
p result
|
171
|
+
rescue Lishogi::ApiError => e
|
172
|
+
puts "Error when calling AccountApi->account_kid: #{e}"
|
173
|
+
end
|
174
|
+
```
|
175
|
+
|
176
|
+
#### Using the account_kid_with_http_info variant
|
177
|
+
|
178
|
+
This returns an Array which contains the response data, status code and headers.
|
179
|
+
|
180
|
+
> <Array(<AccountKid200Response>, Integer, Hash)> account_kid_with_http_info
|
181
|
+
|
182
|
+
```ruby
|
183
|
+
begin
|
184
|
+
# Get my kid mode status
|
185
|
+
data, status_code, headers = api_instance.account_kid_with_http_info
|
186
|
+
p status_code # => 2xx
|
187
|
+
p headers # => { ... }
|
188
|
+
p data # => <AccountKid200Response>
|
189
|
+
rescue Lishogi::ApiError => e
|
190
|
+
puts "Error when calling AccountApi->account_kid_with_http_info: #{e}"
|
191
|
+
end
|
192
|
+
```
|
193
|
+
|
194
|
+
### Parameters
|
195
|
+
|
196
|
+
This endpoint does not need any parameter.
|
197
|
+
|
198
|
+
### Return type
|
199
|
+
|
200
|
+
[**AccountKid200Response**](AccountKid200Response.md)
|
201
|
+
|
202
|
+
### Authorization
|
203
|
+
|
204
|
+
[OAuth2](../README.md#OAuth2)
|
205
|
+
|
206
|
+
### HTTP request headers
|
207
|
+
|
208
|
+
- **Content-Type**: Not defined
|
209
|
+
- **Accept**: application/json
|
210
|
+
|
211
|
+
|
212
|
+
## account_kid_post
|
213
|
+
|
214
|
+
> <Ok> account_kid_post(v)
|
215
|
+
|
216
|
+
Set my kid mode status
|
217
|
+
|
218
|
+
Set the kid mode status of the logged in user. - <https://lishogi.org/account/kid>
|
219
|
+
|
220
|
+
### Examples
|
221
|
+
|
222
|
+
```ruby
|
223
|
+
require 'time'
|
224
|
+
require 'lishogi'
|
225
|
+
# setup authorization
|
226
|
+
Lishogi.configure do |config|
|
227
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
228
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
229
|
+
end
|
230
|
+
|
231
|
+
api_instance = Lishogi::AccountApi.new
|
232
|
+
v = true # Boolean | Kid mode status
|
233
|
+
|
234
|
+
begin
|
235
|
+
# Set my kid mode status
|
236
|
+
result = api_instance.account_kid_post(v)
|
237
|
+
p result
|
238
|
+
rescue Lishogi::ApiError => e
|
239
|
+
puts "Error when calling AccountApi->account_kid_post: #{e}"
|
240
|
+
end
|
241
|
+
```
|
242
|
+
|
243
|
+
#### Using the account_kid_post_with_http_info variant
|
244
|
+
|
245
|
+
This returns an Array which contains the response data, status code and headers.
|
246
|
+
|
247
|
+
> <Array(<Ok>, Integer, Hash)> account_kid_post_with_http_info(v)
|
248
|
+
|
249
|
+
```ruby
|
250
|
+
begin
|
251
|
+
# Set my kid mode status
|
252
|
+
data, status_code, headers = api_instance.account_kid_post_with_http_info(v)
|
253
|
+
p status_code # => 2xx
|
254
|
+
p headers # => { ... }
|
255
|
+
p data # => <Ok>
|
256
|
+
rescue Lishogi::ApiError => e
|
257
|
+
puts "Error when calling AccountApi->account_kid_post_with_http_info: #{e}"
|
258
|
+
end
|
259
|
+
```
|
260
|
+
|
261
|
+
### Parameters
|
262
|
+
|
263
|
+
| Name | Type | Description | Notes |
|
264
|
+
| ---- | ---- | ----------- | ----- |
|
265
|
+
| **v** | **Boolean** | Kid mode status | |
|
266
|
+
|
267
|
+
### Return type
|
268
|
+
|
269
|
+
[**Ok**](Ok.md)
|
270
|
+
|
271
|
+
### Authorization
|
272
|
+
|
273
|
+
[OAuth2](../README.md#OAuth2)
|
274
|
+
|
275
|
+
### HTTP request headers
|
276
|
+
|
277
|
+
- **Content-Type**: Not defined
|
278
|
+
- **Accept**: application/json
|
279
|
+
|
280
|
+
|
281
|
+
## account_me
|
282
|
+
|
283
|
+
> <UserExtended> account_me
|
284
|
+
|
285
|
+
Get my profile
|
286
|
+
|
287
|
+
Public information about the logged in user.
|
288
|
+
|
289
|
+
### Examples
|
290
|
+
|
291
|
+
```ruby
|
292
|
+
require 'time'
|
293
|
+
require 'lishogi'
|
294
|
+
# setup authorization
|
295
|
+
Lishogi.configure do |config|
|
296
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
297
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
298
|
+
end
|
299
|
+
|
300
|
+
api_instance = Lishogi::AccountApi.new
|
301
|
+
|
302
|
+
begin
|
303
|
+
# Get my profile
|
304
|
+
result = api_instance.account_me
|
305
|
+
p result
|
306
|
+
rescue Lishogi::ApiError => e
|
307
|
+
puts "Error when calling AccountApi->account_me: #{e}"
|
308
|
+
end
|
309
|
+
```
|
310
|
+
|
311
|
+
#### Using the account_me_with_http_info variant
|
312
|
+
|
313
|
+
This returns an Array which contains the response data, status code and headers.
|
314
|
+
|
315
|
+
> <Array(<UserExtended>, Integer, Hash)> account_me_with_http_info
|
316
|
+
|
317
|
+
```ruby
|
318
|
+
begin
|
319
|
+
# Get my profile
|
320
|
+
data, status_code, headers = api_instance.account_me_with_http_info
|
321
|
+
p status_code # => 2xx
|
322
|
+
p headers # => { ... }
|
323
|
+
p data # => <UserExtended>
|
324
|
+
rescue Lishogi::ApiError => e
|
325
|
+
puts "Error when calling AccountApi->account_me_with_http_info: #{e}"
|
326
|
+
end
|
327
|
+
```
|
328
|
+
|
329
|
+
### Parameters
|
330
|
+
|
331
|
+
This endpoint does not need any parameter.
|
332
|
+
|
333
|
+
### Return type
|
334
|
+
|
335
|
+
[**UserExtended**](UserExtended.md)
|
336
|
+
|
337
|
+
### Authorization
|
338
|
+
|
339
|
+
[OAuth2](../README.md#OAuth2)
|
340
|
+
|
341
|
+
### HTTP request headers
|
342
|
+
|
343
|
+
- **Content-Type**: Not defined
|
344
|
+
- **Accept**: application/json
|
345
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Lishogi::AccountEmail200Response
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **email** | **String** | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'lishogi'
|
13
|
+
|
14
|
+
instance = Lishogi::AccountEmail200Response.new(
|
15
|
+
email: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Lishogi::AccountKid200Response
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **kid** | **Boolean** | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'lishogi'
|
13
|
+
|
14
|
+
instance = Lishogi::AccountKid200Response.new(
|
15
|
+
kid: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/AnalysisApi.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# Lishogi::AnalysisApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://lishogi.org*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**api_cloud_eval**](AnalysisApi.md#api_cloud_eval) | **GET** /api/cloud-eval | Get cloud evaluation of a position. |
|
8
|
+
|
9
|
+
|
10
|
+
## api_cloud_eval
|
11
|
+
|
12
|
+
> api_cloud_eval(sfen, opts)
|
13
|
+
|
14
|
+
Get cloud evaluation of a position.
|
15
|
+
|
16
|
+
Get the cached evaluation of a position, if available. Opening positions have more chances of being available. There are about 500 thousand positions in the database. Up to 5 variations may be available. Variants are supported.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'lishogi'
|
23
|
+
|
24
|
+
api_instance = Lishogi::AnalysisApi.new
|
25
|
+
sfen = 'rnbqkbnr/ppp1pppp/8/3pP3/8/8/PPPP1PPP/RNBQKBNR b KQkq - 0 2' # String | SFEN of the position
|
26
|
+
opts = {
|
27
|
+
multi_pv: 8.14, # Float | Number of variations
|
28
|
+
variant: Lishogi::VariantKey::STANDARD # VariantKey | Variant
|
29
|
+
}
|
30
|
+
|
31
|
+
begin
|
32
|
+
# Get cloud evaluation of a position.
|
33
|
+
api_instance.api_cloud_eval(sfen, opts)
|
34
|
+
rescue Lishogi::ApiError => e
|
35
|
+
puts "Error when calling AnalysisApi->api_cloud_eval: #{e}"
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
#### Using the api_cloud_eval_with_http_info variant
|
40
|
+
|
41
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
42
|
+
|
43
|
+
> <Array(nil, Integer, Hash)> api_cloud_eval_with_http_info(sfen, opts)
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
begin
|
47
|
+
# Get cloud evaluation of a position.
|
48
|
+
data, status_code, headers = api_instance.api_cloud_eval_with_http_info(sfen, opts)
|
49
|
+
p status_code # => 2xx
|
50
|
+
p headers # => { ... }
|
51
|
+
p data # => nil
|
52
|
+
rescue Lishogi::ApiError => e
|
53
|
+
puts "Error when calling AnalysisApi->api_cloud_eval_with_http_info: #{e}"
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
### Parameters
|
58
|
+
|
59
|
+
| Name | Type | Description | Notes |
|
60
|
+
| ---- | ---- | ----------- | ----- |
|
61
|
+
| **sfen** | **String** | SFEN of the position | |
|
62
|
+
| **multi_pv** | **Float** | Number of variations | [optional][default to 1] |
|
63
|
+
| **variant** | [**VariantKey**](.md) | Variant | [optional][default to 'standard'] |
|
64
|
+
|
65
|
+
### Return type
|
66
|
+
|
67
|
+
nil (empty response body)
|
68
|
+
|
69
|
+
### Authorization
|
70
|
+
|
71
|
+
No authorization required
|
72
|
+
|
73
|
+
### HTTP request headers
|
74
|
+
|
75
|
+
- **Content-Type**: Not defined
|
76
|
+
- **Accept**: application/json
|
77
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Lishogi::ApiStreamEvent200Response
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'lishogi'
|
13
|
+
|
14
|
+
Lishogi::ApiStreamEvent200Response.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'ChallengeDeclinedEvent',
|
18
|
+
# :'ChallengeEvent',
|
19
|
+
# :'GameFinishEvent',
|
20
|
+
# :'GameStartEvent'
|
21
|
+
# ]
|
22
|
+
```
|
23
|
+
|
24
|
+
### build
|
25
|
+
|
26
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
27
|
+
|
28
|
+
#### Example
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'lishogi'
|
32
|
+
|
33
|
+
Lishogi::ApiStreamEvent200Response.build(data)
|
34
|
+
# => #<ChallengeDeclinedEvent:0x00007fdd4aab02a0>
|
35
|
+
|
36
|
+
Lishogi::ApiStreamEvent200Response.build(data_that_doesnt_match)
|
37
|
+
# => nil
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Parameters
|
41
|
+
|
42
|
+
| Name | Type | Description |
|
43
|
+
| ---- | ---- | ----------- |
|
44
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
45
|
+
|
46
|
+
#### Return type
|
47
|
+
|
48
|
+
- `ChallengeDeclinedEvent`
|
49
|
+
- `ChallengeEvent`
|
50
|
+
- `GameFinishEvent`
|
51
|
+
- `GameStartEvent`
|
52
|
+
- `nil` (if no type matches)
|
53
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Lishogi::ApiUsersStatus200ResponseInner
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | [optional] |
|
8
|
+
| **name** | **String** | | [optional] |
|
9
|
+
| **title** | **String** | | [optional] |
|
10
|
+
| **online** | **Boolean** | | [optional] |
|
11
|
+
| **playing** | **Boolean** | | [optional] |
|
12
|
+
| **streaming** | **Boolean** | | [optional] |
|
13
|
+
| **patron** | **Boolean** | | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'lishogi'
|
19
|
+
|
20
|
+
instance = Lishogi::ApiUsersStatus200ResponseInner.new(
|
21
|
+
id: null,
|
22
|
+
name: null,
|
23
|
+
title: null,
|
24
|
+
online: null,
|
25
|
+
playing: null,
|
26
|
+
streaming: null,
|
27
|
+
patron: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Lishogi::ArenaTournaments
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **created** | **Array<Object>** | | [optional] |
|
8
|
+
| **started** | **Array<Object>** | | [optional] |
|
9
|
+
| **finished** | **Array<Object>** | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'lishogi'
|
15
|
+
|
16
|
+
instance = Lishogi::ArenaTournaments.new(
|
17
|
+
created: null,
|
18
|
+
started: null,
|
19
|
+
finished: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|