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 |
|
---|
18 | namespace Google\Service\GamesManagement\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\GamesManagement\PlayerScoreResetAllResponse;
|
---|
21 | use Google\Service\GamesManagement\PlayerScoreResetResponse;
|
---|
22 | use Google\Service\GamesManagement\ScoresResetMultipleForAllRequest;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "scores" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $gamesManagementService = new Google\Service\GamesManagement(...);
|
---|
29 | * $scores = $gamesManagementService->scores;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class Scores extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Resets scores for the leaderboard with the given ID for the currently
|
---|
36 | * authenticated player. This method is only accessible to whitelisted tester
|
---|
37 | * accounts for your application. (scores.reset)
|
---|
38 | *
|
---|
39 | * @param string $leaderboardId The ID of the leaderboard.
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | * @return PlayerScoreResetResponse
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function reset($leaderboardId, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['leaderboardId' => $leaderboardId];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('reset', [$params], PlayerScoreResetResponse::class);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Resets all scores for all leaderboards for the currently authenticated
|
---|
52 | * players. This method is only accessible to whitelisted tester accounts for
|
---|
53 | * your application. (scores.resetAll)
|
---|
54 | *
|
---|
55 | * @param array $optParams Optional parameters.
|
---|
56 | * @return PlayerScoreResetAllResponse
|
---|
57 | * @throws \Google\Service\Exception
|
---|
58 | */
|
---|
59 | public function resetAll($optParams = [])
|
---|
60 | {
|
---|
61 | $params = [];
|
---|
62 | $params = array_merge($params, $optParams);
|
---|
63 | return $this->call('resetAll', [$params], PlayerScoreResetAllResponse::class);
|
---|
64 | }
|
---|
65 | /**
|
---|
66 | * Resets scores for all draft leaderboards for all players. This method is only
|
---|
67 | * available to user accounts for your developer console.
|
---|
68 | * (scores.resetAllForAllPlayers)
|
---|
69 | *
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | * @throws \Google\Service\Exception
|
---|
72 | */
|
---|
73 | public function resetAllForAllPlayers($optParams = [])
|
---|
74 | {
|
---|
75 | $params = [];
|
---|
76 | $params = array_merge($params, $optParams);
|
---|
77 | return $this->call('resetAllForAllPlayers', [$params]);
|
---|
78 | }
|
---|
79 | /**
|
---|
80 | * Resets scores for the leaderboard with the given ID for all players. This
|
---|
81 | * method is only available to user accounts for your developer console. Only
|
---|
82 | * draft leaderboards can be reset. (scores.resetForAllPlayers)
|
---|
83 | *
|
---|
84 | * @param string $leaderboardId The ID of the leaderboard.
|
---|
85 | * @param array $optParams Optional parameters.
|
---|
86 | * @throws \Google\Service\Exception
|
---|
87 | */
|
---|
88 | public function resetForAllPlayers($leaderboardId, $optParams = [])
|
---|
89 | {
|
---|
90 | $params = ['leaderboardId' => $leaderboardId];
|
---|
91 | $params = array_merge($params, $optParams);
|
---|
92 | return $this->call('resetForAllPlayers', [$params]);
|
---|
93 | }
|
---|
94 | /**
|
---|
95 | * Resets scores for the leaderboards with the given IDs for all players. This
|
---|
96 | * method is only available to user accounts for your developer console. Only
|
---|
97 | * draft leaderboards may be reset. (scores.resetMultipleForAllPlayers)
|
---|
98 | *
|
---|
99 | * @param ScoresResetMultipleForAllRequest $postBody
|
---|
100 | * @param array $optParams Optional parameters.
|
---|
101 | * @throws \Google\Service\Exception
|
---|
102 | */
|
---|
103 | public function resetMultipleForAllPlayers(ScoresResetMultipleForAllRequest $postBody, $optParams = [])
|
---|
104 | {
|
---|
105 | $params = ['postBody' => $postBody];
|
---|
106 | $params = array_merge($params, $optParams);
|
---|
107 | return $this->call('resetMultipleForAllPlayers', [$params]);
|
---|
108 | }
|
---|
109 | }
|
---|
110 |
|
---|
111 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
112 | class_alias(Scores::class, 'Google_Service_GamesManagement_Resource_Scores');
|
---|