REST Resource: snapshots
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:快照
JSON 表示法 |
{
"id": string,
"driveId": string,
"kind": string,
"type": enum (SnapshotType ),
"title": string,
"description": string,
"lastModifiedMillis": string,
"durationMillis": string,
"coverImage": {
object (SnapshotImage )
},
"uniqueName": string,
"progressValue": string
} |
字段 |
id |
string
快照的 ID。
|
driveId |
string
Drive API 中此快照底层文件的 ID。仅当快照是云端硬盘文件的视图且文件归调用方所有时,此字段才会显示。
|
kind |
string
唯一标识此资源的类型。值始终为固定字符串 games#snapshot 。
|
type |
enum (SnapshotType )
此快照的类型。
|
title |
string
此快照的标题。
|
description |
string
此快照的说明。
|
lastModifiedMillis |
string (int64 format)
此快照上次修改的时间戳(以自 Unix 纪元以来经历的毫秒数表示)。
|
durationMillis |
string (int64 format)
与此快照关联的时长(以毫秒为单位)。
|
coverImage |
object (SnapshotImage )
此快照的封面图片。如果没有图片,则可能不存在。
|
uniqueName |
string
创建快照时提供的唯一名称。
|
progressValue |
string (int64 format)
与此快照关联的进度值(由开发者设置的 64 位整数)。
|
SnapshotImage
JSON 表示法 |
{
"width": integer,
"height": integer,
"mime_type": string,
"url": string,
"kind": string
} |
字段 |
width |
integer
图片的宽度。
|
height |
integer
图片的高度。
|
mime_type |
string
图片的 MIME 类型。
|
url |
string
图片的网址。此网址随时都可能失效,因此不应缓存。
|
kind |
string
唯一标识此资源的类型。值始终为固定字符串 games#snapshotImage 。
|
方法 |
|
检索给定快照 ID 的元数据。 |
|
检索您的应用为与玩家 ID 对应的玩家创建的快照列表。 |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# REST Resource: snapshots\n\n- [Resource: Snapshot](#Snapshot)\n - [JSON representation](#Snapshot.SCHEMA_REPRESENTATION)\n- [SnapshotType](#SnapshotType)\n- [SnapshotImage](#SnapshotImage)\n - [JSON representation](#SnapshotImage.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Snapshot\n------------------\n\nAn snapshot object.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"driveId\": string, \"kind\": string, \"type\": enum (/games/services/web/api/rest/v1/snapshots#SnapshotType), \"title\": string, \"description\": string, \"lastModifiedMillis\": string, \"durationMillis\": string, \"coverImage\": { object (/games/services/web/api/rest/v1/snapshots#SnapshotImage) }, \"uniqueName\": string, \"progressValue\": string } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` The ID of the snapshot. |\n| `driveId` | `string` The ID of the file underlying this snapshot in the Drive API. Only present if the snapshot is a view on a Drive file and the file is owned by the caller. |\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#snapshot`. |\n| `type` | `enum (`[SnapshotType](/games/services/web/api/rest/v1/snapshots#SnapshotType)`)` The type of this snapshot. |\n| `title` | `string` The title of this snapshot. |\n| `description` | `string` The description of this snapshot. |\n| `lastModifiedMillis` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The timestamp (in millis since Unix epoch) of the last modification to this snapshot. |\n| `durationMillis` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The duration associated with this snapshot, in millis. |\n| `coverImage` | `object (`[SnapshotImage](/games/services/web/api/rest/v1/snapshots#SnapshotImage)`)` The cover image of this snapshot. May be absent if there is no image. |\n| `uniqueName` | `string` The unique name provided when the snapshot was created. |\n| `progressValue` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The progress value (64-bit integer set by developer) associated with this snapshot. |\n\nSnapshotType\n------------\n\nDefine supported snapshot types.\n\n| Enums ||\n|-------------|--------------------------------------|\n| `SAVE_GAME` | A snapshot representing a save game. |\n\nSnapshotImage\n-------------\n\nAn image of a snapshot.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------|\n| ``` { \"width\": integer, \"height\": integer, \"mime_type\": string, \"url\": string, \"kind\": string } ``` |\n\n| Fields ||\n|-------------|-----------------------------------------------------------------------------------------------------------------|\n| `width` | `integer` The width of the image. |\n| `height` | `integer` The height of the image. |\n| `mime_type` | `string` The MIME type of the image. |\n| `url` | `string` The URL of the image. This URL may be invalidated at any time and should not be cached. |\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#snapshotImage`. |\n\n| Methods ------- ||\n|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| ### [get](/games/services/web/api/rest/v1/snapshots/get) | Retrieves the metadata for a given snapshot ID. |\n| ### [list](/games/services/web/api/rest/v1/snapshots/list) | Retrieves a list of snapshots created by your application for the player corresponding to the player ID. |"]]