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\PolyService\Resource; 19 20use Google\Service\PolyService\ListUserAssetsResponse; 21 22/** 23 * The "assets" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $polyService = new Google\Service\PolyService(...); 27 * $assets = $polyService->assets; 28 * </code> 29 */ 30class UsersAssets extends \Google\Service\Resource 31{ 32 /** 33 * Lists assets authored by the given user. Only the value 'me', representing 34 * the currently-authenticated user, is supported. May include assets with an 35 * access level of PRIVATE or UNLISTED and assets which are All Rights Reserved 36 * for the currently-authenticated user. (assets.listUsersAssets) 37 * 38 * @param string $name A valid user id. Currently, only the special value 'me', 39 * representing the currently-authenticated user is supported. To use 'me', you 40 * must pass an OAuth token with the request. 41 * @param array $optParams Optional parameters. 42 * 43 * @opt_param string format Return only assets with the matching format. 44 * Acceptable values are: `BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`. 45 * @opt_param string orderBy Specifies an ordering for assets. Acceptable values 46 * are: `BEST`, `NEWEST`, `OLDEST`. Defaults to `BEST`, which ranks assets based 47 * on a combination of popularity and other features. 48 * @opt_param int pageSize The maximum number of assets to be returned. This 49 * value must be between `1` and `100`. Defaults to `20`. 50 * @opt_param string pageToken Specifies a continuation token from a previous 51 * search whose results were split into multiple pages. To get the next page, 52 * submit the same request specifying the value from next_page_token. 53 * @opt_param string visibility The visibility of the assets to be returned. 54 * Defaults to VISIBILITY_UNSPECIFIED which returns all assets. 55 * @return ListUserAssetsResponse 56 */ 57 public function listUsersAssets($name, $optParams = []) 58 { 59 $params = ['name' => $name]; 60 $params = array_merge($params, $optParams); 61 return $this->call('list', [$params], ListUserAssetsResponse::class); 62 } 63} 64 65// Adding a class alias for backwards compatibility with the previous class name. 66class_alias(UsersAssets::class, 'Google_Service_PolyService_Resource_UsersAssets'); 67