source: vendor/google/apiclient-services/src/Games/Resource/Events.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 3.6 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\EventDefinitionListResponse;
21use Google\Service\Games\EventRecordRequest;
22use Google\Service\Games\EventUpdateResponse;
23use Google\Service\Games\PlayerEventListResponse;
24
25/**
26 * The "events" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $gamesService = new Google\Service\Games(...);
30 * $events = $gamesService->events;
31 * </code>
32 */
33class Events extends \Google\Service\Resource
34{
35 /**
36 * Returns a list showing the current progress on events in this application for
37 * the currently authenticated user. (events.listByPlayer)
38 *
39 * @param array $optParams Optional parameters.
40 *
41 * @opt_param string language The preferred language to use for strings returned
42 * by this method.
43 * @opt_param int maxResults The maximum number of events to return in the
44 * response, used for paging. For any response, the actual number of events to
45 * return may be less than the specified maxResults.
46 * @opt_param string pageToken The token returned by the previous request.
47 * @return PlayerEventListResponse
48 * @throws \Google\Service\Exception
49 */
50 public function listByPlayer($optParams = [])
51 {
52 $params = [];
53 $params = array_merge($params, $optParams);
54 return $this->call('listByPlayer', [$params], PlayerEventListResponse::class);
55 }
56 /**
57 * Returns a list of the event definitions in this application.
58 * (events.listDefinitions)
59 *
60 * @param array $optParams Optional parameters.
61 *
62 * @opt_param string language The preferred language to use for strings returned
63 * by this method.
64 * @opt_param int maxResults The maximum number of event definitions to return
65 * in the response, used for paging. For any response, the actual number of
66 * event definitions to return may be less than the specified `maxResults`.
67 * @opt_param string pageToken The token returned by the previous request.
68 * @return EventDefinitionListResponse
69 * @throws \Google\Service\Exception
70 */
71 public function listDefinitions($optParams = [])
72 {
73 $params = [];
74 $params = array_merge($params, $optParams);
75 return $this->call('listDefinitions', [$params], EventDefinitionListResponse::class);
76 }
77 /**
78 * Records a batch of changes to the number of times events have occurred for
79 * the currently authenticated user of this application. (events.record)
80 *
81 * @param EventRecordRequest $postBody
82 * @param array $optParams Optional parameters.
83 *
84 * @opt_param string language The preferred language to use for strings returned
85 * by this method.
86 * @return EventUpdateResponse
87 * @throws \Google\Service\Exception
88 */
89 public function record(EventRecordRequest $postBody, $optParams = [])
90 {
91 $params = ['postBody' => $postBody];
92 $params = array_merge($params, $optParams);
93 return $this->call('record', [$params], EventUpdateResponse::class);
94 }
95}
96
97// Adding a class alias for backwards compatibility with the previous class name.
98class_alias(Events::class, 'Google_Service_Games_Resource_Events');
Note: See TracBrowser for help on using the repository browser.