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