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 PolyService (v1). 24 * 25 * <p> 26 * The Poly API provides read access to assets hosted on poly.google.com to all, 27 * and upload access to poly.google.com for whitelisted accounts.</p> 28 * 29 * <p> 30 * For more information about this service, see the API 31 * <a href="https://developers.google.com/poly/" target="_blank">Documentation</a> 32 * </p> 33 * 34 * @author Google, Inc. 35 */ 36class PolyService extends \Google\Service 37{ 38 39 40 public $assets; 41 public $users_assets; 42 public $users_likedassets; 43 44 /** 45 * Constructs the internal representation of the PolyService service. 46 * 47 * @param Client|array $clientOrConfig The client used to deliver requests, or a 48 * config array to pass to a new Client instance. 49 * @param string $rootUrl The root URL used for requests to the service. 50 */ 51 public function __construct($clientOrConfig = [], $rootUrl = null) 52 { 53 parent::__construct($clientOrConfig); 54 $this->rootUrl = $rootUrl ?: 'https://poly.googleapis.com/'; 55 $this->servicePath = ''; 56 $this->batchPath = 'batch'; 57 $this->version = 'v1'; 58 $this->serviceName = 'poly'; 59 60 $this->assets = new PolyService\Resource\Assets( 61 $this, 62 $this->serviceName, 63 'assets', 64 [ 65 'methods' => [ 66 'get' => [ 67 'path' => 'v1/{+name}', 68 'httpMethod' => 'GET', 69 'parameters' => [ 70 'name' => [ 71 'location' => 'path', 72 'type' => 'string', 73 'required' => true, 74 ], 75 ], 76 ],'list' => [ 77 'path' => 'v1/assets', 78 'httpMethod' => 'GET', 79 'parameters' => [ 80 'category' => [ 81 'location' => 'query', 82 'type' => 'string', 83 ], 84 'curated' => [ 85 'location' => 'query', 86 'type' => 'boolean', 87 ], 88 'format' => [ 89 'location' => 'query', 90 'type' => 'string', 91 ], 92 'keywords' => [ 93 'location' => 'query', 94 'type' => 'string', 95 ], 96 'maxComplexity' => [ 97 'location' => 'query', 98 'type' => 'string', 99 ], 100 'orderBy' => [ 101 'location' => 'query', 102 'type' => 'string', 103 ], 104 'pageSize' => [ 105 'location' => 'query', 106 'type' => 'integer', 107 ], 108 'pageToken' => [ 109 'location' => 'query', 110 'type' => 'string', 111 ], 112 ], 113 ], 114 ] 115 ] 116 ); 117 $this->users_assets = new PolyService\Resource\UsersAssets( 118 $this, 119 $this->serviceName, 120 'assets', 121 [ 122 'methods' => [ 123 'list' => [ 124 'path' => 'v1/{+name}/assets', 125 'httpMethod' => 'GET', 126 'parameters' => [ 127 'name' => [ 128 'location' => 'path', 129 'type' => 'string', 130 'required' => true, 131 ], 132 'format' => [ 133 'location' => 'query', 134 'type' => 'string', 135 ], 136 'orderBy' => [ 137 'location' => 'query', 138 'type' => 'string', 139 ], 140 'pageSize' => [ 141 'location' => 'query', 142 'type' => 'integer', 143 ], 144 'pageToken' => [ 145 'location' => 'query', 146 'type' => 'string', 147 ], 148 'visibility' => [ 149 'location' => 'query', 150 'type' => 'string', 151 ], 152 ], 153 ], 154 ] 155 ] 156 ); 157 $this->users_likedassets = new PolyService\Resource\UsersLikedassets( 158 $this, 159 $this->serviceName, 160 'likedassets', 161 [ 162 'methods' => [ 163 'list' => [ 164 'path' => 'v1/{+name}/likedassets', 165 'httpMethod' => 'GET', 166 'parameters' => [ 167 'name' => [ 168 'location' => 'path', 169 'type' => 'string', 170 'required' => true, 171 ], 172 'format' => [ 173 'location' => 'query', 174 'type' => 'string', 175 ], 176 'orderBy' => [ 177 'location' => 'query', 178 'type' => 'string', 179 ], 180 'pageSize' => [ 181 'location' => 'query', 182 'type' => 'integer', 183 ], 184 'pageToken' => [ 185 'location' => 'query', 186 'type' => 'string', 187 ], 188 ], 189 ], 190 ] 191 ] 192 ); 193 } 194} 195 196// Adding a class alias for backwards compatibility with the previous class name. 197class_alias(PolyService::class, 'Google_Service_PolyService'); 198