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; 19 20use Google\Client; 21 22/** 23 * Service definition for GamesConfiguration (v1configuration). 24 * 25 * <p> 26 * The Google Play Game Services Publishing API allows developers to configure 27 * their games in Game Services.</p> 28 * 29 * <p> 30 * For more information about this service, see the API 31 * <a href="https://developers.google.com/games/" target="_blank">Documentation</a> 32 * </p> 33 * 34 * @author Google, Inc. 35 */ 36class GamesConfiguration extends \Google\Service 37{ 38 /** View and manage your Google Play Developer account. */ 39 const ANDROIDPUBLISHER = 40 "https://www.googleapis.com/auth/androidpublisher"; 41 42 public $achievementConfigurations; 43 public $imageConfigurations; 44 public $leaderboardConfigurations; 45 46 /** 47 * Constructs the internal representation of the GamesConfiguration service. 48 * 49 * @param Client|array $clientOrConfig The client used to deliver requests, or a 50 * config array to pass to a new Client instance. 51 * @param string $rootUrl The root URL used for requests to the service. 52 */ 53 public function __construct($clientOrConfig = [], $rootUrl = null) 54 { 55 parent::__construct($clientOrConfig); 56 $this->rootUrl = $rootUrl ?: 'https://gamesconfiguration.googleapis.com/'; 57 $this->servicePath = ''; 58 $this->batchPath = 'batch'; 59 $this->version = 'v1configuration'; 60 $this->serviceName = 'gamesConfiguration'; 61 62 $this->achievementConfigurations = new GamesConfiguration\Resource\AchievementConfigurations( 63 $this, 64 $this->serviceName, 65 'achievementConfigurations', 66 [ 67 'methods' => [ 68 'delete' => [ 69 'path' => 'games/v1configuration/achievements/{achievementId}', 70 'httpMethod' => 'DELETE', 71 'parameters' => [ 72 'achievementId' => [ 73 'location' => 'path', 74 'type' => 'string', 75 'required' => true, 76 ], 77 ], 78 ],'get' => [ 79 'path' => 'games/v1configuration/achievements/{achievementId}', 80 'httpMethod' => 'GET', 81 'parameters' => [ 82 'achievementId' => [ 83 'location' => 'path', 84 'type' => 'string', 85 'required' => true, 86 ], 87 ], 88 ],'insert' => [ 89 'path' => 'games/v1configuration/applications/{applicationId}/achievements', 90 'httpMethod' => 'POST', 91 'parameters' => [ 92 'applicationId' => [ 93 'location' => 'path', 94 'type' => 'string', 95 'required' => true, 96 ], 97 ], 98 ],'list' => [ 99 'path' => 'games/v1configuration/applications/{applicationId}/achievements', 100 'httpMethod' => 'GET', 101 'parameters' => [ 102 'applicationId' => [ 103 'location' => 'path', 104 'type' => 'string', 105 'required' => true, 106 ], 107 'maxResults' => [ 108 'location' => 'query', 109 'type' => 'integer', 110 ], 111 'pageToken' => [ 112 'location' => 'query', 113 'type' => 'string', 114 ], 115 ], 116 ],'update' => [ 117 'path' => 'games/v1configuration/achievements/{achievementId}', 118 'httpMethod' => 'PUT', 119 'parameters' => [ 120 'achievementId' => [ 121 'location' => 'path', 122 'type' => 'string', 123 'required' => true, 124 ], 125 ], 126 ], 127 ] 128 ] 129 ); 130 $this->imageConfigurations = new GamesConfiguration\Resource\ImageConfigurations( 131 $this, 132 $this->serviceName, 133 'imageConfigurations', 134 [ 135 'methods' => [ 136 'upload' => [ 137 'path' => 'games/v1configuration/images/{resourceId}/imageType/{imageType}', 138 'httpMethod' => 'POST', 139 'parameters' => [ 140 'resourceId' => [ 141 'location' => 'path', 142 'type' => 'string', 143 'required' => true, 144 ], 145 'imageType' => [ 146 'location' => 'path', 147 'type' => 'string', 148 'required' => true, 149 ], 150 ], 151 ], 152 ] 153 ] 154 ); 155 $this->leaderboardConfigurations = new GamesConfiguration\Resource\LeaderboardConfigurations( 156 $this, 157 $this->serviceName, 158 'leaderboardConfigurations', 159 [ 160 'methods' => [ 161 'delete' => [ 162 'path' => 'games/v1configuration/leaderboards/{leaderboardId}', 163 'httpMethod' => 'DELETE', 164 'parameters' => [ 165 'leaderboardId' => [ 166 'location' => 'path', 167 'type' => 'string', 168 'required' => true, 169 ], 170 ], 171 ],'get' => [ 172 'path' => 'games/v1configuration/leaderboards/{leaderboardId}', 173 'httpMethod' => 'GET', 174 'parameters' => [ 175 'leaderboardId' => [ 176 'location' => 'path', 177 'type' => 'string', 178 'required' => true, 179 ], 180 ], 181 ],'insert' => [ 182 'path' => 'games/v1configuration/applications/{applicationId}/leaderboards', 183 'httpMethod' => 'POST', 184 'parameters' => [ 185 'applicationId' => [ 186 'location' => 'path', 187 'type' => 'string', 188 'required' => true, 189 ], 190 ], 191 ],'list' => [ 192 'path' => 'games/v1configuration/applications/{applicationId}/leaderboards', 193 'httpMethod' => 'GET', 194 'parameters' => [ 195 'applicationId' => [ 196 'location' => 'path', 197 'type' => 'string', 198 'required' => true, 199 ], 200 'maxResults' => [ 201 'location' => 'query', 202 'type' => 'integer', 203 ], 204 'pageToken' => [ 205 'location' => 'query', 206 'type' => 'string', 207 ], 208 ], 209 ],'update' => [ 210 'path' => 'games/v1configuration/leaderboards/{leaderboardId}', 211 'httpMethod' => 'PUT', 212 'parameters' => [ 213 'leaderboardId' => [ 214 'location' => 'path', 215 'type' => 'string', 216 'required' => true, 217 ], 218 ], 219 ], 220 ] 221 ] 222 ); 223 } 224} 225 226// Adding a class alias for backwards compatibility with the previous class name. 227class_alias(GamesConfiguration::class, 'Google_Service_GamesConfiguration'); 228