API for active games?

Hello,

Does anyone know if there is a simple way to get a list of just the active games through the API?
I managed to get a list of all games (paging through megames), but that seems inefficient to me.

I am trying to get my head around the OGS API. Please forgive me, if my questions are stupid.

2 Likes

Not a stupid question at all. For these paginated table things, you can use query parameters to filter.

Try this:

me/games?ended__isnull=true
2 Likes

You can also try the ui/overview endpoint, as is done here:

1 Like

thanks, that works like a charm!
is there some documentation available for features like this?

1 Like

that is also cool. makes me even more wonder if there is a place where i can look up available commands.

1 Like

Use the source, Luke …

:smiley:

3 Likes

Not that I’m aware of, but if you are determined, you could search search the online-go repo linked above for PaginatedTable. The filter and sort_order props would be your examples. You can also just open developer tools whenever you see a table and see what shows up in the Network tab :slight_smile:

I think __gte __eq __lt etc work too.

2 Likes

Ok, thanks. I will see what i can dig up in the sources :slight_smile:

This is perhaps the far more pragmatic suggestion. It just doesn’t sound as good:

“Use the network tab, Luke” :thinking:

3 Likes

Especially when the jedi apprentice never looked at any network tab before :blush:

In that case the open developer tools hint is quite helpful.

Little wannabe jedi might also be confuzed by the fact that his name isn’t Luke :laughing:

2 Likes

I rekcon you’re heading for a world of reverse engineering joy, once you sift out the trash in the network tab from the gold :smiley:

1 Like