All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Typehints to OGSClient args
- Ability to make calls to unauthenticated endpoints without a token
- Added
set_credentials()
method toOGSClient
to allow for setting credentials after instantiation - Methods requiring a token now check if the client is authenticated by calling
authed_endpoint()
1.3.0 - 2023-08-30
active_games()
method toOGSClient
to see your currently active games @benjaminpjones- Added
page
andpage_size
args touser_games()
to be able to effectively use the method @benjaminpjones py.typed
file to package directory to allow for downstream type-checking (#5) @benjaminpjones- Added type hints to all method arguments and method return types.
- Fixed loguru not disabling the correct logger, causing the
OGSClient
to still log to console even whenlogger.enable("ogsapi")
was never called.
1.2.0 - 2023-08-28
- Dont instantiate socket connection unless we need to
- Disable loguru logging by default, require user to enable and configure it (#4)
log_level
argument fromOGSClient
- Added documentation on how to configure loguru (#4)
- Fixed
POST
requests to the REST API not working correctly due to using data instead of json
1.1.3 - 2023-08-24
- Added additional tests for the REST API
- Added support for using dotenv for loading credentials for testing
- Added CI workflow for creating releases both in Gitlab and Github
- Added Changelog to mkdocs
- Added social href to README
- Added github sponsor link README
1.1.2 - 2023-08-16
- Added License shield to README
- Added GPL-3.0 License headers to all files
1.1.1 - 2023-08-15
- Updated pyproject file with relevant information
1.1.0 - 2023-08-15
- Added argument to log to file
- Added docstring for
InterceptHandler
1.0.0 - 2023-08-15
- Added
get_player_games
toOGSClient
. Gets list of games from a player - Added
loguru
as a logging backend - Added plenty of debug, info, success, and error logs to make troubleshooting hopefully easier
- Updated documentation to reflect logging changes
0.9.1 - 2023-08-15
- Refactored the
OGSGame
class to put the game and clock data into their own dataclasses respectively.
0.9.0 - 2023-08-02
- All realtime socket events are now being sent to two different event handlers, instead of one for each event. One for the realtime API in general, and one for each game you are connected to. See the Usage documentation for more details
- Added methods to
OGSClient
to manually connect and disconnect to the realtime API
0.8.0 - 2023-08-01
- The client no longer connects to the Realtime API by default, you must now manually call the socket_connect method to connect. This will make working with just the REST API easier, not having to deal with the Websocket
- Updated documentation to reflect that when using the Websocket, you are responsible for disconnecting from the server via socket_disconnect, otherwise a Keyboard Inturrupt will be required to close out
- Removed the redundant destructor on
OGSClient
that disconnected from the websocket, it wasnt working correctly, and now it will be the users responsibility anyway
0.7.3 - 2023-07-14
- Added methods for getting games as a PNG or SGF
- Added methods for getting list of game reviews for a game
- Create
OGSRestAPI
class for handling direct calls to API - Create
OGSCredentials
class for handling the user credentials - Move Socket token grabbing to
OGSRestAPI
0.7.2 - 2023-07-06
- OGSSClient now properly disconnects the OGSSocket from the realtime API to be able to close out without a KeyboardInturrupt
0.7.0 - 2023-07-06
- Fixed issues causing errors during import
- Removed circular dependency
- Moved class imports to local imports vs absolute
0.6.1 - 2023-06-29
- New socket functions for the following events
- pause/resume
- cancel game
- cancel / accept undo
- sending chat
- Refactored code to make the library more readable, with the large classes being broken into seperate files.
- Renamed primary file to client.py from api.py, chaning the import string to ogsapi.client
0.5.0 - 2023-05-02
- Added socket level callbacks for
error
andnotification
events - Added Game Phase change handler and callback
- Implemented proper challenge creation, You can now define the challenge settings, and send it out as an open challenge, or to a specific player.
- Fixed undo cancelled to be the British canceled. Thank you, @aureop!
0.4.1 - 2023-04-26
- Documentation improvements
0.4.0 - 2023-04-26
- Added relevant game data to the OGSGame class
- Implemented clock handling
- Implemented handling of undo actions
- Added asdict() method to OGSGame to get game data as a dict
- Added mkdocs documentation
- Remove printing of bearer token on connecting to API
0.3.0 - 2023-04-18
- Implemented ability to update user settings
- Added on move handling via callback functions
- Connecting to a game now returns the object, allowing for direct assignment
- Privated functions used only internally
- Updated docs
0.2.1 - 2023-04-04
- Set socketio to not log by default
0.2.0 - 2023-04-04
- Initial release