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?)
- 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
- 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:
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
- 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?