usgo / online-ratings

AGA Online Ratings protocol and implementation
MIT License
23 stars 12 forks source link

Add capability to provide a link back to the game server's record of the game #71

Open anoek opened 8 years ago

anoek commented 8 years ago

It'd be swell if game servers could provide a link back to the game, and for that link to show up somewhere within the ratings interface. This would be in addition to the recorded SGF.

In the case of OGS, this would allow users to easily pull up the game on OGS, look at any reviews that were done on that game and look at more detailed information that is lost when translating down to SGF (such as move timing, analysis messages in chat, link out to any applicable tournament view, explore the player's other games, challenge one of the players to a game, etc..)

brilee commented 8 years ago

That would be nifty indeed.

A thought: most go servers don't use web as the client. I'm not sure what a sane linking strategy would look like for these other servers.

anoek commented 8 years ago

For non web clients it should work the same, so long as their client registers an application to handle a custom URL scheme then they can provide you with a link that when clicked, will open up their application (presuming it's installed)

artasparks commented 7 years ago

So it seems like here the idea is to add a source_url field? It see

KGS has a URL scheme like so: http://files.gokgs.com/games/YYYY/MM/DD/some-game.sgf

Online Ratings has the scheme: https://online-go.com/api/v1/games/NUMERIC-ID/sgf

It's not super easy to download games from Tygem and I couldn't find anything for IGS. What's not clear to me is if this should open a viewer externally or if it should just download the SGF. It seems to me, that since we already have the game record, we might as well let the server decide to provide a useful link back to the server.

@brilee WDYT about adding a source URL?

artasparks commented 7 years ago

I.e., this would imply, at least for OGS, using https://online-go.com/game/NUMERIC-ID

rather than

https://online-go.com/api/v1/games/NUMERIC-ID/sgf

brilee commented 7 years ago

Our API submission requires uploading of the .sgf of the game, so we'll already have the sgf available for download. There's no need to redundantly host the sgf on OGS/tygem, etc. We just want to provide a link back to the OGS view of the game. So yes, https://online-go.com/game/NUMERIC-ID would be the way to go.

anoek commented 7 years ago

And I betcha there will be a decent solution for direct linking to a game on KGS now too with the advent of https://shin.gokgs.com/