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.
Files changed (248) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +661 -0
  4. data/LICENSE~ +1 -0
  5. data/Makefile +39 -0
  6. data/Makefile~ +7 -0
  7. data/README.md +276 -0
  8. data/Rakefile +10 -0
  9. data/docs/Account200Response.md +20 -0
  10. data/docs/AccountApi.md +345 -0
  11. data/docs/AccountEmail200Response.md +18 -0
  12. data/docs/AccountKid200Response.md +18 -0
  13. data/docs/AnalysisApi.md +77 -0
  14. data/docs/ApiStreamEvent200Response.md +53 -0
  15. data/docs/ApiUsersStatus200ResponseInner.md +30 -0
  16. data/docs/ArenaTournaments.md +22 -0
  17. data/docs/ArenaTournamentsApi.md +601 -0
  18. data/docs/BoardApi.md +659 -0
  19. data/docs/BoardGameStream200Response.md +51 -0
  20. data/docs/BoardGameTakebackAcceptParameter.md +15 -0
  21. data/docs/BotApi.md +634 -0
  22. data/docs/ChallengeDeclinedEvent.md +20 -0
  23. data/docs/ChallengeEvent.md +20 -0
  24. data/docs/ChallengeJson.md +42 -0
  25. data/docs/ChallengeJsonPerf.md +20 -0
  26. data/docs/ChallengeJsonTimeControl.md +51 -0
  27. data/docs/ChallengeJsonTimeControlOneOf.md +28 -0
  28. data/docs/ChallengeJsonTimeControlOneOf1.md +20 -0
  29. data/docs/ChallengeJsonTimeControlOneOf2.md +18 -0
  30. data/docs/ChallengeUser.md +30 -0
  31. data/docs/ChallengesApi.md +414 -0
  32. data/docs/ChatLineEvent.md +24 -0
  33. data/docs/Clock.md +24 -0
  34. data/docs/Count.md +38 -0
  35. data/docs/Error.md +18 -0
  36. data/docs/GameEventInfo.md +22 -0
  37. data/docs/GameEventInfoCompat.md +20 -0
  38. data/docs/GameEventPlayer.md +28 -0
  39. data/docs/GameFinishEvent.md +20 -0
  40. data/docs/GameFullEvent.md +42 -0
  41. data/docs/GameFullEventPerf.md +18 -0
  42. data/docs/GameJson.md +50 -0
  43. data/docs/GameJsonAnalysisInner.md +24 -0
  44. data/docs/GameJsonAnalysisInnerJudgment.md +20 -0
  45. data/docs/GameJsonClock.md +26 -0
  46. data/docs/GameJsonPlayers.md +20 -0
  47. data/docs/GameStartEvent.md +20 -0
  48. data/docs/GameStateEvent.md +38 -0
  49. data/docs/GameStatus.md +15 -0
  50. data/docs/GameUser.md +32 -0
  51. data/docs/GameUserAnalysis.md +24 -0
  52. data/docs/GamesApi.md +473 -0
  53. data/docs/LightUser.md +24 -0
  54. data/docs/LightUserTitle.md +49 -0
  55. data/docs/MessagingApi.md +79 -0
  56. data/docs/Move.md +28 -0
  57. data/docs/NotFound.md +18 -0
  58. data/docs/OAuthError.md +20 -0
  59. data/docs/Ok.md +18 -0
  60. data/docs/Perf.md +26 -0
  61. data/docs/PerfType.md +15 -0
  62. data/docs/Perfs.md +30 -0
  63. data/docs/PlayTime.md +20 -0
  64. data/docs/Profile.md +28 -0
  65. data/docs/PuzzleRoundJson.md +24 -0
  66. data/docs/PuzzlesApi.md +211 -0
  67. data/docs/SimulsApi.md +69 -0
  68. data/docs/Speed.md +15 -0
  69. data/docs/StudiesApi.md +233 -0
  70. data/docs/TVApi.md +208 -0
  71. data/docs/Team.md +32 -0
  72. data/docs/TeamAll200Response.md +30 -0
  73. data/docs/TeamRequest.md +24 -0
  74. data/docs/TeamRequestWithUser.md +20 -0
  75. data/docs/TeamsApi.md +702 -0
  76. data/docs/Title.md +15 -0
  77. data/docs/User.md +42 -0
  78. data/docs/UserExtended.md +60 -0
  79. data/docs/UserPreferences.md +72 -0
  80. data/docs/UsersApi.md +667 -0
  81. data/docs/Variant.md +22 -0
  82. data/docs/VariantKey.md +15 -0
  83. data/git_push.sh +57 -0
  84. data/lib/lishogi/api/account_api.rb +314 -0
  85. data/lib/lishogi/api/analysis_api.rb +92 -0
  86. data/lib/lishogi/api/arena_tournaments_api.rb +681 -0
  87. data/lib/lishogi/api/board_api.rb +685 -0
  88. data/lib/lishogi/api/bot_api.rb +608 -0
  89. data/lib/lishogi/api/challenges_api.rb +554 -0
  90. data/lib/lishogi/api/games_api.rb +514 -0
  91. data/lib/lishogi/api/messaging_api.rb +97 -0
  92. data/lib/lishogi/api/puzzles_api.rb +210 -0
  93. data/lib/lishogi/api/simuls_api.rb +79 -0
  94. data/lib/lishogi/api/studies_api.rb +244 -0
  95. data/lib/lishogi/api/teams_api.rb +678 -0
  96. data/lib/lishogi/api/tv_api.rb +222 -0
  97. data/lib/lishogi/api/users_api.rb +677 -0
  98. data/lib/lishogi/api_client.rb +437 -0
  99. data/lib/lishogi/api_error.rb +58 -0
  100. data/lib/lishogi/configuration.rb +392 -0
  101. data/lib/lishogi/models/account200_response.rb +223 -0
  102. data/lib/lishogi/models/account_email200_response.rb +214 -0
  103. data/lib/lishogi/models/account_kid200_response.rb +214 -0
  104. data/lib/lishogi/models/api_stream_event200_response.rb +107 -0
  105. data/lib/lishogi/models/api_users_status200_response_inner.rb +273 -0
  106. data/lib/lishogi/models/arena_tournaments.rb +238 -0
  107. data/lib/lishogi/models/board_game_stream200_response.rb +106 -0
  108. data/lib/lishogi/models/board_game_takeback_accept_parameter.rb +104 -0
  109. data/lib/lishogi/models/challenge_declined_event.rb +257 -0
  110. data/lib/lishogi/models/challenge_event.rb +257 -0
  111. data/lib/lishogi/models/challenge_json.rb +453 -0
  112. data/lib/lishogi/models/challenge_json_perf.rb +223 -0
  113. data/lib/lishogi/models/challenge_json_time_control.rb +106 -0
  114. data/lib/lishogi/models/challenge_json_time_control_one_of.rb +259 -0
  115. data/lib/lishogi/models/challenge_json_time_control_one_of1.rb +223 -0
  116. data/lib/lishogi/models/challenge_json_time_control_one_of2.rb +214 -0
  117. data/lib/lishogi/models/challenge_user.rb +275 -0
  118. data/lib/lishogi/models/chat_line_event.rb +315 -0
  119. data/lib/lishogi/models/clock.rb +242 -0
  120. data/lib/lishogi/models/count.rb +304 -0
  121. data/lib/lishogi/models/error.rb +215 -0
  122. data/lib/lishogi/models/game_event_info.rb +266 -0
  123. data/lib/lishogi/models/game_event_info_compat.rb +223 -0
  124. data/lib/lishogi/models/game_event_player.rb +260 -0
  125. data/lib/lishogi/models/game_finish_event.rb +257 -0
  126. data/lib/lishogi/models/game_full_event.rb +436 -0
  127. data/lib/lishogi/models/game_full_event_perf.rb +215 -0
  128. data/lib/lishogi/models/game_json.rb +457 -0
  129. data/lib/lishogi/models/game_json_analysis_inner.rb +251 -0
  130. data/lib/lishogi/models/game_json_analysis_inner_judgment.rb +258 -0
  131. data/lib/lishogi/models/game_json_clock.rb +250 -0
  132. data/lib/lishogi/models/game_json_players.rb +223 -0
  133. data/lib/lishogi/models/game_start_event.rb +257 -0
  134. data/lib/lishogi/models/game_state_event.rb +396 -0
  135. data/lib/lishogi/models/game_status.rb +52 -0
  136. data/lib/lishogi/models/game_user.rb +277 -0
  137. data/lib/lishogi/models/game_user_analysis.rb +269 -0
  138. data/lib/lishogi/models/light_user.rb +241 -0
  139. data/lib/lishogi/models/light_user_title.rb +105 -0
  140. data/lib/lishogi/models/move.rb +259 -0
  141. data/lib/lishogi/models/not_found.rb +214 -0
  142. data/lib/lishogi/models/o_auth_error.rb +225 -0
  143. data/lib/lishogi/models/ok.rb +214 -0
  144. data/lib/lishogi/models/perf.rb +250 -0
  145. data/lib/lishogi/models/perf_type.rb +49 -0
  146. data/lib/lishogi/models/perfs.rb +268 -0
  147. data/lib/lishogi/models/play_time.rb +223 -0
  148. data/lib/lishogi/models/profile.rb +259 -0
  149. data/lib/lishogi/models/puzzle_round_json.rb +241 -0
  150. data/lib/lishogi/models/speed.rb +44 -0
  151. data/lib/lishogi/models/team.rb +280 -0
  152. data/lib/lishogi/models/team_all200_response.rb +272 -0
  153. data/lib/lishogi/models/team_request.rb +241 -0
  154. data/lib/lishogi/models/team_request_with_user.rb +223 -0
  155. data/lib/lishogi/models/title.rb +64 -0
  156. data/lib/lishogi/models/user.rb +322 -0
  157. data/lib/lishogi/models/user_extended.rb +410 -0
  158. data/lib/lishogi/models/user_preferences.rb +515 -0
  159. data/lib/lishogi/models/variant.rb +256 -0
  160. data/lib/lishogi/models/variant_key.rb +44 -0
  161. data/lib/lishogi/version.rb +15 -0
  162. data/lib/lishogi.rb +112 -0
  163. data/lishogi-api.patched.yaml +5806 -0
  164. data/lishogi-api.yaml +5811 -0
  165. data/lishogi.gemspec +41 -0
  166. data/manifest.scm +1 -0
  167. data/manifest.scm~ +1 -0
  168. data/patch +5 -0
  169. data/patch~ +1 -0
  170. data/pkg/lishogi-0.1.0.gem +0 -0
  171. data/smoke +5 -0
  172. data/smoke~ +2 -0
  173. data/spec/api/account_api_spec.rb +91 -0
  174. data/spec/api/analysis_api_spec.rb +49 -0
  175. data/spec/api/arena_tournaments_api_spec.rb +160 -0
  176. data/spec/api/board_api_spec.rb +154 -0
  177. data/spec/api/bot_api_spec.rb +144 -0
  178. data/spec/api/challenges_api_spec.rb +123 -0
  179. data/spec/api/games_api_spec.rb +135 -0
  180. data/spec/api/messaging_api_spec.rb +48 -0
  181. data/spec/api/puzzles_api_spec.rb +70 -0
  182. data/spec/api/simuls_api_spec.rb +46 -0
  183. data/spec/api/studies_api_spec.rb +81 -0
  184. data/spec/api/teams_api_spec.rb +160 -0
  185. data/spec/api/tv_api_spec.rb +74 -0
  186. data/spec/api/users_api_spec.rb +157 -0
  187. data/spec/models/account200_response_spec.rb +42 -0
  188. data/spec/models/account_email200_response_spec.rb +36 -0
  189. data/spec/models/account_kid200_response_spec.rb +36 -0
  190. data/spec/models/api_stream_event200_response_spec.rb +32 -0
  191. data/spec/models/api_users_status200_response_inner_spec.rb +72 -0
  192. data/spec/models/arena_tournaments_spec.rb +48 -0
  193. data/spec/models/board_game_stream200_response_spec.rb +32 -0
  194. data/spec/models/board_game_takeback_accept_parameter_spec.rb +21 -0
  195. data/spec/models/challenge_declined_event_spec.rb +46 -0
  196. data/spec/models/challenge_event_spec.rb +46 -0
  197. data/spec/models/challenge_json_perf_spec.rb +42 -0
  198. data/spec/models/challenge_json_spec.rb +120 -0
  199. data/spec/models/challenge_json_time_control_one_of1_spec.rb +42 -0
  200. data/spec/models/challenge_json_time_control_one_of2_spec.rb +36 -0
  201. data/spec/models/challenge_json_time_control_one_of_spec.rb +66 -0
  202. data/spec/models/challenge_json_time_control_spec.rb +32 -0
  203. data/spec/models/challenge_user_spec.rb +72 -0
  204. data/spec/models/chat_line_event_spec.rb +62 -0
  205. data/spec/models/clock_spec.rb +54 -0
  206. data/spec/models/count_spec.rb +96 -0
  207. data/spec/models/error_spec.rb +36 -0
  208. data/spec/models/game_event_info_compat_spec.rb +42 -0
  209. data/spec/models/game_event_info_spec.rb +52 -0
  210. data/spec/models/game_event_player_spec.rb +66 -0
  211. data/spec/models/game_finish_event_spec.rb +46 -0
  212. data/spec/models/game_full_event_perf_spec.rb +36 -0
  213. data/spec/models/game_full_event_spec.rb +112 -0
  214. data/spec/models/game_json_analysis_inner_judgment_spec.rb +46 -0
  215. data/spec/models/game_json_analysis_inner_spec.rb +54 -0
  216. data/spec/models/game_json_clock_spec.rb +60 -0
  217. data/spec/models/game_json_players_spec.rb +42 -0
  218. data/spec/models/game_json_spec.rb +136 -0
  219. data/spec/models/game_start_event_spec.rb +46 -0
  220. data/spec/models/game_state_event_spec.rb +100 -0
  221. data/spec/models/game_status_spec.rb +30 -0
  222. data/spec/models/game_user_analysis_spec.rb +54 -0
  223. data/spec/models/game_user_spec.rb +78 -0
  224. data/spec/models/light_user_spec.rb +54 -0
  225. data/spec/models/light_user_title_spec.rb +32 -0
  226. data/spec/models/move_spec.rb +66 -0
  227. data/spec/models/not_found_spec.rb +36 -0
  228. data/spec/models/o_auth_error_spec.rb +42 -0
  229. data/spec/models/ok_spec.rb +36 -0
  230. data/spec/models/perf_spec.rb +60 -0
  231. data/spec/models/perf_type_spec.rb +30 -0
  232. data/spec/models/perfs_spec.rb +72 -0
  233. data/spec/models/play_time_spec.rb +42 -0
  234. data/spec/models/profile_spec.rb +66 -0
  235. data/spec/models/puzzle_round_json_spec.rb +54 -0
  236. data/spec/models/speed_spec.rb +30 -0
  237. data/spec/models/team_all200_response_spec.rb +72 -0
  238. data/spec/models/team_request_spec.rb +54 -0
  239. data/spec/models/team_request_with_user_spec.rb +42 -0
  240. data/spec/models/team_spec.rb +78 -0
  241. data/spec/models/title_spec.rb +30 -0
  242. data/spec/models/user_extended_spec.rb +162 -0
  243. data/spec/models/user_preferences_spec.rb +210 -0
  244. data/spec/models/user_spec.rb +108 -0
  245. data/spec/models/variant_key_spec.rb +30 -0
  246. data/spec/models/variant_spec.rb +48 -0
  247. data/spec/spec_helper.rb +111 -0
  248. 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
@@ -0,0 +1,15 @@
1
+ # Lishogi::PerfType
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'lishogi'
12
+
13
+ instance = Lishogi::PerfType.new()
14
+ ```
15
+
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
+
@@ -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&lt;Object&gt; 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&lt;Object&gt;, 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&lt;Object&gt;
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&lt;Object&gt;**
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
@@ -0,0 +1,15 @@
1
+ # Lishogi::Speed
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'lishogi'
12
+
13
+ instance = Lishogi::Speed.new()
14
+ ```
15
+
@@ -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: &#x60;22 同 玉(51) (00:02/00:00:13)&#x60; | [optional][default to true] |
67
+ | **comments** | **Boolean** | Include analysis and annotator comments in the KIF moves, when available. Example: &#x60;1 3六歩(37) * Good move * 次に▲35歩で角道を遮る! * [%csl P3d,P2b][%cal P3f3e]&#x60; | [optional][default to true] |
68
+ | **variations** | **Boolean** | Include non-mainline moves, when available. Example: &#x60;7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]&#x60; | [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: &#x60;22 同 玉(51) (00:02/00:00:13)&#x60; | [optional][default to true] |
141
+ | **comments** | **Boolean** | Include analysis and annotator comments in the KIF moves, when available. Example: &#x60;1 3六歩(37) * Good move * 次に▲35歩で角道を遮る! * [%csl P3d,P2b][%cal P3f3e]&#x60; | [optional][default to true] |
142
+ | **variations** | **Boolean** | Include non-mainline moves, when available. Example: &#x60;7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]&#x60; | [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: &#x60;22 同 玉(51) (00:02/00:00:13)&#x60; | [optional][default to true] |
218
+ | **comments** | **Boolean** | Include analysis and annotator comments in the KIF moves, when available. Example: &#x60;1 3六歩(37) * Good move * 次に▲35歩で角道を遮る * [%csl P3d,P2b][%cal P3f3e]&#x60; | [optional][default to true] |
219
+ | **variations** | **Boolean** | Include non-mainline moves, when available. Example: &#x60;7 4八銀(39) * [%cal P4h3g,P3g4f,P3f3e]&#x60; | [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
+