I am creating OGS client for Ubuntu Touch(yeah, Ubuntu will be working on mobile devices soon )
In this topic I want to ask questions that will arise in the process.
As I’m new to this, any help, advice and suggestions are very welcome)
So first I wanted to ask 2 things:
Are there any open source examples of interacting with OGS API?
It would be very helpful to be able to look at some code examples.
How do I start a game with a bot using the API?
I’ve found that you can challenge a player to a game like this.
Is starting a game with a bot somewhat similar?
There aren’t any specific examples I don’t think of using the api directly but since it is a rest api the interaction is actually not too difficult. A really excellent python library to use is the requests library
If you want to play a bot through the api then you can challenge them directly with the link that you posted and then play out moves through the game movement which is an endpoint unto itself in the api (you can get the list of moves by running a GET request against the game directly)
If you want to write a bot, as an alternative, we have a gtp wrapper:
Good luck! I’m happy to answer any api related questions you may have… I’m always very excited to see how folks make use of the api
I’ve got one more question.
I’m trying to challenge Fuego bot for a game, but it doesn’t work.
When I’m using XMLHttpRequest() it returns Status 0 and empty body.