Method: stats.get
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回当前已通过身份验证的用户在此应用中的互动度和支出统计信息。
HTTP 请求
GET https://games.googleapis.com/games/v1/stats
响应正文
第三方统计信息资源。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"churn_probability": number,
"num_purchases": integer,
"spend_percentile": number,
"days_since_last_played": integer,
"num_sessions": integer,
"num_sessions_percentile": number,
"avg_session_length_minutes": number,
"spend_probability": number,
"high_spender_probability": number,
"total_spend_next_28_days": number,
"kind": string
} |
字段 |
churn_probability |
number
玩家在次日不回来玩游戏的概率。例如0、0.1、0.5、...、1.0。如果信息不足,则不会填充。
|
num_purchases |
integer
玩家在此游戏中进行的应用内购买交易数量。例如0、1、5、10、... 。如果信息不足,则不会填充。
|
spend_percentile |
number
玩家在此游戏中的消费百分位近似值。例如0、0.25、0.5、0.75。如果信息不足,则不会填充。
|
days_since_last_played |
integer
距离玩家上次玩此游戏的天数。例如0、1、5、10、... 。如果信息不足,则不会填充。
|
num_sessions |
integer
玩家在过去 28 天内的大致会话次数。会话从玩家连接到 Play 游戏服务时开始,到玩家断开连接时结束。例如0、1、5、10、... 。如果信息不足,则不会填充。
|
num_sessions_percentile |
number
玩家在过去 30 天内的会话百分比的近似值,其中会话从玩家连接到 Play 游戏服务时开始,到玩家断开连接时结束。例如0、0.25、0.5、0.75。如果信息不足,则不会填充。
|
avg_session_length_minutes |
number
玩家的平均会话时长(以分钟为单位)。例如1、30、60、... 。如果信息不足,则不会填充。
|
spend_probability |
number
玩家在未来 7 天内消费的概率。例如0、0.25、0.50、0.75。如果信息不足,则不会填充。
|
high_spender_probability |
number
玩家将超出阈值金额的消费概率。例如0、0.25、0.50、0.75。如果信息不足,则不会填充。
|
total_spend_next_28_days |
number
玩家未来 28 天预计的消费金额。例如1、30、60、... 。如果信息不足,则不会填充。
|
kind |
string
唯一标识此资源的类型。值始终为固定字符串 games#statsResponse 。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
如需了解详情,请参阅 OAuth 2.0 概览。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Method: stats.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.PlayerStats.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns engagement and spend statistics in this application for the currently authenticated user.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/stats`\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA third party stats resource.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"churn_probability\": number, \"num_purchases\": integer, \"spend_percentile\": number, \"days_since_last_played\": integer, \"num_sessions\": integer, \"num_sessions_percentile\": number, \"avg_session_length_minutes\": number, \"spend_probability\": number, \"high_spender_probability\": number, \"total_spend_next_28_days\": number, \"kind\": string } ``` |\n\n| Fields ||\n|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `churn_probability` | `number` The probability of the player not returning to play the game in the next day. E.g., 0, 0.1, 0.5, ..., 1.0. Not populated if there is not enough information. |\n| `num_purchases` | `integer` Number of in-app purchases made by the player in this game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. |\n| `spend_percentile` | `number` The approximate spend percentile of the player in this game. E.g., 0, 0.25, 0.5, 0.75. Not populated if there is not enough information. |\n| `days_since_last_played` | `integer` Number of days since the player last played this game. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. |\n| `num_sessions` | `integer` The approximate number of sessions of the player within the last 28 days, where a session begins when the player is connected to Play Games Services and ends when they are disconnected. E.g., 0, 1, 5, 10, ... . Not populated if there is not enough information. |\n| `num_sessions_percentile` | `number` The approximation of the sessions percentile of the player within the last 30 days, where a session begins when the player is connected to Play Games Services and ends when they are disconnected. E.g., 0, 0.25, 0.5, 0.75. Not populated if there is not enough information. |\n| `avg_session_length_minutes` | `number` Average session length in minutes of the player. E.g., 1, 30, 60, ... . Not populated if there is not enough information. |\n| `spend_probability` | `number` The probability of the player going to spend the game in the next seven days. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information. |\n| `high_spender_probability` | `number` The probability of the player going to spend beyond a threshold amount of money. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough information. |\n| `total_spend_next_28_days` | `number` The predicted amount of money that the player going to spend in the next 28 days. E.g., 1, 30, 60, ... . Not populated if there is not enough information. |\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#statsResponse`. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/games`\n- `\n https://www.googleapis.com/auth/games_lite`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]