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\GamesConfiguration\Resource; 19 20use Google\Service\GamesConfiguration\LeaderboardConfiguration; 21use Google\Service\GamesConfiguration\LeaderboardConfigurationListResponse; 22 23/** 24 * The "leaderboardConfigurations" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $gamesConfigurationService = new Google\Service\GamesConfiguration(...); 28 * $leaderboardConfigurations = $gamesConfigurationService->leaderboardConfigurations; 29 * </code> 30 */ 31class LeaderboardConfigurations extends \Google\Service\Resource 32{ 33 /** 34 * Delete the leaderboard configuration with the given ID. 35 * (leaderboardConfigurations.delete) 36 * 37 * @param string $leaderboardId The ID of the leaderboard. 38 * @param array $optParams Optional parameters. 39 */ 40 public function delete($leaderboardId, $optParams = []) 41 { 42 $params = ['leaderboardId' => $leaderboardId]; 43 $params = array_merge($params, $optParams); 44 return $this->call('delete', [$params]); 45 } 46 /** 47 * Retrieves the metadata of the leaderboard configuration with the given ID. 48 * (leaderboardConfigurations.get) 49 * 50 * @param string $leaderboardId The ID of the leaderboard. 51 * @param array $optParams Optional parameters. 52 * @return LeaderboardConfiguration 53 */ 54 public function get($leaderboardId, $optParams = []) 55 { 56 $params = ['leaderboardId' => $leaderboardId]; 57 $params = array_merge($params, $optParams); 58 return $this->call('get', [$params], LeaderboardConfiguration::class); 59 } 60 /** 61 * Insert a new leaderboard configuration in this application. 62 * (leaderboardConfigurations.insert) 63 * 64 * @param string $applicationId The application ID from the Google Play 65 * developer console. 66 * @param LeaderboardConfiguration $postBody 67 * @param array $optParams Optional parameters. 68 * @return LeaderboardConfiguration 69 */ 70 public function insert($applicationId, LeaderboardConfiguration $postBody, $optParams = []) 71 { 72 $params = ['applicationId' => $applicationId, 'postBody' => $postBody]; 73 $params = array_merge($params, $optParams); 74 return $this->call('insert', [$params], LeaderboardConfiguration::class); 75 } 76 /** 77 * Returns a list of the leaderboard configurations in this application. 78 * (leaderboardConfigurations.listLeaderboardConfigurations) 79 * 80 * @param string $applicationId The application ID from the Google Play 81 * developer console. 82 * @param array $optParams Optional parameters. 83 * 84 * @opt_param int maxResults The maximum number of resource configurations to 85 * return in the response, used for paging. For any response, the actual number 86 * of resources returned may be less than the specified `maxResults`. 87 * @opt_param string pageToken The token returned by the previous request. 88 * @return LeaderboardConfigurationListResponse 89 */ 90 public function listLeaderboardConfigurations($applicationId, $optParams = []) 91 { 92 $params = ['applicationId' => $applicationId]; 93 $params = array_merge($params, $optParams); 94 return $this->call('list', [$params], LeaderboardConfigurationListResponse::class); 95 } 96 /** 97 * Update the metadata of the leaderboard configuration with the given ID. 98 * (leaderboardConfigurations.update) 99 * 100 * @param string $leaderboardId The ID of the leaderboard. 101 * @param LeaderboardConfiguration $postBody 102 * @param array $optParams Optional parameters. 103 * @return LeaderboardConfiguration 104 */ 105 public function update($leaderboardId, LeaderboardConfiguration $postBody, $optParams = []) 106 { 107 $params = ['leaderboardId' => $leaderboardId, 'postBody' => $postBody]; 108 $params = array_merge($params, $optParams); 109 return $this->call('update', [$params], LeaderboardConfiguration::class); 110 } 111} 112 113// Adding a class alias for backwards compatibility with the previous class name. 114class_alias(LeaderboardConfigurations::class, 'Google_Service_GamesConfiguration_Resource_LeaderboardConfigurations'); 115