I would like to develop a python script to download all live games in progress, particularly I want to count user rankings so I can see a chart of when I have the best chance of getting games at different parts of the day.
My thoughts are to download the current list in progress every 10 minutes, build an array that counts the number of players at each K or Dan level and then work out the average per rank per hour over a 7 day period.
I have checked the docs again and it needs an auth token.
So far I have not managed to get my registered client / client secret to authorise.
I have raised various queries but have not seen any answers.
I’m not sure how to code the OGSClient to use a event handler for the sockets.
I have had a look at the example code.
What I dont understand is how I setup the socket and handler and then keep the python code running so that the handler gets called while the code keeps running.
Do I just do something like
ogs.socket_connect(ogs_event_handler)
sleep(1 hour) # allow handler to be called
ogs.socket_disconnect()