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/lishogi.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Lishogi.org API reference
|
5
|
+
|
6
|
+
## Introduction Welcome to the reference for the Lishogi API! Lishogi is free/libre, open-source shogi server forked from lichess powered by volunteers and donations. Currently this page is a work in progress, certain information here might be wrong and incorrect! Expect it to be done during 2022. - Get help in the [Lishogi Discord channel](https://discord.gg/YFtpMGg3rR) - [Contribute to this documentation on Github](https://github.com/WandererXII/lishogi/blob/master/public/doc/lishogi-api.yaml) - Check out [Lishogi widgets to embed in your website](https://lishogi.org/developers) ## Endpoint All requests go to `https://lishogi.org` (unless otherwise specified). ## Rate limiting All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. ## Streaming with ND-JSON Some API endpoints stream their responses as [Newline Delimited JSON a.k.a. **nd-json**](http://ndjson.org/), with one JSON object per line. Here's a [JavaScript utility function (for lichess)](https://gist.github.com/ornicar/a097406810939cf7be1df8ea30e94f3e) to help reading NDJSON streamed responses.
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
9
|
+
Contact: contact@lishogi.org
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
Generator version: 7.10.0
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "lishogi/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "lishogi"
|
20
|
+
s.version = Lishogi::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["gemmaro"]
|
23
|
+
s.email = ["gemmaro.dev@gmail.com"]
|
24
|
+
s.homepage = "https://git.disroot.org/gemmaro/lishogi"
|
25
|
+
s.summary = "Lishogi.org REST API client"
|
26
|
+
s.description = "# Introduction Welcome to the reference for the Lishogi API! Lishogi is free/libre, open-source shogi server forked from lichess powered by volunteers and donations. Currently this page is a work in progress, certain information here might be wrong and incorrect! Expect it to be done during 2022. - Get help in the [Lishogi Discord channel](https://discord.gg/YFtpMGg3rR) - [Contribute to this documentation on Github](https://github.com/WandererXII/lishogi/blob/master/public/doc/lishogi-api.yaml) - Check out [Lishogi widgets to embed in your website](https://lishogi.org/developers) ## Endpoint All requests go to `https://lishogi.org` (unless otherwise specified). ## Rate limiting All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. ## Streaming with ND-JSON Some API endpoints stream their responses as [Newline Delimited JSON a.k.a. **nd-json**](http://ndjson.org/), with one JSON object per line. Here's a [JavaScript utility function (for lichess)](https://gist.github.com/ornicar/a097406810939cf7be1df8ea30e94f3e) to help reading NDJSON streamed responses. "
|
27
|
+
s.license = "AGPL-3.0-later"
|
28
|
+
s.required_ruby_version = ">=3.1"
|
29
|
+
s.metadata = {}
|
30
|
+
|
31
|
+
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
|
32
|
+
s.add_runtime_dependency 'faraday-multipart'
|
33
|
+
s.add_runtime_dependency 'marcel'
|
34
|
+
|
35
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
36
|
+
|
37
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
38
|
+
s.test_files = `find spec/*`.split("\n")
|
39
|
+
s.executables = []
|
40
|
+
s.require_paths = ["lib"]
|
41
|
+
end
|
data/manifest.scm
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
(specifications->manifest (list "ruby@3.1" "ruby-faraday" "ruby-faraday-multipart" "ruby-marcel"))
|
data/manifest.scm~
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
(specifications->manifest (list "ruby@3.1" "ruby-faraday"))
|
data/patch
ADDED
data/patch~
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
Binary file
|
data/smoke
ADDED
data/smoke~
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
=begin
|
2
|
+
#Lishogi.org API reference
|
3
|
+
|
4
|
+
## Introduction Welcome to the reference for the Lishogi API! Lishogi is free/libre, open-source shogi server forked from lichess powered by volunteers and donations. Currently this page is a work in progress, certain information here might be wrong and incorrect! Expect it to be done during 2022. - Get help in the [Lishogi Discord channel](https://discord.gg/YFtpMGg3rR) - [Contribute to this documentation on Github](https://github.com/WandererXII/lishogi/blob/master/public/doc/lishogi-api.yaml) - Check out [Lishogi widgets to embed in your website](https://lishogi.org/developers) ## Endpoint All requests go to `https://lishogi.org` (unless otherwise specified). ## Rate limiting All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. ## Streaming with ND-JSON Some API endpoints stream their responses as [Newline Delimited JSON a.k.a. **nd-json**](http://ndjson.org/), with one JSON object per line. Here's a [JavaScript utility function (for lichess)](https://gist.github.com/ornicar/a097406810939cf7be1df8ea30e94f3e) to help reading NDJSON streamed responses.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: contact@lishogi.org
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.10.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Lishogi::AccountApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'AccountApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Lishogi::AccountApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of AccountApi' do
|
30
|
+
it 'should create an instance of AccountApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(Lishogi::AccountApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for account
|
36
|
+
# Get my preferences
|
37
|
+
# 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>
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Account200Response]
|
40
|
+
describe 'account test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for account_email
|
47
|
+
# Get my email address
|
48
|
+
# Read the email address of the logged in user.
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @return [AccountEmail200Response]
|
51
|
+
describe 'account_email test' do
|
52
|
+
it 'should work' do
|
53
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# unit tests for account_kid
|
58
|
+
# Get my kid mode status
|
59
|
+
# Read the kid mode status of the logged in user. - <https://lishogi.org/account/kid>
|
60
|
+
# @param [Hash] opts the optional parameters
|
61
|
+
# @return [AccountKid200Response]
|
62
|
+
describe 'account_kid test' do
|
63
|
+
it 'should work' do
|
64
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# unit tests for account_kid_post
|
69
|
+
# Set my kid mode status
|
70
|
+
# Set the kid mode status of the logged in user. - <https://lishogi.org/account/kid>
|
71
|
+
# @param v Kid mode status
|
72
|
+
# @param [Hash] opts the optional parameters
|
73
|
+
# @return [Ok]
|
74
|
+
describe 'account_kid_post test' do
|
75
|
+
it 'should work' do
|
76
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# unit tests for account_me
|
81
|
+
# Get my profile
|
82
|
+
# Public information about the logged in user.
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @return [UserExtended]
|
85
|
+
describe 'account_me test' do
|
86
|
+
it 'should work' do
|
87
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
=begin
|
2
|
+
#Lishogi.org API reference
|
3
|
+
|
4
|
+
## Introduction Welcome to the reference for the Lishogi API! Lishogi is free/libre, open-source shogi server forked from lichess powered by volunteers and donations. Currently this page is a work in progress, certain information here might be wrong and incorrect! Expect it to be done during 2022. - Get help in the [Lishogi Discord channel](https://discord.gg/YFtpMGg3rR) - [Contribute to this documentation on Github](https://github.com/WandererXII/lishogi/blob/master/public/doc/lishogi-api.yaml) - Check out [Lishogi widgets to embed in your website](https://lishogi.org/developers) ## Endpoint All requests go to `https://lishogi.org` (unless otherwise specified). ## Rate limiting All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. ## Streaming with ND-JSON Some API endpoints stream their responses as [Newline Delimited JSON a.k.a. **nd-json**](http://ndjson.org/), with one JSON object per line. Here's a [JavaScript utility function (for lichess)](https://gist.github.com/ornicar/a097406810939cf7be1df8ea30e94f3e) to help reading NDJSON streamed responses.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: contact@lishogi.org
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.10.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Lishogi::AnalysisApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'AnalysisApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Lishogi::AnalysisApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of AnalysisApi' do
|
30
|
+
it 'should create an instance of AnalysisApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(Lishogi::AnalysisApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for api_cloud_eval
|
36
|
+
# Get cloud evaluation of a position.
|
37
|
+
# 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.
|
38
|
+
# @param sfen SFEN of the position
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [Float] :multi_pv Number of variations
|
41
|
+
# @option opts [VariantKey] :variant Variant
|
42
|
+
# @return [nil]
|
43
|
+
describe 'api_cloud_eval test' do
|
44
|
+
it 'should work' do
|
45
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,160 @@
|
|
1
|
+
=begin
|
2
|
+
#Lishogi.org API reference
|
3
|
+
|
4
|
+
## Introduction Welcome to the reference for the Lishogi API! Lishogi is free/libre, open-source shogi server forked from lichess powered by volunteers and donations. Currently this page is a work in progress, certain information here might be wrong and incorrect! Expect it to be done during 2022. - Get help in the [Lishogi Discord channel](https://discord.gg/YFtpMGg3rR) - [Contribute to this documentation on Github](https://github.com/WandererXII/lishogi/blob/master/public/doc/lishogi-api.yaml) - Check out [Lishogi widgets to embed in your website](https://lishogi.org/developers) ## Endpoint All requests go to `https://lishogi.org` (unless otherwise specified). ## Rate limiting All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. ## Streaming with ND-JSON Some API endpoints stream their responses as [Newline Delimited JSON a.k.a. **nd-json**](http://ndjson.org/), with one JSON object per line. Here's a [JavaScript utility function (for lichess)](https://gist.github.com/ornicar/a097406810939cf7be1df8ea30e94f3e) to help reading NDJSON streamed responses.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: contact@lishogi.org
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.10.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Lishogi::ArenaTournamentsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ArenaTournamentsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Lishogi::ArenaTournamentsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ArenaTournamentsApi' do
|
30
|
+
it 'should create an instance of ArenaTournamentsApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(Lishogi::ArenaTournamentsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for api_team_arena
|
36
|
+
# Get team Arena tournaments
|
37
|
+
# Get all Arena tournaments relevant to a team. Tournaments are sorted by reverse chronological order of start date (last starting first). Tournaments are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
|
38
|
+
# @param team_id ID of the team
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [Integer] :max How many tournaments to download.
|
41
|
+
# @return [Array<Object>]
|
42
|
+
describe 'api_team_arena test' do
|
43
|
+
it 'should work' do
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for api_tournament
|
49
|
+
# Get current tournaments
|
50
|
+
# Get recently finished, ongoing, and upcoming tournaments. This API is used to display the [Lishogi tournament schedule](https://lishogi.org/tournament).
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [ArenaTournaments]
|
53
|
+
describe 'api_tournament test' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# unit tests for api_tournament_post
|
60
|
+
# Create a new Arena tournament
|
61
|
+
# Create a public or private Arena tournament. This endpoint mirrors the form on <https://lishogi.org/tournament/new>. You can create up to 12 public tournaments per day, or 24 private tournaments. A team battle can be created by specifying the `teambBattleByTeam` argument.
|
62
|
+
# @param clock_time Clock initial time in minutes
|
63
|
+
# @param clock_increment Clock increment in seconds
|
64
|
+
# @param clock_byoyomi Clock byoyomi in seconds
|
65
|
+
# @param periods Clock periods for byoyomi
|
66
|
+
# @param minutes How long the tournament lasts, in minutes
|
67
|
+
# @param [Hash] opts the optional parameters
|
68
|
+
# @option opts [String] :name The tournament name. Leave empty to get a random Grandmaster name
|
69
|
+
# @option opts [Integer] :wait_minutes How long to wait before starting the tournament, from now, in minutes
|
70
|
+
# @option opts [Integer] :start_date Timestamp to start the tournament at a given date and time. Overrides the `waitMinutes` setting
|
71
|
+
# @option opts [VariantKey] :variant
|
72
|
+
# @option opts [Boolean] :rated Games are rated and impact players ratings
|
73
|
+
# @option opts [String] :position Custom initial position (in SFEN) for all games of the tournament. Must be a legal shogi position. Only works with standard shogi, not variants.
|
74
|
+
# @option opts [Boolean] :berserkable Whether the players can use berserk
|
75
|
+
# @option opts [Boolean] :streakable After 2 wins, consecutive wins grant 4 points instead of 2.
|
76
|
+
# @option opts [Boolean] :has_chat Whether the players can discuss in a chat
|
77
|
+
# @option opts [String] :description Anything you want to tell players about the tournament
|
78
|
+
# @option opts [String] :password Make the tournament private, and restrict access with a password. You can also [generate user-specific entry codes](https://github.com/lishogi-org/api/tree/master/example/tournament-entry-code) based on this password.
|
79
|
+
# @option opts [String] :team_battle_by_team Set the ID of a team you lead to create a team battle. The other teams can be added using the [team battle edit endpoint](#operation/apiTournamentTeamBattlePost).
|
80
|
+
# @option opts [String] :conditions_team_member_team_id Restrict entry to members of a team. The teamId is the last part of a team URL, e.g. `https://lishogi.org/team/shogi-is-hard` has teamId = `shogi-is-hard`. Leave empty to let everyone join the tournament. Do not use this to create team battles, use `teamBattleByTeam` instead.
|
81
|
+
# @option opts [Integer] :conditions_min_rating_rating Minimum rating to join. Leave empty to let everyone join the tournament.
|
82
|
+
# @option opts [Integer] :conditions_max_rating_rating Maximum rating to join. Based on best rating reached in the last 7 days. Leave empty to let everyone join the tournament.
|
83
|
+
# @option opts [Integer] :conditions_nb_rated_game_nb Minimum number of rated games required to join.
|
84
|
+
# @return [Object]
|
85
|
+
describe 'api_tournament_post test' do
|
86
|
+
it 'should work' do
|
87
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
# unit tests for api_user_name_tournament_created
|
92
|
+
# Get tournaments created by a user
|
93
|
+
# Get all tournaments created by a given user. Tournaments are sorted by reverse chronological order of start date (last starting first). Tournaments are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON).
|
94
|
+
# @param username The user whose created tournaments to fetch
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [Integer] :status Include tournaments in the given status: \"Created\" (10), \"Started\" (20), \"Finished\" (30) You can add this parameter more than once to include tournaments in different statuses. Example: `?status=10&status=20`
|
97
|
+
# @return [Object]
|
98
|
+
describe 'api_user_name_tournament_created test' do
|
99
|
+
it 'should work' do
|
100
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# unit tests for games_by_tournament
|
105
|
+
# Export games of an Arena tournament
|
106
|
+
# Download games of a tournament in KIF or [ndjson](#section/Introduction/Streaming-with-ND-JSON) format. Games are sorted by reverse chronological order (most recent first). The game stream is throttled, depending on who is making the request: - Anonymous request: 20 games per second - [OAuth2 authenticated](#section/Authentication) request: 30 games per second
|
107
|
+
# @param id The tournament ID.
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @option opts [String] :player Only games of a particular player. Leave empty to fetch games of all players.
|
110
|
+
# @option opts [Boolean] :moves Include the KIF moves.
|
111
|
+
# @option opts [Boolean] :pgn_in_json Include the full KIF within the JSON response, in a `notation` field.
|
112
|
+
# @option opts [Boolean] :tags Include the KIF tags.
|
113
|
+
# @option opts [Boolean] :clocks Include clock comments in the KIF moves, when available. Example: `22 同 玉(51) (00:02/00:00:13)`
|
114
|
+
# @option opts [Boolean] :evals Include analysis evaluation comments in the KIF, when available. Example: `9 7八銀(79) * [%eval -1.48]`
|
115
|
+
# @return [Object]
|
116
|
+
describe 'games_by_tournament test' do
|
117
|
+
it 'should work' do
|
118
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# unit tests for results_by_tournament
|
123
|
+
# Get results of an Arena tournament
|
124
|
+
# Players of an Arena tournament, with their score and performance, sorted by rank (best first). **Players are streamed as [ndjson](#section/Introduction/Streaming-with-ND-JSON)**, i.e. one JSON object per line. If called on an ongoing tournament, results can be inconsistent due to ranking changes while the players are being streamed. Use on finished tournaments for guaranteed consistency.
|
125
|
+
# @param id The tournament ID.
|
126
|
+
# @param [Hash] opts the optional parameters
|
127
|
+
# @option opts [Integer] :nb Max number of players to fetch
|
128
|
+
# @return [Object]
|
129
|
+
describe 'results_by_tournament test' do
|
130
|
+
it 'should work' do
|
131
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# unit tests for teams_by_tournament
|
136
|
+
# Get team standing of a team battle
|
137
|
+
# Teams of a team battle tournament, with top players, sorted by rank (best first).
|
138
|
+
# @param id The tournament ID.
|
139
|
+
# @param [Hash] opts the optional parameters
|
140
|
+
# @return [Object]
|
141
|
+
describe 'teams_by_tournament test' do
|
142
|
+
it 'should work' do
|
143
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# unit tests for tournament
|
148
|
+
# Get info about an Arena tournament
|
149
|
+
# Get detailed info about recently finished, current, or upcoming tournament's duels, player standings, and other info.
|
150
|
+
# @param id The tournament ID.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [Float] :page Specify which page of player standings to view.
|
153
|
+
# @return [Object]
|
154
|
+
describe 'tournament test' do
|
155
|
+
it 'should work' do
|
156
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|
@@ -0,0 +1,154 @@
|
|
1
|
+
=begin
|
2
|
+
#Lishogi.org API reference
|
3
|
+
|
4
|
+
## Introduction Welcome to the reference for the Lishogi API! Lishogi is free/libre, open-source shogi server forked from lichess powered by volunteers and donations. Currently this page is a work in progress, certain information here might be wrong and incorrect! Expect it to be done during 2022. - Get help in the [Lishogi Discord channel](https://discord.gg/YFtpMGg3rR) - [Contribute to this documentation on Github](https://github.com/WandererXII/lishogi/blob/master/public/doc/lishogi-api.yaml) - Check out [Lishogi widgets to embed in your website](https://lishogi.org/developers) ## Endpoint All requests go to `https://lishogi.org` (unless otherwise specified). ## Rate limiting All requests are rate limited using various strategies, to ensure the API remains responsive for everyone. Only make one request at a time. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. ## Streaming with ND-JSON Some API endpoints stream their responses as [Newline Delimited JSON a.k.a. **nd-json**](http://ndjson.org/), with one JSON object per line. Here's a [JavaScript utility function (for lichess)](https://gist.github.com/ornicar/a097406810939cf7be1df8ea30e94f3e) to help reading NDJSON streamed responses.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: contact@lishogi.org
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.10.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Lishogi::BoardApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'BoardApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Lishogi::BoardApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of BoardApi' do
|
30
|
+
it 'should create an instance of BoardApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(Lishogi::BoardApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for api_board_seek
|
36
|
+
# Create a seek
|
37
|
+
# Create a public seek, to start a game with a random player. ### Real-time seek Specify the `time`, `increment`, `byoyomi` and `periods` clock values. The response is streamed but doesn't contain any information. **Keep the connection open to keep the seek active**. If the client closes the connection, the seek is canceled. This way, if the client terminates, the user won't be paired in a game they wouldn't play. When the seek is accepted, or expires, the server closes the connection. **Make sure to also have an [Event stream](#operation/apiStreamEvent) open**, to be notified when a game starts. We recommend opening the [Event stream](#operation/apiStreamEvent) first, then the seek stream. This way, you won't miss the game event if the seek is accepted immediately. ### Correspondence seek Specify the `days` per turn value. The response is not streamed, it immediately completes with the seek ID. The seek remains active on the server until it is joined by someone.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [Boolean] :rated Whether the game is rated and impacts players ratings.
|
40
|
+
# @option opts [Float] :time Clock initial time in minutes. Required for real-time seeks.
|
41
|
+
# @option opts [Integer] :increment Clock increment in seconds. Required for real-time seeks.
|
42
|
+
# @option opts [Integer] :byoyomi Clock byoyomi in seconds. Required for real-time seeks.
|
43
|
+
# @option opts [Integer] :periods Clock periods for byoyomi in seconds. Required for real-time seeks.
|
44
|
+
# @option opts [Integer] :days Days per turn. Required for correspondence seeks.
|
45
|
+
# @option opts [VariantKey] :variant
|
46
|
+
# @option opts [String] :color The color to play. Better left empty to automatically get a random color.
|
47
|
+
# @option opts [String] :rating_range The rating range of potential opponents. Better left empty. Example: 1500-1800
|
48
|
+
# @return [nil]
|
49
|
+
describe 'api_board_seek test' do
|
50
|
+
it 'should work' do
|
51
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# unit tests for api_stream_event
|
56
|
+
# Stream incoming events
|
57
|
+
# Stream the events reaching a lishogi user in real time as [ndjson](#section/Introduction/Streaming-with-ND-JSON). Each line is a JSON object containing a `type` field. Possible values are: - `gameStart` Start of a game - `gameFinish` Completion of a game - `challenge` A player sends you a challenge or you challenge someone - `challengeDeclined` The opponent declines your challenge When the stream opens, all current challenges and games are sent.
|
58
|
+
# @param [Hash] opts the optional parameters
|
59
|
+
# @return [ApiStreamEvent200Response]
|
60
|
+
describe 'api_stream_event test' do
|
61
|
+
it 'should work' do
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# unit tests for board_game_abort
|
67
|
+
# Abort a game
|
68
|
+
# Abort a game being played with the Board API.
|
69
|
+
# @param game_id
|
70
|
+
# @param [Hash] opts the optional parameters
|
71
|
+
# @return [Ok]
|
72
|
+
describe 'board_game_abort test' do
|
73
|
+
it 'should work' do
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# unit tests for board_game_chat_get
|
79
|
+
# Fetch the game chat
|
80
|
+
# Get the messages posted in the game chat
|
81
|
+
# @param game_id
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @return [Object]
|
84
|
+
describe 'board_game_chat_get test' do
|
85
|
+
it 'should work' do
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# unit tests for board_game_chat_post
|
91
|
+
# Write in the chat
|
92
|
+
# Post a message to the player or spectator chat, in a game being played with the Board API.
|
93
|
+
# @param game_id
|
94
|
+
# @param room
|
95
|
+
# @param text
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Ok]
|
98
|
+
describe 'board_game_chat_post test' do
|
99
|
+
it 'should work' do
|
100
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# unit tests for board_game_move
|
105
|
+
# Make a Board move
|
106
|
+
# Make a move in a game being played with the Board API.
|
107
|
+
# @param game_id
|
108
|
+
# @param move The move to play, in USI format
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @return [Ok]
|
111
|
+
describe 'board_game_move test' do
|
112
|
+
it 'should work' do
|
113
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# unit tests for board_game_resign
|
118
|
+
# Resign a game
|
119
|
+
# Resign a game being played with the Board API.
|
120
|
+
# @param game_id
|
121
|
+
# @param [Hash] opts the optional parameters
|
122
|
+
# @return [Ok]
|
123
|
+
describe 'board_game_resign test' do
|
124
|
+
it 'should work' do
|
125
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# unit tests for board_game_stream
|
130
|
+
# Stream Board game state
|
131
|
+
# Stream the state of a game being played with the Board API, as [ndjson](#section/Introduction/Streaming-with-ND-JSON). Use this endpoint to get updates about the game in real-time, with a single request. Each line is a JSON object containing a `type` field. Possible values are: - `gameFull` Full game data. All values are immutable, except for the `state` field. - `gameState` Current state of the game. Immutable values not included. Sent when a move is played, or when the game ends. - `chatLine` Chat message sent by a user in the `room` \"player\" or \"spectator\". The first line is always of type `gameFull`. The server closes the stream when the game ends, or if the game has already ended.
|
132
|
+
# @param game_id
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @return [BoardGameStream200Response]
|
135
|
+
describe 'board_game_stream test' do
|
136
|
+
it 'should work' do
|
137
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# unit tests for board_game_takeback
|
142
|
+
# Handle takeback offers
|
143
|
+
# Create/accept/decline takebacks. - `yes`: Propose a takeback, or accept the opponent's takeback offer. - `no`: Decline a takeback offer from the opponent.
|
144
|
+
# @param game_id
|
145
|
+
# @param accept
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Ok]
|
148
|
+
describe 'board_game_takeback test' do
|
149
|
+
it 'should work' do
|
150
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|