source: vendor/google/apiclient-services/src/Games/Resource/Snapshots.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 3 weeks ago

Upload project files

  • Property mode set to 100644
File size: 2.7 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Games\Resource;
19
20use Google\Service\Games\Snapshot;
21use Google\Service\Games\SnapshotListResponse;
22
23/**
24 * The "snapshots" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $gamesService = new Google\Service\Games(...);
28 * $snapshots = $gamesService->snapshots;
29 * </code>
30 */
31class Snapshots extends \Google\Service\Resource
32{
33 /**
34 * Retrieves the metadata for a given snapshot ID. (snapshots.get)
35 *
36 * @param string $snapshotId The ID of the snapshot.
37 * @param array $optParams Optional parameters.
38 *
39 * @opt_param string language The preferred language to use for strings returned
40 * by this method.
41 * @return Snapshot
42 * @throws \Google\Service\Exception
43 */
44 public function get($snapshotId, $optParams = [])
45 {
46 $params = ['snapshotId' => $snapshotId];
47 $params = array_merge($params, $optParams);
48 return $this->call('get', [$params], Snapshot::class);
49 }
50 /**
51 * Retrieves a list of snapshots created by your application for the player
52 * corresponding to the player ID. (snapshots.listSnapshots)
53 *
54 * @param string $playerId A player ID. A value of `me` may be used in place of
55 * the authenticated player's ID.
56 * @param array $optParams Optional parameters.
57 *
58 * @opt_param string language The preferred language to use for strings returned
59 * by this method.
60 * @opt_param int maxResults The maximum number of snapshot resources to return
61 * in the response, used for paging. For any response, the actual number of
62 * snapshot resources returned may be less than the specified `maxResults`.
63 * @opt_param string pageToken The token returned by the previous request.
64 * @return SnapshotListResponse
65 * @throws \Google\Service\Exception
66 */
67 public function listSnapshots($playerId, $optParams = [])
68 {
69 $params = ['playerId' => $playerId];
70 $params = array_merge($params, $optParams);
71 return $this->call('list', [$params], SnapshotListResponse::class);
72 }
73}
74
75// Adding a class alias for backwards compatibility with the previous class name.
76class_alias(Snapshots::class, 'Google_Service_Games_Resource_Snapshots');
Note: See TracBrowser for help on using the repository browser.