Saving clouds from a web page on Google Play Services

Is it possible to create and download cloud saves in Google Play services from a web page (via REST, I assume)? I can only find documentation for saved games for C ++ / Android code.

+5
source share
2 answers

You can check out "Get started with Play Games services for the web."

The REST API for Google Play games allows you to issue REST calls to set up and receive game service data from your web game. You can also use the management API to call REST to reset the game services and perform other administrative functions.

Note: Links to sample code were also provided on the page. For the games to work correctly, you need to configure your own versions in the Google Play Developer Console.

+2
source

All of these methods require authentication and authorization .

To retrieve a saved game from a REST API call :

https://www.googleapis.com/games/v1/snapshots/{ID of save} 

To get a list of saved games :

 https://www.googleapis.com/games/v1/players/{me | ID of player}/snapshots 

Saving the game is more messy, since you have to use the API drives to create the file:

 https://www.googleapis.com/upload/drive/v2/files 
+2
source

Source: https://habr.com/ru/post/1270672/


All Articles