source: vendor/google/apiclient-services/src/Games/Resource/Leaderboards.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 2.5 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\Leaderboard;
21use Google\Service\Games\LeaderboardListResponse;
22
23/**
24 * The "leaderboards" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $gamesService = new Google\Service\Games(...);
28 * $leaderboards = $gamesService->leaderboards;
29 * </code>
30 */
31class Leaderboards extends \Google\Service\Resource
32{
33 /**
34 * Retrieves the metadata of the leaderboard with the given ID.
35 * (leaderboards.get)
36 *
37 * @param string $leaderboardId The ID of the leaderboard.
38 * @param array $optParams Optional parameters.
39 *
40 * @opt_param string language The preferred language to use for strings returned
41 * by this method.
42 * @return Leaderboard
43 * @throws \Google\Service\Exception
44 */
45 public function get($leaderboardId, $optParams = [])
46 {
47 $params = ['leaderboardId' => $leaderboardId];
48 $params = array_merge($params, $optParams);
49 return $this->call('get', [$params], Leaderboard::class);
50 }
51 /**
52 * Lists all the leaderboard metadata for your application.
53 * (leaderboards.listLeaderboards)
54 *
55 * @param array $optParams Optional parameters.
56 *
57 * @opt_param string language The preferred language to use for strings returned
58 * by this method.
59 * @opt_param int maxResults The maximum number of leaderboards to return in the
60 * response. For any response, the actual number of leaderboards returned may be
61 * less than the specified `maxResults`.
62 * @opt_param string pageToken The token returned by the previous request.
63 * @return LeaderboardListResponse
64 * @throws \Google\Service\Exception
65 */
66 public function listLeaderboards($optParams = [])
67 {
68 $params = [];
69 $params = array_merge($params, $optParams);
70 return $this->call('list', [$params], LeaderboardListResponse::class);
71 }
72}
73
74// Adding a class alias for backwards compatibility with the previous class name.
75class_alias(Leaderboards::class, 'Google_Service_Games_Resource_Leaderboards');
Note: See TracBrowser for help on using the repository browser.