Initial commit

This commit is contained in:
Local Administrator
2025-04-18 10:32:42 +02:00
commit b83134aca3
29643 changed files with 3045897 additions and 0 deletions
@@ -0,0 +1,86 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\GeneratePlayGroupingApiTokenResponse;
use Google\Service\Games\GenerateRecallPlayGroupingApiTokenResponse;
/**
* The "accesstokens" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $accesstokens = $gamesService->accesstokens;
* </code>
*/
class Accesstokens extends \Google\Service\Resource
{
/**
* Generates a Play Grouping API token for the PGS user identified by the
* attached credential. (accesstokens.generatePlayGroupingApiToken)
*
* @param array $optParams Optional parameters.
*
* @opt_param string packageName Required. App package name to generate the
* token for (e.g. com.example.mygame).
* @opt_param string persona Required. Persona to associate with the token.
* Persona is a developer-provided stable identifier of the user. Must be
* deterministically generated (e.g. as a one-way hash) from the user account ID
* and user profile ID (if the app has the concept), according to the
* developer's own user identity system.
* @return GeneratePlayGroupingApiTokenResponse
* @throws \Google\Service\Exception
*/
public function generatePlayGroupingApiToken($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('generatePlayGroupingApiToken', [$params], GeneratePlayGroupingApiTokenResponse::class);
}
/**
* Generates a Play Grouping API token for the PGS user identified by the Recall
* session ID provided in the request.
* (accesstokens.generateRecallPlayGroupingApiToken)
*
* @param array $optParams Optional parameters.
*
* @opt_param string packageName Required. App package name to generate the
* token for (e.g. com.example.mygame).
* @opt_param string persona Required. Persona to associate with the token.
* Persona is a developer-provided stable identifier of the user. Must be
* deterministically generated (e.g. as a one-way hash) from the user account ID
* and user profile ID (if the app has the concept), according to the
* developer's own user identity system.
* @opt_param string recallSessionId Required. Opaque server-generated string
* that encodes all the necessary information to identify the PGS player /
* Google user and application. See
* https://developer.android.com/games/pgs/recall/recall-setup on how to
* integrate with Recall and get session ID.
* @return GenerateRecallPlayGroupingApiTokenResponse
* @throws \Google\Service\Exception
*/
public function generateRecallPlayGroupingApiToken($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('generateRecallPlayGroupingApiToken', [$params], GenerateRecallPlayGroupingApiTokenResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Accesstokens::class, 'Google_Service_Games_Resource_Accesstokens');
@@ -0,0 +1,57 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\AchievementDefinitionsListResponse;
/**
* The "achievementDefinitions" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $achievementDefinitions = $gamesService->achievementDefinitions;
* </code>
*/
class AchievementDefinitions extends \Google\Service\Resource
{
/**
* Lists all the achievement definitions for your application.
* (achievementDefinitions.listAchievementDefinitions)
*
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of achievement resources to
* return in the response, used for paging. For any response, the actual number
* of achievement resources returned may be less than the specified
* `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return AchievementDefinitionsListResponse
* @throws \Google\Service\Exception
*/
public function listAchievementDefinitions($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], AchievementDefinitionsListResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AchievementDefinitions::class, 'Google_Service_Games_Resource_AchievementDefinitions');
@@ -0,0 +1,151 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\AchievementIncrementResponse;
use Google\Service\Games\AchievementRevealResponse;
use Google\Service\Games\AchievementSetStepsAtLeastResponse;
use Google\Service\Games\AchievementUnlockResponse;
use Google\Service\Games\AchievementUpdateMultipleRequest;
use Google\Service\Games\AchievementUpdateMultipleResponse;
use Google\Service\Games\PlayerAchievementListResponse;
/**
* The "achievements" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $achievements = $gamesService->achievements;
* </code>
*/
class Achievements extends \Google\Service\Resource
{
/**
* Increments the steps of the achievement with the given ID for the currently
* authenticated player. (achievements.increment)
*
* @param string $achievementId The ID of the achievement used by this method.
* @param int $stepsToIncrement Required. The number of steps to increment.
* @param array $optParams Optional parameters.
*
* @opt_param string requestId A randomly generated numeric ID for each request
* specified by the caller. This number is used at the server to ensure that the
* request is handled correctly across retries.
* @return AchievementIncrementResponse
* @throws \Google\Service\Exception
*/
public function increment($achievementId, $stepsToIncrement, $optParams = [])
{
$params = ['achievementId' => $achievementId, 'stepsToIncrement' => $stepsToIncrement];
$params = array_merge($params, $optParams);
return $this->call('increment', [$params], AchievementIncrementResponse::class);
}
/**
* Lists the progress for all your application's achievements for the currently
* authenticated player. (achievements.listAchievements)
*
* @param string $playerId A player ID. A value of `me` may be used in place of
* the authenticated player's ID.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of achievement resources to
* return in the response, used for paging. For any response, the actual number
* of achievement resources returned may be less than the specified
* `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @opt_param string state Tells the server to return only achievements with the
* specified state. If this parameter isn't specified, all achievements are
* returned.
* @return PlayerAchievementListResponse
* @throws \Google\Service\Exception
*/
public function listAchievements($playerId, $optParams = [])
{
$params = ['playerId' => $playerId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], PlayerAchievementListResponse::class);
}
/**
* Sets the state of the achievement with the given ID to `REVEALED` for the
* currently authenticated player. (achievements.reveal)
*
* @param string $achievementId The ID of the achievement used by this method.
* @param array $optParams Optional parameters.
* @return AchievementRevealResponse
* @throws \Google\Service\Exception
*/
public function reveal($achievementId, $optParams = [])
{
$params = ['achievementId' => $achievementId];
$params = array_merge($params, $optParams);
return $this->call('reveal', [$params], AchievementRevealResponse::class);
}
/**
* Sets the steps for the currently authenticated player towards unlocking an
* achievement. If the steps parameter is less than the current number of steps
* that the player already gained for the achievement, the achievement is not
* modified. (achievements.setStepsAtLeast)
*
* @param string $achievementId The ID of the achievement used by this method.
* @param int $steps Required. The minimum value to set the steps to.
* @param array $optParams Optional parameters.
* @return AchievementSetStepsAtLeastResponse
* @throws \Google\Service\Exception
*/
public function setStepsAtLeast($achievementId, $steps, $optParams = [])
{
$params = ['achievementId' => $achievementId, 'steps' => $steps];
$params = array_merge($params, $optParams);
return $this->call('setStepsAtLeast', [$params], AchievementSetStepsAtLeastResponse::class);
}
/**
* Unlocks this achievement for the currently authenticated player.
* (achievements.unlock)
*
* @param string $achievementId The ID of the achievement used by this method.
* @param array $optParams Optional parameters.
* @return AchievementUnlockResponse
* @throws \Google\Service\Exception
*/
public function unlock($achievementId, $optParams = [])
{
$params = ['achievementId' => $achievementId];
$params = array_merge($params, $optParams);
return $this->call('unlock', [$params], AchievementUnlockResponse::class);
}
/**
* Updates multiple achievements for the currently authenticated player.
* (achievements.updateMultiple)
*
* @param AchievementUpdateMultipleRequest $postBody
* @param array $optParams Optional parameters.
* @return AchievementUpdateMultipleResponse
* @throws \Google\Service\Exception
*/
public function updateMultiple(AchievementUpdateMultipleRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('updateMultiple', [$params], AchievementUpdateMultipleResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Achievements::class, 'Google_Service_Games_Resource_Achievements');
@@ -0,0 +1,106 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\Application;
use Google\Service\Games\ApplicationVerifyResponse;
use Google\Service\Games\EndPoint;
/**
* The "applications" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $applications = $gamesService->applications;
* </code>
*/
class Applications extends \Google\Service\Resource
{
/**
* Retrieves the metadata of the application with the given ID. If the requested
* application is not available for the specified `platformType`, the returned
* response will not include any instance data. (applications.get)
*
* @param string $applicationId The application ID from the Google Play
* developer console.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param string platformType Restrict application details returned to the
* specific platform.
* @return Application
* @throws \Google\Service\Exception
*/
public function get($applicationId, $optParams = [])
{
$params = ['applicationId' => $applicationId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Application::class);
}
/**
* Returns a URL for the requested end point type. (applications.getEndPoint)
*
* @param array $optParams Optional parameters.
*
* @opt_param string applicationId The application ID from the Google Play
* developer console.
* @opt_param string endPointType Type of endpoint being requested.
* @return EndPoint
* @throws \Google\Service\Exception
*/
public function getEndPoint($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('getEndPoint', [$params], EndPoint::class);
}
/**
* Indicate that the currently authenticated user is playing your application.
* (applications.played)
*
* @param array $optParams Optional parameters.
* @throws \Google\Service\Exception
*/
public function played($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('played', [$params]);
}
/**
* Verifies the auth token provided with this request is for the application
* with the specified ID, and returns the ID of the player it was granted for.
* (applications.verify)
*
* @param string $applicationId The application ID from the Google Play
* developer console.
* @param array $optParams Optional parameters.
* @return ApplicationVerifyResponse
* @throws \Google\Service\Exception
*/
public function verify($applicationId, $optParams = [])
{
$params = ['applicationId' => $applicationId];
$params = array_merge($params, $optParams);
return $this->call('verify', [$params], ApplicationVerifyResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Applications::class, 'Google_Service_Games_Resource_Applications');
@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\EventDefinitionListResponse;
use Google\Service\Games\EventRecordRequest;
use Google\Service\Games\EventUpdateResponse;
use Google\Service\Games\PlayerEventListResponse;
/**
* The "events" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $events = $gamesService->events;
* </code>
*/
class Events extends \Google\Service\Resource
{
/**
* Returns a list showing the current progress on events in this application for
* the currently authenticated user. (events.listByPlayer)
*
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of events to return in the
* response, used for paging. For any response, the actual number of events to
* return may be less than the specified maxResults.
* @opt_param string pageToken The token returned by the previous request.
* @return PlayerEventListResponse
* @throws \Google\Service\Exception
*/
public function listByPlayer($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('listByPlayer', [$params], PlayerEventListResponse::class);
}
/**
* Returns a list of the event definitions in this application.
* (events.listDefinitions)
*
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of event definitions to return
* in the response, used for paging. For any response, the actual number of
* event definitions to return may be less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return EventDefinitionListResponse
* @throws \Google\Service\Exception
*/
public function listDefinitions($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('listDefinitions', [$params], EventDefinitionListResponse::class);
}
/**
* Records a batch of changes to the number of times events have occurred for
* the currently authenticated user of this application. (events.record)
*
* @param EventRecordRequest $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @return EventUpdateResponse
* @throws \Google\Service\Exception
*/
public function record(EventRecordRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('record', [$params], EventUpdateResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Events::class, 'Google_Service_Games_Resource_Events');
@@ -0,0 +1,75 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\Leaderboard;
use Google\Service\Games\LeaderboardListResponse;
/**
* The "leaderboards" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $leaderboards = $gamesService->leaderboards;
* </code>
*/
class Leaderboards extends \Google\Service\Resource
{
/**
* Retrieves the metadata of the leaderboard with the given ID.
* (leaderboards.get)
*
* @param string $leaderboardId The ID of the leaderboard.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @return Leaderboard
* @throws \Google\Service\Exception
*/
public function get($leaderboardId, $optParams = [])
{
$params = ['leaderboardId' => $leaderboardId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Leaderboard::class);
}
/**
* Lists all the leaderboard metadata for your application.
* (leaderboards.listLeaderboards)
*
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of leaderboards to return in the
* response. For any response, the actual number of leaderboards returned may be
* less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return LeaderboardListResponse
* @throws \Google\Service\Exception
*/
public function listLeaderboards($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], LeaderboardListResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Leaderboards::class, 'Google_Service_Games_Resource_Leaderboards');
@@ -0,0 +1,75 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\CategoryListResponse;
use Google\Service\Games\MetagameConfig;
/**
* The "metagame" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $metagame = $gamesService->metagame;
* </code>
*/
class Metagame extends \Google\Service\Resource
{
/**
* Return the metagame configuration data for the calling application.
* (metagame.getMetagameConfig)
*
* @param array $optParams Optional parameters.
* @return MetagameConfig
* @throws \Google\Service\Exception
*/
public function getMetagameConfig($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('getMetagameConfig', [$params], MetagameConfig::class);
}
/**
* List play data aggregated per category for the player corresponding to
* `playerId`. (metagame.listCategoriesByPlayer)
*
* @param string $playerId A player ID. A value of `me` may be used in place of
* the authenticated player's ID.
* @param string $collection The collection of categories for which data will be
* returned.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of category resources to return
* in the response, used for paging. For any response, the actual number of
* category resources returned may be less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return CategoryListResponse
* @throws \Google\Service\Exception
*/
public function listCategoriesByPlayer($playerId, $collection, $optParams = [])
{
$params = ['playerId' => $playerId, 'collection' => $collection];
$params = array_merge($params, $optParams);
return $this->call('listCategoriesByPlayer', [$params], CategoryListResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Metagame::class, 'Google_Service_Games_Resource_Metagame');
@@ -0,0 +1,115 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\GetMultipleApplicationPlayerIdsResponse;
use Google\Service\Games\Player;
use Google\Service\Games\PlayerListResponse;
use Google\Service\Games\ScopedPlayerIds;
/**
* The "players" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $players = $gamesService->players;
* </code>
*/
class Players extends \Google\Service\Resource
{
/**
* Retrieves the Player resource with the given ID. To retrieve the player for
* the currently authenticated user, set `playerId` to `me`. (players.get)
*
* @param string $playerId A player ID. A value of `me` may be used in place of
* the authenticated player's ID.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param string playerIdConsistencyToken Consistency token of the player
* id. The call returns a 'not found' result when the token is present and
* invalid. Empty value is ignored. See also GlobalPlayerIdConsistencyTokenProto
* @return Player
* @throws \Google\Service\Exception
*/
public function get($playerId, $optParams = [])
{
$params = ['playerId' => $playerId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Player::class);
}
/**
* Get the application player ids for the currently authenticated player across
* all requested games by the same developer as the calling application. This
* will only return ids for players that actually have an id (scoped or
* otherwise) with that game. (players.getMultipleApplicationPlayerIds)
*
* @param array $optParams Optional parameters.
*
* @opt_param string applicationIds Required. The application IDs from the
* Google Play developer console for the games to return scoped ids for.
* @return GetMultipleApplicationPlayerIdsResponse
* @throws \Google\Service\Exception
*/
public function getMultipleApplicationPlayerIds($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('getMultipleApplicationPlayerIds', [$params], GetMultipleApplicationPlayerIdsResponse::class);
}
/**
* Retrieves scoped player identifiers for currently authenticated user.
* (players.getScopedPlayerIds)
*
* @param array $optParams Optional parameters.
* @return ScopedPlayerIds
* @throws \Google\Service\Exception
*/
public function getScopedPlayerIds($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('getScopedPlayerIds', [$params], ScopedPlayerIds::class);
}
/**
* Get the collection of players for the currently authenticated user.
* (players.listPlayers)
*
* @param string $collection Collection of players being retrieved
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of player resources to return in
* the response, used for paging. For any response, the actual number of player
* resources returned may be less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return PlayerListResponse
* @throws \Google\Service\Exception
*/
public function listPlayers($collection, $optParams = [])
{
$params = ['collection' => $collection];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], PlayerListResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Players::class, 'Google_Service_Games_Resource_Players');
@@ -0,0 +1,148 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\LinkPersonaRequest;
use Google\Service\Games\LinkPersonaResponse;
use Google\Service\Games\ResetPersonaRequest;
use Google\Service\Games\ResetPersonaResponse;
use Google\Service\Games\RetrieveDeveloperGamesLastPlayerTokenResponse;
use Google\Service\Games\RetrieveGamesPlayerTokensResponse;
use Google\Service\Games\RetrievePlayerTokensResponse;
use Google\Service\Games\UnlinkPersonaRequest;
use Google\Service\Games\UnlinkPersonaResponse;
/**
* The "recall" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $recall = $gamesService->recall;
* </code>
*/
class Recall extends \Google\Service\Resource
{
/**
* Retrieve the Recall tokens from all requested games that is associated with
* the PGS Player encoded in the provided recall session id. The API is only
* available for users that have an active PGS Player profile.
* (recall.gamesPlayerTokens)
*
* @param string $sessionId Required. Opaque server-generated string that
* encodes all the necessary information to identify the PGS player / Google
* user and application.
* @param array $optParams Optional parameters.
*
* @opt_param string applicationIds Required. The application IDs from the
* Google Play developer console for the games to return scoped ids for.
* @return RetrieveGamesPlayerTokensResponse
* @throws \Google\Service\Exception
*/
public function gamesPlayerTokens($sessionId, $optParams = [])
{
$params = ['sessionId' => $sessionId];
$params = array_merge($params, $optParams);
return $this->call('gamesPlayerTokens', [$params], RetrieveGamesPlayerTokensResponse::class);
}
/**
* Retrieve the last Recall token from all developer games that is associated
* with the PGS Player encoded in the provided recall session id. The API is
* only available for users that have active PGS Player profile.
* (recall.lastTokenFromAllDeveloperGames)
*
* @param string $sessionId Required. Opaque server-generated string that
* encodes all the necessary information to identify the PGS player / Google
* user and application.
* @param array $optParams Optional parameters.
* @return RetrieveDeveloperGamesLastPlayerTokenResponse
* @throws \Google\Service\Exception
*/
public function lastTokenFromAllDeveloperGames($sessionId, $optParams = [])
{
$params = ['sessionId' => $sessionId];
$params = array_merge($params, $optParams);
return $this->call('lastTokenFromAllDeveloperGames', [$params], RetrieveDeveloperGamesLastPlayerTokenResponse::class);
}
/**
* Associate the PGS Player principal encoded in the provided recall session id
* with an in-game account (recall.linkPersona)
*
* @param LinkPersonaRequest $postBody
* @param array $optParams Optional parameters.
* @return LinkPersonaResponse
* @throws \Google\Service\Exception
*/
public function linkPersona(LinkPersonaRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('linkPersona', [$params], LinkPersonaResponse::class);
}
/**
* Delete all Recall tokens linking the given persona to any player (with or
* without a profile). (recall.resetPersona)
*
* @param ResetPersonaRequest $postBody
* @param array $optParams Optional parameters.
* @return ResetPersonaResponse
* @throws \Google\Service\Exception
*/
public function resetPersona(ResetPersonaRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('resetPersona', [$params], ResetPersonaResponse::class);
}
/**
* Retrieve all Recall tokens associated with the PGS Player encoded in the
* provided recall session id. The API is only available for users that have
* active PGS Player profile. (recall.retrieveTokens)
*
* @param string $sessionId Required. Opaque server-generated string that
* encodes all the necessary information to identify the PGS player / Google
* user and application.
* @param array $optParams Optional parameters.
* @return RetrievePlayerTokensResponse
* @throws \Google\Service\Exception
*/
public function retrieveTokens($sessionId, $optParams = [])
{
$params = ['sessionId' => $sessionId];
$params = array_merge($params, $optParams);
return $this->call('retrieveTokens', [$params], RetrievePlayerTokensResponse::class);
}
/**
* Delete a Recall token linking the PGS Player principal identified by the
* Recall session and an in-game account identified either by the 'persona' or
* by the token value. (recall.unlinkPersona)
*
* @param UnlinkPersonaRequest $postBody
* @param array $optParams Optional parameters.
* @return UnlinkPersonaResponse
* @throws \Google\Service\Exception
*/
public function unlinkPersona(UnlinkPersonaRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('unlinkPersona', [$params], UnlinkPersonaResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Recall::class, 'Google_Service_Games_Resource_Recall');
@@ -0,0 +1,53 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\RevisionCheckResponse;
/**
* The "revisions" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $revisions = $gamesService->revisions;
* </code>
*/
class Revisions extends \Google\Service\Resource
{
/**
* Checks whether the games client is out of date. (revisions.check)
*
* @param string $clientRevision Required. The revision of the client SDK used
* by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible
* values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android
* SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running
* as a Web App.
* @param array $optParams Optional parameters.
* @return RevisionCheckResponse
* @throws \Google\Service\Exception
*/
public function check($clientRevision, $optParams = [])
{
$params = ['clientRevision' => $clientRevision];
$params = array_merge($params, $optParams);
return $this->call('check', [$params], RevisionCheckResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Revisions::class, 'Google_Service_Games_Resource_Revisions');
@@ -0,0 +1,169 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\LeaderboardScores;
use Google\Service\Games\PlayerLeaderboardScoreListResponse;
use Google\Service\Games\PlayerScoreListResponse;
use Google\Service\Games\PlayerScoreResponse;
use Google\Service\Games\PlayerScoreSubmissionList;
/**
* The "scores" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $scores = $gamesService->scores;
* </code>
*/
class Scores extends \Google\Service\Resource
{
/**
* Get high scores, and optionally ranks, in leaderboards for the currently
* authenticated player. For a specific time span, `leaderboardId` can be set to
* `ALL` to retrieve data for all leaderboards in a given time span. `NOTE: You
* cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request;
* only one parameter may be set to 'ALL'. (scores.get)
*
* @param string $playerId A player ID. A value of `me` may be used in place of
* the authenticated player's ID.
* @param string $leaderboardId The ID of the leaderboard. Can be set to 'ALL'
* to retrieve data for all leaderboards for this application.
* @param string $timeSpan The time span for the scores and ranks you're
* requesting.
* @param array $optParams Optional parameters.
*
* @opt_param string includeRankType The types of ranks to return. If the
* parameter is omitted, no ranks will be returned.
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of leaderboard scores to return
* in the response. For any response, the actual number of leaderboard scores
* returned may be less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return PlayerLeaderboardScoreListResponse
* @throws \Google\Service\Exception
*/
public function get($playerId, $leaderboardId, $timeSpan, $optParams = [])
{
$params = ['playerId' => $playerId, 'leaderboardId' => $leaderboardId, 'timeSpan' => $timeSpan];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], PlayerLeaderboardScoreListResponse::class);
}
/**
* Lists the scores in a leaderboard, starting from the top. (scores.listScores)
*
* @param string $leaderboardId The ID of the leaderboard.
* @param string $collection The collection of scores you're requesting.
* @param string $timeSpan Required. The time span for the scores and ranks
* you're requesting.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of leaderboard scores to return
* in the response. For any response, the actual number of leaderboard scores
* returned may be less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return LeaderboardScores
* @throws \Google\Service\Exception
*/
public function listScores($leaderboardId, $collection, $timeSpan, $optParams = [])
{
$params = ['leaderboardId' => $leaderboardId, 'collection' => $collection, 'timeSpan' => $timeSpan];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], LeaderboardScores::class);
}
/**
* Lists the scores in a leaderboard around (and including) a player's score.
* (scores.listWindow)
*
* @param string $leaderboardId The ID of the leaderboard.
* @param string $collection The collection of scores you're requesting.
* @param string $timeSpan Required. The time span for the scores and ranks
* you're requesting.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of leaderboard scores to return
* in the response. For any response, the actual number of leaderboard scores
* returned may be less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @opt_param int resultsAbove The preferred number of scores to return above
* the player's score. More scores may be returned if the player is at the
* bottom of the leaderboard; fewer may be returned if the player is at the top.
* Must be less than or equal to maxResults.
* @opt_param bool returnTopIfAbsent True if the top scores should be returned
* when the player is not in the leaderboard. Defaults to true.
* @return LeaderboardScores
* @throws \Google\Service\Exception
*/
public function listWindow($leaderboardId, $collection, $timeSpan, $optParams = [])
{
$params = ['leaderboardId' => $leaderboardId, 'collection' => $collection, 'timeSpan' => $timeSpan];
$params = array_merge($params, $optParams);
return $this->call('listWindow', [$params], LeaderboardScores::class);
}
/**
* Submits a score to the specified leaderboard. (scores.submit)
*
* @param string $leaderboardId The ID of the leaderboard.
* @param string $score Required. The score you're submitting. The submitted
* score is ignored if it is worse than a previously submitted score, where
* worse depends on the leaderboard sort order. The meaning of the score value
* depends on the leaderboard format type. For fixed-point, the score represents
* the raw value. For time, the score represents elapsed time in milliseconds.
* For currency, the score represents a value in micro units.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param string scoreTag Additional information about the score you're
* submitting. Values must contain no more than 64 URI-safe characters as
* defined by section 2.3 of RFC 3986.
* @return PlayerScoreResponse
* @throws \Google\Service\Exception
*/
public function submit($leaderboardId, $score, $optParams = [])
{
$params = ['leaderboardId' => $leaderboardId, 'score' => $score];
$params = array_merge($params, $optParams);
return $this->call('submit', [$params], PlayerScoreResponse::class);
}
/**
* Submits multiple scores to leaderboards. (scores.submitMultiple)
*
* @param PlayerScoreSubmissionList $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @return PlayerScoreListResponse
* @throws \Google\Service\Exception
*/
public function submitMultiple(PlayerScoreSubmissionList $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('submitMultiple', [$params], PlayerScoreListResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Scores::class, 'Google_Service_Games_Resource_Scores');
@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\Snapshot;
use Google\Service\Games\SnapshotListResponse;
/**
* The "snapshots" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $snapshots = $gamesService->snapshots;
* </code>
*/
class Snapshots extends \Google\Service\Resource
{
/**
* Retrieves the metadata for a given snapshot ID. (snapshots.get)
*
* @param string $snapshotId The ID of the snapshot.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @return Snapshot
* @throws \Google\Service\Exception
*/
public function get($snapshotId, $optParams = [])
{
$params = ['snapshotId' => $snapshotId];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], Snapshot::class);
}
/**
* Retrieves a list of snapshots created by your application for the player
* corresponding to the player ID. (snapshots.listSnapshots)
*
* @param string $playerId A player ID. A value of `me` may be used in place of
* the authenticated player's ID.
* @param array $optParams Optional parameters.
*
* @opt_param string language The preferred language to use for strings returned
* by this method.
* @opt_param int maxResults The maximum number of snapshot resources to return
* in the response, used for paging. For any response, the actual number of
* snapshot resources returned may be less than the specified `maxResults`.
* @opt_param string pageToken The token returned by the previous request.
* @return SnapshotListResponse
* @throws \Google\Service\Exception
*/
public function listSnapshots($playerId, $optParams = [])
{
$params = ['playerId' => $playerId];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], SnapshotListResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Snapshots::class, 'Google_Service_Games_Resource_Snapshots');
@@ -0,0 +1,49 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Service\Games\Resource;
use Google\Service\Games\StatsResponse;
/**
* The "stats" collection of methods.
* Typical usage is:
* <code>
* $gamesService = new Google\Service\Games(...);
* $stats = $gamesService->stats;
* </code>
*/
class Stats extends \Google\Service\Resource
{
/**
* Returns engagement and spend statistics in this application for the currently
* authenticated user. (stats.get)
*
* @param array $optParams Optional parameters.
* @return StatsResponse
* @throws \Google\Service\Exception
*/
public function get($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], StatsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Stats::class, 'Google_Service_Games_Resource_Stats');