Skip to content

Backend API Call to get all games associated with a user? #2217

Answered by anoek
ThomasMeli asked this question in Q&A
Discussion options

You must be logged in to vote

Sounds like a great project!

That is indeed the endpoint, simply do a web request to it and you'll get a JSON blob back. You'll probably want to apply the same filters as we apply in the interface to filter out any uploaded SGFS and whatnot, that looks like:

https://online-go.com/api/v1/players/PLAYERID/games/?page_size=10&page=1&source=play&ended__isnull=false&ordering=-ended

Replacing PLAYERID with whatever user id you want of course.

You can view that url in the browser and it'll give you a pretty interface with the JSON dump, when you do a request from a non web browser (your application for instance), it'll come back as just plain JSON so you can parse it easily.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ThomasMeli
Comment options

Answer selected by ThomasMeli
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants