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