How to get the 5 most recent completed games for a user?

Here are all the games in my account:

https://online-go.com/api/v1/players1084709/games

However, I would like to get the last 5 completed games out of this list. How would I do so?

What about something like

https://online-go.com/api/v1/players1084709/games?ended__isnull=0&ordering=-ended&page_size=5

or just the json

https://online-go.com/api/v1/players1084709/games?ended__isnull=0&ordering=-ended&page_size=5&format=json

Or the ones that weren’t annulled

https://online-go.com/api/v1/players1084709/games?ended__isnull=0&ordering=-ended&page_size=5&annulled=false

etc.

I don’t think all fields will necessarily be filterable however.

4 Likes