New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lishogi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lishogi

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

lishogi

Lishogi - the Ruby gem for the Lishogi.org API reference

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
  • Contribute to this documentation on Github
  • Check out Lishogi widgets to embed in your website

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, 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, with one JSON object per line.

Here's a JavaScript utility function (for lichess) to help reading NDJSON streamed responses.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • Package version: 0.1.0
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://lishogi.org/api

Installation

Build a gem

To build the Ruby code into a gem:

gem build lishogi.gemspec

Then either install the gem locally:

gem install ./lishogi-0.1.0.gem

(for development, run gem install --dev ./lishogi-0.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'lishogi', '~> 0.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'lishogi', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'lishogi'

# Setup authorization
Lishogi.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2
  config.access_token = 'YOUR ACCESS TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
  # Configure faraday connection
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end

api_instance = Lishogi::AccountApi.new

begin
  #Get my preferences
  result = api_instance.account
  p result
rescue Lishogi::ApiError => e
  puts "Exception when calling AccountApi->account: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://lishogi.org

ClassMethodHTTP requestDescription
Lishogi::AccountApiaccountGET /api/account/preferencesGet my preferences
Lishogi::AccountApiaccount_emailGET /api/account/emailGet my email address
Lishogi::AccountApiaccount_kidGET /api/account/kidGet my kid mode status
Lishogi::AccountApiaccount_kid_postPOST /api/account/kidSet my kid mode status
Lishogi::AccountApiaccount_meGET /api/accountGet my profile
Lishogi::AnalysisApiapi_cloud_evalGET /api/cloud-evalGet cloud evaluation of a position.
Lishogi::ArenaTournamentsApiapi_team_arenaGET /api/team/{teamId}/arenaGet team Arena tournaments
Lishogi::ArenaTournamentsApiapi_tournamentGET /api/tournamentGet current tournaments
Lishogi::ArenaTournamentsApiapi_tournament_postPOST /api/tournamentCreate a new Arena tournament
Lishogi::ArenaTournamentsApiapi_user_name_tournament_createdGET /api/user/{username}/tournament/createdGet tournaments created by a user
Lishogi::ArenaTournamentsApigames_by_tournamentGET /api/tournament/{id}/gamesExport games of an Arena tournament
Lishogi::ArenaTournamentsApiresults_by_tournamentGET /api/tournament/{id}/resultsGet results of an Arena tournament
Lishogi::ArenaTournamentsApiteams_by_tournamentGET /api/tournament/{id}/teamsGet team standing of a team battle
Lishogi::ArenaTournamentsApitournamentGET /api/tournament/{id}Get info about an Arena tournament
Lishogi::BoardApiapi_board_seekPOST /api/board/seekCreate a seek
Lishogi::BoardApiapi_stream_eventGET /api/stream/eventStream incoming events
Lishogi::BoardApiboard_game_abortPOST /api/board/game/{gameId}/abortAbort a game
Lishogi::BoardApiboard_game_chat_getGET /api/board/game/{gameId}/chatFetch the game chat
Lishogi::BoardApiboard_game_chat_postPOST /api/board/game/{gameId}/chatWrite in the chat
Lishogi::BoardApiboard_game_movePOST /api/board/game/{gameId}/move/{move}Make a Board move
Lishogi::BoardApiboard_game_resignPOST /api/board/game/{gameId}/resignResign a game
Lishogi::BoardApiboard_game_streamGET /api/board/game/stream/{gameId}Stream Board game state
Lishogi::BoardApiboard_game_takebackPOST /api/board/game/{gameId}/takeback/{accept}Handle takeback offers
Lishogi::BotApiapi_bot_onlineGET /api/bot/onlineGet online bots
Lishogi::BotApiapi_stream_eventGET /api/stream/eventStream incoming events
Lishogi::BotApibot_account_upgradePOST /api/bot/account/upgradeUpgrade to Bot account
Lishogi::BotApibot_game_abortPOST /api/bot/game/{gameId}/abortAbort a game
Lishogi::BotApibot_game_chatPOST /api/bot/game/{gameId}/chatWrite in the chat
Lishogi::BotApibot_game_chat_getGET /api/bot/game/{gameId}/chatFetch the game chat
Lishogi::BotApibot_game_movePOST /api/bot/game/{gameId}/move/{move}Make a Bot move
Lishogi::BotApibot_game_resignPOST /api/bot/game/{gameId}/resignResign a game
Lishogi::BotApibot_game_streamGET /api/bot/game/stream/{gameId}Stream Bot game state
Lishogi::ChallengesApichallenge_acceptPOST /api/challenge/{challengeId}/acceptAccept a challenge
Lishogi::ChallengesApichallenge_aiPOST /api/challenge/aiChallenge the AI
Lishogi::ChallengesApichallenge_createPOST /api/challenge/{username}Create a challenge
Lishogi::ChallengesApichallenge_declinePOST /api/challenge/{challengeId}/declineDecline a challenge
Lishogi::ChallengesApichallenge_openPOST /api/challenge/openOpen-ended challenge
Lishogi::GamesApiapi_account_playingGET /api/account/playingGet my ongoing games
Lishogi::GamesApiapi_games_userGET /api/games/user/{username}Export games of a user
Lishogi::GamesApiapi_user_current_gameGET /api/user/{username}/current-gameExport ongoing game of a user
Lishogi::GamesApigame_kifGET /game/export/{gameId}Export one game
Lishogi::GamesApigames_by_usersPOST /api/stream/games-by-usersStream games of users
Lishogi::GamesApistream_gameGET /api/stream/game/{id}Stream moves of a game
Lishogi::MessagingApiinbox_usernamePOST /inbox/{username}Send a private message
Lishogi::PuzzlesApiapi_puzzle_activityGET /api/puzzle/activityGet your puzzle activity
Lishogi::PuzzlesApiapi_puzzle_dailyGET /api/puzzle/dailyGet the daily puzzle
Lishogi::PuzzlesApiapi_puzzle_dashboardGET /api/puzzle/dashboard/{days}Get your puzzle dashboard
Lishogi::SimulsApiapi_simulGET /api/simulGet current simuls
Lishogi::StudiesApistudy_all_chapters_kifGET /api/study/{studyId}.kifExport all chapters
Lishogi::StudiesApistudy_chapter_kifGET /study/{studyId}/{chapterId}.kifExport one study chapter
Lishogi::StudiesApistudy_export_all_kifGET /study/by/{username}/export.kifExport all studies of a user
Lishogi::TVApitv_channel_gamesGET /api/tv/{channel}Get best ongoing games of a TV channel
Lishogi::TVApitv_channelsGET /api/tv/channelsGet current TV games
Lishogi::TVApitv_feedGET /api/tv/feedStream current TV game
Lishogi::TeamsApiapi_team_arenaGET /api/team/{teamId}/arenaGet team Arena tournaments
Lishogi::TeamsApiteam_allGET /api/team/allGet popular teams
Lishogi::TeamsApiteam_id_joinPOST /team/{teamId}/joinJoin a team
Lishogi::TeamsApiteam_id_kick_user_idPOST /team/{teamId}/kick/{userId}Kick a user from your team
Lishogi::TeamsApiteam_id_pm_allPOST /team/{teamId}/pm-allMessage all members
Lishogi::TeamsApiteam_id_quitPOST /team/{teamId}/quitLeave a team
Lishogi::TeamsApiteam_id_usersGET /api/team/{teamId}/usersGet members of a team
Lishogi::TeamsApiteam_of_usernameGET /api/team/of/{username}Teams of a player
Lishogi::TeamsApiteam_searchGET /api/team/searchSearch teams
Lishogi::TeamsApiteam_showGET /api/team/{teamId}Get a single team
Lishogi::UsersApiapi_crosstableGET /api/crosstable/{user1}/{user2}Get crosstable
Lishogi::UsersApiapi_userGET /api/user/{username}Get user public data
Lishogi::UsersApiapi_user_activityGET /api/user/{username}/activityGet user activity
Lishogi::UsersApiapi_user_rating_historyGET /api/user/{username}/rating-historyGet rating history of a user
Lishogi::UsersApiapi_usersPOST /api/usersGet users by ID
Lishogi::UsersApiapi_users_statusGET /api/users/statusGet real-time users status
Lishogi::UsersApiplayerGET /playerGet all top 10
Lishogi::UsersApiplayer_top_nb_perf_typeGET /player/top/{nb}/{perfType}Get one leaderboard
Lishogi::UsersApistreamer_liveGET /streamer/liveGet live streamers
Lishogi::UsersApiteam_id_usersGET /api/team/{teamId}/usersGet members of a team

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

OAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://lishogi.org/oauth
  • Scopes:
    • preference:read: Read your preferences
    • preference:write: Write your preferences
    • email:read: Read your email address
    • challenge:read: Read incoming challenges
    • challenge:write: Create, accept, decline challenges
    • study:read: Read private studies
    • study:write: Create, update and delete studies
    • tournament:write: Create tournaments
    • puzzle:read: Read puzzle activity
    • team:write: Join, leave, and manage teams
    • msg:write: Send private messages to other players
    • board:play: Play with the Board API
    • bot:play: Play with the Bot API. Only for Bot accounts

FAQs

Package last updated on 01 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc