问题
I have an android game configured with Google Play Games API. API works perfectly and user can sign in, use leaderboard, earn achievements, etc. Now i want to access Player details if possible like email, name, age who are already signed in the game. I am doing this right now from the app itself, what if i want to access this data remotely?
Also is this possible to get all connected player details even without having their individually Player ID
? For example, Getting a list of all the users who are signed in through web?
回答1:
From here: https://developers.google.com/games/services/web/api/players/get
You need to send an HTTP GET request with playerId as
GET https://www.googleapis.com/games/v1/players/playerId
This request requires authorization with the following scope
https://www.googleapis.com/auth/games
If successful, this method returns a Players resource in the response body.
Here's the JSON template for a Player resource:
https://developers.google.com/games/services/web/api/players#resource
来源:https://stackoverflow.com/questions/35379231/get-player-details-from-google-play-games-service-storage