Latest games metadata

#1

Is there an api to get metadata for all games played in the last, say, 30 days? I don’t need the game records themselves, just the players’ names and some other metadata. I’m thinking of creating a visualisation of the ogs games network based on the games played in the last 30 days, to be updated once a day with the new games.

1 Like

#2

There is some documentation here: https://ogs.docs.apiary.io/#support

It ought to be able to do what you want, since G0tstats can get that info.

0 Likes

#3

I looked through those docs but I could not find what I was looking for. What gostats is doing is something like

curl -X GET “https://online-go.com/api/v1/players/296/games

to get some games of a user (with id 296 in this case).

It might be a bit too excessive to get all user ids and then execute get requests for each just to get the latest games metadata.

1 Like

#4

Because of the regular updates, I won’t need the data for the whole month of course. Just the games played in the last 24 hours would be sufficient.

0 Likes

#5

Yeah the whole API seems very user-id focussed. But what about

https://ogs.docs.apiary.io/#reference/games/list-and-filter-games/get-the-list-of-games

I couldn’t immediately see if this was only going to give you your “own” games if you are logged in, or if it gives you them all

0 Likes

#6

This looks promising

curl -X GET “https://online-go.com/api/v1/games/?ended__isnull=false&annulled=false&ordering=-ended&page_size=50

Similar to what Gotstats does. Would be interesting to know where they got the details for this request from.

I’m getting some games from 2106 and 2019. Nice.

0 Likes