从Google Play游戏服务存储中获取玩家详细信息 [英] Get player details from Google Play Games Service storage

查看:350
本文介绍了从Google Play游戏服务存储中获取玩家详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个配置有Google Play游戏API的Android游戏. API可以完美运行,并且用户可以登录,使用排行榜,获得成就等.现在,我想尽可能访问玩家详细信息,例如电子邮件,姓名,已经在游戏中登录的年龄. 我现在正在从应用程序本身执行此操作,如果我想远程访问此数据该怎么办?

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?

即使没有单独的Player ID,这是否也可能获取所有已连接的播放器详细信息?例如,获取通过Web登录的所有用户的列表吗?

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?

推荐答案

从此处:您需要发送一个具有playerId为

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

如果成功,此方法将在响应正文中返回Players资源.

If successful, this method returns a Players resource in the response body.

这是Player资源的JSON模板:

Here's the JSON template for a Player resource:

https://developers.google.com/games/services/web/api/players#resource

这篇关于从Google Play游戏服务存储中获取玩家详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆