Hi there!
This is a very very newbie topic!
I would like to retrieve some data from OGS in order to make some chart. For now I would be happy to get my data (games, players involved, who won, board size and so on).
Thanks to @S_Alexander I got the very basic of it:
- I can ask the server using a http GET request (never heard of before)
- Answer can be in json format (never heard of before)
- In order to do this I have to send a sort of URL to the server (wow, sounds easy)
- Example of this URL can be found on the apiary (well, some seems broken, see later)
- They can be cheched using any browser (this is really easy)
- Answers can easily become HUGE
- So be careful not to overload server
- It could be necessary some sort of authentication to state that youāre not trying to hack or crash the server
Here is an example:
- I went to the apiary looking for something easy to check. Found this āconciste-player-listā (BTW, is that english?)
https://ogs.docs.apiary.io/#reference/players/list-players/conciste-player-list - I copied the link
- and tried it in my browser: āpage not foundā (here it is: seems broken)
- then I added āapiā in the url and it worked
https://online-go.com/api/v1/players/ - Answer is made of 54376 pages
Ok, leave this for later. Letās find something easier!
A single game.
Apiary URL still misses the āapiā keyword, but now I know.
So hereās the data:
https://online-go.com/api/v1/games/13240061
Now for the big question: how can I submit this request other than with my browser?
Some uses python, but I donāt.
Iām trying to use FME, which is a software I use at work.
Itās very nice and user friendly and is specific for retrieving, modifying and storing data.
I never used before the FME āHTTP Callerā but I can learn. So I did and it worked!
Now I know how to:
- Send an http GET request
- flatten the json
- extract attributes that I want to
- store them in any database format that I like
So why am I here, still asking for help?
Well, Iām a kind of sorcererās apprentice who can easily make disasters, so I would be careful.
Also, I think my story can be useful to others.
But letās focus on the ācarefulā thing!
- I didnāt use authentication 'til now. Should I?
If I should: I didnāt understand the ātokenā thing, whatās the āDeveloper portalā and so on
https://ogs.docs.apiary.io/#reference/authentication/request-a-user-token - what can I do not to overload the server? How many data can I retrieve without doing harm (and possibly being kicked off)?
The 54376 pages of the playerās list, for instance, will it be too much?
Also, is it splitted in to pages only for the browser or also via direct GET request?
I dare not to just try because I donāt want too many brooms flooding my cavern.
Can anybody help me?