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/Ok.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Lishogi::Ok
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **ok** | **Boolean** | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'lishogi'
|
13
|
+
|
14
|
+
instance = Lishogi::Ok.new(
|
15
|
+
ok: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/Perf.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Lishogi::Perf
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **games** | **Integer** | | [optional] |
|
8
|
+
| **rating** | **Integer** | | [optional] |
|
9
|
+
| **rd** | **Integer** | | [optional] |
|
10
|
+
| **prog** | **Integer** | | [optional] |
|
11
|
+
| **prov** | **Boolean** | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'lishogi'
|
17
|
+
|
18
|
+
instance = Lishogi::Perf.new(
|
19
|
+
games: 2945,
|
20
|
+
rating: 1609,
|
21
|
+
rd: 60,
|
22
|
+
prog: -22,
|
23
|
+
prov: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/PerfType.md
ADDED
data/docs/Perfs.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Lishogi::Perfs
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **ultra_bullet** | [**Perf**](Perf.md) | | [optional] |
|
8
|
+
| **blitz** | [**Perf**](Perf.md) | | [optional] |
|
9
|
+
| **bullet** | [**Perf**](Perf.md) | | [optional] |
|
10
|
+
| **correspondence** | [**Perf**](Perf.md) | | [optional] |
|
11
|
+
| **puzzle** | [**Perf**](Perf.md) | | [optional] |
|
12
|
+
| **classical** | [**Perf**](Perf.md) | | [optional] |
|
13
|
+
| **rapid** | [**Perf**](Perf.md) | | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'lishogi'
|
19
|
+
|
20
|
+
instance = Lishogi::Perfs.new(
|
21
|
+
ultra_bullet: null,
|
22
|
+
blitz: null,
|
23
|
+
bullet: null,
|
24
|
+
correspondence: null,
|
25
|
+
puzzle: null,
|
26
|
+
classical: null,
|
27
|
+
rapid: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
data/docs/PlayTime.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Lishogi::PlayTime
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **total** | **Integer** | | [optional] |
|
8
|
+
| **tv** | **Integer** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'lishogi'
|
14
|
+
|
15
|
+
instance = Lishogi::PlayTime.new(
|
16
|
+
total: 3296897,
|
17
|
+
tv: 12134
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/Profile.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Lishogi::Profile
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **country** | **String** | | [optional] |
|
8
|
+
| **location** | **String** | | [optional] |
|
9
|
+
| **bio** | **String** | | [optional] |
|
10
|
+
| **first_name** | **String** | | [optional] |
|
11
|
+
| **last_name** | **String** | | [optional] |
|
12
|
+
| **links** | **String** | | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'lishogi'
|
18
|
+
|
19
|
+
instance = Lishogi::Profile.new(
|
20
|
+
country: EC,
|
21
|
+
location: null,
|
22
|
+
bio: Free bugs!,
|
23
|
+
first_name: Yohaan,
|
24
|
+
last_name: Seth Nathan,
|
25
|
+
links: github.com/TheYoBots
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Lishogi::PuzzleRoundJson
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | [optional] |
|
8
|
+
| **date** | **Float** | | [optional] |
|
9
|
+
| **win** | **Boolean** | | [optional] |
|
10
|
+
| **puzzle_rating** | **Float** | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'lishogi'
|
16
|
+
|
17
|
+
instance = Lishogi::PuzzleRoundJson.new(
|
18
|
+
id: BwPiW,
|
19
|
+
date: 1514505150384,
|
20
|
+
win: true,
|
21
|
+
puzzle_rating: 1877
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
data/docs/PuzzlesApi.md
ADDED
@@ -0,0 +1,211 @@
|
|
1
|
+
# Lishogi::PuzzlesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://lishogi.org*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**api_puzzle_activity**](PuzzlesApi.md#api_puzzle_activity) | **GET** /api/puzzle/activity | Get your puzzle activity |
|
8
|
+
| [**api_puzzle_daily**](PuzzlesApi.md#api_puzzle_daily) | **GET** /api/puzzle/daily | Get the daily puzzle |
|
9
|
+
| [**api_puzzle_dashboard**](PuzzlesApi.md#api_puzzle_dashboard) | **GET** /api/puzzle/dashboard/{days} | Get your puzzle dashboard |
|
10
|
+
|
11
|
+
|
12
|
+
## api_puzzle_activity
|
13
|
+
|
14
|
+
> <PuzzleRoundJson> api_puzzle_activity(opts)
|
15
|
+
|
16
|
+
Get your puzzle activity
|
17
|
+
|
18
|
+
Download your puzzle activity in [ndjson](#section/Introduction/Streaming-with-ND-JSON) format. Puzzle activity is sorted by reverse chronological order (most recent first) We recommend streaming the response, for it can be very long.
|
19
|
+
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'lishogi'
|
25
|
+
# setup authorization
|
26
|
+
Lishogi.configure do |config|
|
27
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
28
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = Lishogi::PuzzlesApi.new
|
32
|
+
opts = {
|
33
|
+
max: 56 # Integer | How many entries to download. Leave empty to download all activity.
|
34
|
+
}
|
35
|
+
|
36
|
+
begin
|
37
|
+
# Get your puzzle activity
|
38
|
+
result = api_instance.api_puzzle_activity(opts)
|
39
|
+
p result
|
40
|
+
rescue Lishogi::ApiError => e
|
41
|
+
puts "Error when calling PuzzlesApi->api_puzzle_activity: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
#### Using the api_puzzle_activity_with_http_info variant
|
46
|
+
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
48
|
+
|
49
|
+
> <Array(<PuzzleRoundJson>, Integer, Hash)> api_puzzle_activity_with_http_info(opts)
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
begin
|
53
|
+
# Get your puzzle activity
|
54
|
+
data, status_code, headers = api_instance.api_puzzle_activity_with_http_info(opts)
|
55
|
+
p status_code # => 2xx
|
56
|
+
p headers # => { ... }
|
57
|
+
p data # => <PuzzleRoundJson>
|
58
|
+
rescue Lishogi::ApiError => e
|
59
|
+
puts "Error when calling PuzzlesApi->api_puzzle_activity_with_http_info: #{e}"
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
### Parameters
|
64
|
+
|
65
|
+
| Name | Type | Description | Notes |
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
67
|
+
| **max** | **Integer** | How many entries to download. Leave empty to download all activity. | [optional] |
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
[**PuzzleRoundJson**](PuzzleRoundJson.md)
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
[OAuth2](../README.md#OAuth2)
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: Not defined
|
80
|
+
- **Accept**: application/x-ndjson
|
81
|
+
|
82
|
+
|
83
|
+
## api_puzzle_daily
|
84
|
+
|
85
|
+
> Object api_puzzle_daily
|
86
|
+
|
87
|
+
Get the daily puzzle
|
88
|
+
|
89
|
+
Get the daily Lishogi puzzle in JSON format.
|
90
|
+
|
91
|
+
### Examples
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
require 'time'
|
95
|
+
require 'lishogi'
|
96
|
+
|
97
|
+
api_instance = Lishogi::PuzzlesApi.new
|
98
|
+
|
99
|
+
begin
|
100
|
+
# Get the daily puzzle
|
101
|
+
result = api_instance.api_puzzle_daily
|
102
|
+
p result
|
103
|
+
rescue Lishogi::ApiError => e
|
104
|
+
puts "Error when calling PuzzlesApi->api_puzzle_daily: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Using the api_puzzle_daily_with_http_info variant
|
109
|
+
|
110
|
+
This returns an Array which contains the response data, status code and headers.
|
111
|
+
|
112
|
+
> <Array(Object, Integer, Hash)> api_puzzle_daily_with_http_info
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
begin
|
116
|
+
# Get the daily puzzle
|
117
|
+
data, status_code, headers = api_instance.api_puzzle_daily_with_http_info
|
118
|
+
p status_code # => 2xx
|
119
|
+
p headers # => { ... }
|
120
|
+
p data # => Object
|
121
|
+
rescue Lishogi::ApiError => e
|
122
|
+
puts "Error when calling PuzzlesApi->api_puzzle_daily_with_http_info: #{e}"
|
123
|
+
end
|
124
|
+
```
|
125
|
+
|
126
|
+
### Parameters
|
127
|
+
|
128
|
+
This endpoint does not need any parameter.
|
129
|
+
|
130
|
+
### Return type
|
131
|
+
|
132
|
+
**Object**
|
133
|
+
|
134
|
+
### Authorization
|
135
|
+
|
136
|
+
No authorization required
|
137
|
+
|
138
|
+
### HTTP request headers
|
139
|
+
|
140
|
+
- **Content-Type**: Not defined
|
141
|
+
- **Accept**: application/x-ndjson
|
142
|
+
|
143
|
+
|
144
|
+
## api_puzzle_dashboard
|
145
|
+
|
146
|
+
> Object api_puzzle_dashboard(days)
|
147
|
+
|
148
|
+
Get your puzzle dashboard
|
149
|
+
|
150
|
+
Download your [puzzle dashboard](https://lishogi.org/training/dashboard/30/dashboard) as JSON. Also includes all puzzle themes played, with aggregated results. Allows re-creating the [improvement/strengths](https://lishogi.org/training/dashboard/30/improvementAreas) interfaces.
|
151
|
+
|
152
|
+
### Examples
|
153
|
+
|
154
|
+
```ruby
|
155
|
+
require 'time'
|
156
|
+
require 'lishogi'
|
157
|
+
# setup authorization
|
158
|
+
Lishogi.configure do |config|
|
159
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
160
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
161
|
+
end
|
162
|
+
|
163
|
+
api_instance = Lishogi::PuzzlesApi.new
|
164
|
+
days = 56 # Integer | How many days to look back when aggregating puzzle results. 30 is sensible.
|
165
|
+
|
166
|
+
begin
|
167
|
+
# Get your puzzle dashboard
|
168
|
+
result = api_instance.api_puzzle_dashboard(days)
|
169
|
+
p result
|
170
|
+
rescue Lishogi::ApiError => e
|
171
|
+
puts "Error when calling PuzzlesApi->api_puzzle_dashboard: #{e}"
|
172
|
+
end
|
173
|
+
```
|
174
|
+
|
175
|
+
#### Using the api_puzzle_dashboard_with_http_info variant
|
176
|
+
|
177
|
+
This returns an Array which contains the response data, status code and headers.
|
178
|
+
|
179
|
+
> <Array(Object, Integer, Hash)> api_puzzle_dashboard_with_http_info(days)
|
180
|
+
|
181
|
+
```ruby
|
182
|
+
begin
|
183
|
+
# Get your puzzle dashboard
|
184
|
+
data, status_code, headers = api_instance.api_puzzle_dashboard_with_http_info(days)
|
185
|
+
p status_code # => 2xx
|
186
|
+
p headers # => { ... }
|
187
|
+
p data # => Object
|
188
|
+
rescue Lishogi::ApiError => e
|
189
|
+
puts "Error when calling PuzzlesApi->api_puzzle_dashboard_with_http_info: #{e}"
|
190
|
+
end
|
191
|
+
```
|
192
|
+
|
193
|
+
### Parameters
|
194
|
+
|
195
|
+
| Name | Type | Description | Notes |
|
196
|
+
| ---- | ---- | ----------- | ----- |
|
197
|
+
| **days** | **Integer** | How many days to look back when aggregating puzzle results. 30 is sensible. | |
|
198
|
+
|
199
|
+
### Return type
|
200
|
+
|
201
|
+
**Object**
|
202
|
+
|
203
|
+
### Authorization
|
204
|
+
|
205
|
+
[OAuth2](../README.md#OAuth2)
|
206
|
+
|
207
|
+
### HTTP request headers
|
208
|
+
|
209
|
+
- **Content-Type**: Not defined
|
210
|
+
- **Accept**: application/json
|
211
|
+
|
data/docs/SimulsApi.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Lishogi::SimulsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://lishogi.org*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**api_simul**](SimulsApi.md#api_simul) | **GET** /api/simul | Get current simuls |
|
8
|
+
|
9
|
+
|
10
|
+
## api_simul
|
11
|
+
|
12
|
+
> Array<Object> api_simul
|
13
|
+
|
14
|
+
Get current simuls
|
15
|
+
|
16
|
+
Get recently finished, ongoing, and upcoming simuls.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'lishogi'
|
23
|
+
|
24
|
+
api_instance = Lishogi::SimulsApi.new
|
25
|
+
|
26
|
+
begin
|
27
|
+
# Get current simuls
|
28
|
+
result = api_instance.api_simul
|
29
|
+
p result
|
30
|
+
rescue Lishogi::ApiError => e
|
31
|
+
puts "Error when calling SimulsApi->api_simul: #{e}"
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
#### Using the api_simul_with_http_info variant
|
36
|
+
|
37
|
+
This returns an Array which contains the response data, status code and headers.
|
38
|
+
|
39
|
+
> <Array(Array<Object>, Integer, Hash)> api_simul_with_http_info
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
begin
|
43
|
+
# Get current simuls
|
44
|
+
data, status_code, headers = api_instance.api_simul_with_http_info
|
45
|
+
p status_code # => 2xx
|
46
|
+
p headers # => { ... }
|
47
|
+
p data # => Array<Object>
|
48
|
+
rescue Lishogi::ApiError => e
|
49
|
+
puts "Error when calling SimulsApi->api_simul_with_http_info: #{e}"
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
### Parameters
|
54
|
+
|
55
|
+
This endpoint does not need any parameter.
|
56
|
+
|
57
|
+
### Return type
|
58
|
+
|
59
|
+
**Array<Object>**
|
60
|
+
|
61
|
+
### Authorization
|
62
|
+
|
63
|
+
No authorization required
|
64
|
+
|
65
|
+
### HTTP request headers
|
66
|
+
|
67
|
+
- **Content-Type**: Not defined
|
68
|
+
- **Accept**: application/json
|
69
|
+
|
data/docs/Speed.md
ADDED
data/docs/StudiesApi.md
ADDED
@@ -0,0 +1,233 @@
|
|
1
|
+
# Lishogi::StudiesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://lishogi.org*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**study_all_chapters_kif**](StudiesApi.md#study_all_chapters_kif) | **GET** /api/study/{studyId}.kif | Export all chapters |
|
8
|
+
| [**study_chapter_kif**](StudiesApi.md#study_chapter_kif) | **GET** /study/{studyId}/{chapterId}.kif | Export one study chapter |
|
9
|
+
| [**study_export_all_kif**](StudiesApi.md#study_export_all_kif) | **GET** /study/by/{username}/export.kif | Export all studies of a user |
|
10
|
+
|
11
|
+
|
12
|
+
## study_all_chapters_kif
|
13
|
+
|
14
|
+
> Object study_all_chapters_kif(study_id, opts)
|
15
|
+
|
16
|
+
Export all chapters
|
17
|
+
|
18
|
+
Download all chapters of a study in KIF format.
|
19
|
+
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'lishogi'
|
25
|
+
|
26
|
+
api_instance = Lishogi::StudiesApi.new
|
27
|
+
study_id = 'study_id_example' # String | The study ID (8 characters).
|
28
|
+
opts = {
|
29
|
+
clocks: true, # Boolean | Include clock comments in the KIF moves, when available. Example: `22 同 玉(51) (00:02/00:00:13)`
|
30
|
+
comments: true, # Boolean | Include analysis and annotator comments in the KIF moves, when available. Example: `1 3六歩(37) * Good move * 次に▲35歩で角道を遮る! * [%csl P3d,P2b][%cal P3f3e]`
|
31
|
+
variations: true # Boolean | Include non-mainline moves, when available. Example: `7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]`
|
32
|
+
}
|
33
|
+
|
34
|
+
begin
|
35
|
+
# Export all chapters
|
36
|
+
result = api_instance.study_all_chapters_kif(study_id, opts)
|
37
|
+
p result
|
38
|
+
rescue Lishogi::ApiError => e
|
39
|
+
puts "Error when calling StudiesApi->study_all_chapters_kif: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
#### Using the study_all_chapters_kif_with_http_info variant
|
44
|
+
|
45
|
+
This returns an Array which contains the response data, status code and headers.
|
46
|
+
|
47
|
+
> <Array(Object, Integer, Hash)> study_all_chapters_kif_with_http_info(study_id, opts)
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
begin
|
51
|
+
# Export all chapters
|
52
|
+
data, status_code, headers = api_instance.study_all_chapters_kif_with_http_info(study_id, opts)
|
53
|
+
p status_code # => 2xx
|
54
|
+
p headers # => { ... }
|
55
|
+
p data # => Object
|
56
|
+
rescue Lishogi::ApiError => e
|
57
|
+
puts "Error when calling StudiesApi->study_all_chapters_kif_with_http_info: #{e}"
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
### Parameters
|
62
|
+
|
63
|
+
| Name | Type | Description | Notes |
|
64
|
+
| ---- | ---- | ----------- | ----- |
|
65
|
+
| **study_id** | **String** | The study ID (8 characters). | |
|
66
|
+
| **clocks** | **Boolean** | Include clock comments in the KIF moves, when available. Example: `22 同 玉(51) (00:02/00:00:13)` | [optional][default to true] |
|
67
|
+
| **comments** | **Boolean** | Include analysis and annotator comments in the KIF moves, when available. Example: `1 3六歩(37) * Good move * 次に▲35歩で角道を遮る! * [%csl P3d,P2b][%cal P3f3e]` | [optional][default to true] |
|
68
|
+
| **variations** | **Boolean** | Include non-mainline moves, when available. Example: `7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]` | [optional][default to true] |
|
69
|
+
|
70
|
+
### Return type
|
71
|
+
|
72
|
+
**Object**
|
73
|
+
|
74
|
+
### Authorization
|
75
|
+
|
76
|
+
No authorization required
|
77
|
+
|
78
|
+
### HTTP request headers
|
79
|
+
|
80
|
+
- **Content-Type**: Not defined
|
81
|
+
- **Accept**: text/plain
|
82
|
+
|
83
|
+
|
84
|
+
## study_chapter_kif
|
85
|
+
|
86
|
+
> Object study_chapter_kif(study_id, chapter_id, opts)
|
87
|
+
|
88
|
+
Export one study chapter
|
89
|
+
|
90
|
+
Download one study chapter in KIF format.
|
91
|
+
|
92
|
+
### Examples
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
require 'time'
|
96
|
+
require 'lishogi'
|
97
|
+
|
98
|
+
api_instance = Lishogi::StudiesApi.new
|
99
|
+
study_id = 'study_id_example' # String | The study ID (8 characters).
|
100
|
+
chapter_id = 'chapter_id_example' # String | The chapter ID (8 characters).
|
101
|
+
opts = {
|
102
|
+
clocks: true, # Boolean | Include clock comments in the KIF moves, when available. Example: `22 同 玉(51) (00:02/00:00:13)`
|
103
|
+
comments: true, # Boolean | Include analysis and annotator comments in the KIF moves, when available. Example: `1 3六歩(37) * Good move * 次に▲35歩で角道を遮る! * [%csl P3d,P2b][%cal P3f3e]`
|
104
|
+
variations: true # Boolean | Include non-mainline moves, when available. Example: `7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]`
|
105
|
+
}
|
106
|
+
|
107
|
+
begin
|
108
|
+
# Export one study chapter
|
109
|
+
result = api_instance.study_chapter_kif(study_id, chapter_id, opts)
|
110
|
+
p result
|
111
|
+
rescue Lishogi::ApiError => e
|
112
|
+
puts "Error when calling StudiesApi->study_chapter_kif: #{e}"
|
113
|
+
end
|
114
|
+
```
|
115
|
+
|
116
|
+
#### Using the study_chapter_kif_with_http_info variant
|
117
|
+
|
118
|
+
This returns an Array which contains the response data, status code and headers.
|
119
|
+
|
120
|
+
> <Array(Object, Integer, Hash)> study_chapter_kif_with_http_info(study_id, chapter_id, opts)
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
begin
|
124
|
+
# Export one study chapter
|
125
|
+
data, status_code, headers = api_instance.study_chapter_kif_with_http_info(study_id, chapter_id, opts)
|
126
|
+
p status_code # => 2xx
|
127
|
+
p headers # => { ... }
|
128
|
+
p data # => Object
|
129
|
+
rescue Lishogi::ApiError => e
|
130
|
+
puts "Error when calling StudiesApi->study_chapter_kif_with_http_info: #{e}"
|
131
|
+
end
|
132
|
+
```
|
133
|
+
|
134
|
+
### Parameters
|
135
|
+
|
136
|
+
| Name | Type | Description | Notes |
|
137
|
+
| ---- | ---- | ----------- | ----- |
|
138
|
+
| **study_id** | **String** | The study ID (8 characters). | |
|
139
|
+
| **chapter_id** | **String** | The chapter ID (8 characters). | |
|
140
|
+
| **clocks** | **Boolean** | Include clock comments in the KIF moves, when available. Example: `22 同 玉(51) (00:02/00:00:13)` | [optional][default to true] |
|
141
|
+
| **comments** | **Boolean** | Include analysis and annotator comments in the KIF moves, when available. Example: `1 3六歩(37) * Good move * 次に▲35歩で角道を遮る! * [%csl P3d,P2b][%cal P3f3e]` | [optional][default to true] |
|
142
|
+
| **variations** | **Boolean** | Include non-mainline moves, when available. Example: `7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]` | [optional][default to true] |
|
143
|
+
|
144
|
+
### Return type
|
145
|
+
|
146
|
+
**Object**
|
147
|
+
|
148
|
+
### Authorization
|
149
|
+
|
150
|
+
No authorization required
|
151
|
+
|
152
|
+
### HTTP request headers
|
153
|
+
|
154
|
+
- **Content-Type**: Not defined
|
155
|
+
- **Accept**: text/plain
|
156
|
+
|
157
|
+
|
158
|
+
## study_export_all_kif
|
159
|
+
|
160
|
+
> Object study_export_all_kif(username, opts)
|
161
|
+
|
162
|
+
Export all studies of a user
|
163
|
+
|
164
|
+
Download all chapters of all studies of a user in KIF format. If authenticated, then all public, unlisted, and private studies are included. If not, only public, listed studies are included.
|
165
|
+
|
166
|
+
### Examples
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
require 'time'
|
170
|
+
require 'lishogi'
|
171
|
+
# setup authorization
|
172
|
+
Lishogi.configure do |config|
|
173
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
174
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
175
|
+
end
|
176
|
+
|
177
|
+
api_instance = Lishogi::StudiesApi.new
|
178
|
+
username = 'username_example' # String | The user whose studies we export
|
179
|
+
opts = {
|
180
|
+
clocks: true, # Boolean | Include clock comments in the KIF moves, when available. Example: `22 同 玉(51) (00:02/00:00:13)`
|
181
|
+
comments: true, # Boolean | Include analysis and annotator comments in the KIF moves, when available. Example: `1 3六歩(37) * Good move * 次に▲35歩で角道を遮る * [%csl P3d,P2b][%cal P3f3e]`
|
182
|
+
variations: true # Boolean | Include non-mainline moves, when available. Example: `7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]`
|
183
|
+
}
|
184
|
+
|
185
|
+
begin
|
186
|
+
# Export all studies of a user
|
187
|
+
result = api_instance.study_export_all_kif(username, opts)
|
188
|
+
p result
|
189
|
+
rescue Lishogi::ApiError => e
|
190
|
+
puts "Error when calling StudiesApi->study_export_all_kif: #{e}"
|
191
|
+
end
|
192
|
+
```
|
193
|
+
|
194
|
+
#### Using the study_export_all_kif_with_http_info variant
|
195
|
+
|
196
|
+
This returns an Array which contains the response data, status code and headers.
|
197
|
+
|
198
|
+
> <Array(Object, Integer, Hash)> study_export_all_kif_with_http_info(username, opts)
|
199
|
+
|
200
|
+
```ruby
|
201
|
+
begin
|
202
|
+
# Export all studies of a user
|
203
|
+
data, status_code, headers = api_instance.study_export_all_kif_with_http_info(username, opts)
|
204
|
+
p status_code # => 2xx
|
205
|
+
p headers # => { ... }
|
206
|
+
p data # => Object
|
207
|
+
rescue Lishogi::ApiError => e
|
208
|
+
puts "Error when calling StudiesApi->study_export_all_kif_with_http_info: #{e}"
|
209
|
+
end
|
210
|
+
```
|
211
|
+
|
212
|
+
### Parameters
|
213
|
+
|
214
|
+
| Name | Type | Description | Notes |
|
215
|
+
| ---- | ---- | ----------- | ----- |
|
216
|
+
| **username** | **String** | The user whose studies we export | |
|
217
|
+
| **clocks** | **Boolean** | Include clock comments in the KIF moves, when available. Example: `22 同 玉(51) (00:02/00:00:13)` | [optional][default to true] |
|
218
|
+
| **comments** | **Boolean** | Include analysis and annotator comments in the KIF moves, when available. Example: `1 3六歩(37) * Good move * 次に▲35歩で角道を遮る * [%csl P3d,P2b][%cal P3f3e]` | [optional][default to true] |
|
219
|
+
| **variations** | **Boolean** | Include non-mainline moves, when available. Example: `7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]` | [optional][default to true] |
|
220
|
+
|
221
|
+
### Return type
|
222
|
+
|
223
|
+
**Object**
|
224
|
+
|
225
|
+
### Authorization
|
226
|
+
|
227
|
+
[OAuth2](../README.md#OAuth2)
|
228
|
+
|
229
|
+
### HTTP request headers
|
230
|
+
|
231
|
+
- **Content-Type**: Not defined
|
232
|
+
- **Accept**: text/plain
|
233
|
+
|