source: vendor/google/apiclient-services/src/Games/Resource/Accesstokens.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.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\GeneratePlayGroupingApiTokenResponse;
21use Google\Service\Games\GenerateRecallPlayGroupingApiTokenResponse;
22
23/**
24 * The "accesstokens" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $gamesService = new Google\Service\Games(...);
28 * $accesstokens = $gamesService->accesstokens;
29 * </code>
30 */
31class Accesstokens extends \Google\Service\Resource
32{
33 /**
34 * Generates a Play Grouping API token for the PGS user identified by the
35 * attached credential. (accesstokens.generatePlayGroupingApiToken)
36 *
37 * @param array $optParams Optional parameters.
38 *
39 * @opt_param string packageName Required. App package name to generate the
40 * token for (e.g. com.example.mygame).
41 * @opt_param string persona Required. Persona to associate with the token.
42 * Persona is a developer-provided stable identifier of the user. Must be
43 * deterministically generated (e.g. as a one-way hash) from the user account ID
44 * and user profile ID (if the app has the concept), according to the
45 * developer's own user identity system.
46 * @return GeneratePlayGroupingApiTokenResponse
47 * @throws \Google\Service\Exception
48 */
49 public function generatePlayGroupingApiToken($optParams = [])
50 {
51 $params = [];
52 $params = array_merge($params, $optParams);
53 return $this->call('generatePlayGroupingApiToken', [$params], GeneratePlayGroupingApiTokenResponse::class);
54 }
55 /**
56 * Generates a Play Grouping API token for the PGS user identified by the Recall
57 * session ID provided in the request.
58 * (accesstokens.generateRecallPlayGroupingApiToken)
59 *
60 * @param array $optParams Optional parameters.
61 *
62 * @opt_param string packageName Required. App package name to generate the
63 * token for (e.g. com.example.mygame).
64 * @opt_param string persona Required. Persona to associate with the token.
65 * Persona is a developer-provided stable identifier of the user. Must be
66 * deterministically generated (e.g. as a one-way hash) from the user account ID
67 * and user profile ID (if the app has the concept), according to the
68 * developer's own user identity system.
69 * @opt_param string recallSessionId Required. Opaque server-generated string
70 * that encodes all the necessary information to identify the PGS player /
71 * Google user and application. See
72 * https://developer.android.com/games/pgs/recall/recall-setup on how to
73 * integrate with Recall and get session ID.
74 * @return GenerateRecallPlayGroupingApiTokenResponse
75 * @throws \Google\Service\Exception
76 */
77 public function generateRecallPlayGroupingApiToken($optParams = [])
78 {
79 $params = [];
80 $params = array_merge($params, $optParams);
81 return $this->call('generateRecallPlayGroupingApiToken', [$params], GenerateRecallPlayGroupingApiTokenResponse::class);
82 }
83}
84
85// Adding a class alias for backwards compatibility with the previous class name.
86class_alias(Accesstokens::class, 'Google_Service_Games_Resource_Accesstokens');
Note: See TracBrowser for help on using the repository browser.