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\Application; 21use Google\Service\Games\ApplicationVerifyResponse; 22use Google\Service\Games\EndPoint; 23 24/** 25 * The "applications" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $gamesService = new Google\Service\Games(...); 29 * $applications = $gamesService->applications; 30 * </code> 31 */ 32class Applications extends \Google\Service\Resource 33{ 34 /** 35 * Retrieves the metadata of the application with the given ID. If the requested 36 * application is not available for the specified `platformType`, the returned 37 * response will not include any instance data. (applications.get) 38 * 39 * @param string $applicationId The application ID from the Google Play 40 * developer console. 41 * @param array $optParams Optional parameters. 42 * 43 * @opt_param string language The preferred language to use for strings returned 44 * by this method. 45 * @opt_param string platformType Restrict application details returned to the 46 * specific platform. 47 * @return Application 48 */ 49 public function get($applicationId, $optParams = []) 50 { 51 $params = ['applicationId' => $applicationId]; 52 $params = array_merge($params, $optParams); 53 return $this->call('get', [$params], Application::class); 54 } 55 /** 56 * Returns a URL for the requested end point type. (applications.getEndPoint) 57 * 58 * @param array $optParams Optional parameters. 59 * 60 * @opt_param string applicationId The application ID from the Google Play 61 * developer console. 62 * @opt_param string endPointType Type of endpoint being requested. 63 * @return EndPoint 64 */ 65 public function getEndPoint($optParams = []) 66 { 67 $params = []; 68 $params = array_merge($params, $optParams); 69 return $this->call('getEndPoint', [$params], EndPoint::class); 70 } 71 /** 72 * Indicate that the currently authenticated user is playing your application. 73 * (applications.played) 74 * 75 * @param array $optParams Optional parameters. 76 */ 77 public function played($optParams = []) 78 { 79 $params = []; 80 $params = array_merge($params, $optParams); 81 return $this->call('played', [$params]); 82 } 83 /** 84 * Verifies the auth token provided with this request is for the application 85 * with the specified ID, and returns the ID of the player it was granted for. 86 * (applications.verify) 87 * 88 * @param string $applicationId The application ID from the Google Play 89 * developer console. 90 * @param array $optParams Optional parameters. 91 * @return ApplicationVerifyResponse 92 */ 93 public function verify($applicationId, $optParams = []) 94 { 95 $params = ['applicationId' => $applicationId]; 96 $params = array_merge($params, $optParams); 97 return $this->call('verify', [$params], ApplicationVerifyResponse::class); 98 } 99} 100 101// Adding a class alias for backwards compatibility with the previous class name. 102class_alias(Applications::class, 'Google_Service_Games_Resource_Applications'); 103