blob: 6b6a5679e6799a043f1b8d641210fb22faa389f0 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="poly_v1.html">Poly API</a> . <a href="poly_v1.users.html">users</a> . <a href="poly_v1.users.assets.html">assets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#list">list(name, orderBy=None, pageSize=None, format=None, visibility=None, pageToken=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Lists assets authored by the given user. Only the value 'me', representing</p>
80<p class="toc_element">
81 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<h3>Method Details</h3>
84<div class="method">
85 <code class="details" id="list">list(name, orderBy=None, pageSize=None, format=None, visibility=None, pageToken=None, x__xgafv=None)</code>
86 <pre>Lists assets authored by the given user. Only the value 'me', representing
87the currently-authenticated user, is supported. May include assets with an
88access level of PRIVATE or
89UNLISTED and assets which are
90All Rights Reserved for the
91currently-authenticated user.
92
93Args:
94 name: string, A valid user id. Currently, only the special value 'me', representing the
95currently-authenticated user is supported. To use 'me', you must pass
96an OAuth token with the request. (required)
97 orderBy: string, Specifies an ordering for assets. Acceptable values are:
98`BEST`, `NEWEST`, `OLDEST`. Defaults to `BEST`, which ranks assets
99based on a combination of popularity and other features.
100 pageSize: integer, The maximum number of assets to be returned. This value must be between `1`
101and `100`. Defaults to `20`.
102 format: string, Return only assets with the matching format. Acceptable values are:
103`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
104 visibility: string, The visibility of the assets to be returned.
105Defaults to
106VISIBILITY_UNSPECIFIED
107which returns all assets.
108 pageToken: string, Specifies a continuation token from a previous search whose results were
109split into multiple pages. To get the next page, submit the same request
110specifying the value from
111next_page_token.
112 x__xgafv: string, V1 error format.
113 Allowed values
114 1 - v1 error format
115 2 - v2 error format
116
117Returns:
118 An object of the form:
119
120 { # A response message from a request to list.
121 "nextPageToken": "A String", # The continuation token for retrieving the next page. If empty,
122 # indicates that there are no more pages. To get the next page, submit the
123 # same request specifying this value as the
124 # page_token.
125 "totalSize": 42, # The total number of assets in the list, without pagination.
126 "userAssets": [ # A list of UserAssets matching the request.
127 { # Data about the user's asset.
128 "asset": { # Represents and describes an asset in the Poly library. An asset is a 3D model # An Asset.
129 # or scene created using [Tilt Brush](//www.tiltbrush.com),
130 # [Blocks](//vr.google.com/blocks/), or any 3D program that produces a file
131 # that can be upload to Poly.
132 "updateTime": "A String", # The time when the asset was last modified. For published assets, whose
133 # contents are immutable, the update time changes only when metadata
134 # properties, such as visibility, are updated.
135 "displayName": "A String", # The human-readable name, set by the asset's author.
136 "description": "A String", # The human-readable description, set by the asset's author.
137 "license": "A String", # The license under which the author has made the asset available
138 # for use, if any.
139 "visibility": "A String", # The visibility of the asset and who can access it.
140 "thumbnail": { # Represents a file in Poly, which can be a root, # The thumbnail image for the asset.
141 # resource, or thumbnail file.
142 "url": "A String", # The URL where the file data can be retrieved.
143 "relativePath": "A String", # The path of the resource file relative to the
144 # root file. For root or thumbnail files,
145 # this is just the filename.
146 "contentType": "A String", # The MIME content-type, such as `image/png`.
147 # For more information, see
148 # [MIME
149 # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
150 },
151 "presentationParams": { # Hints for displaying the asset, based on information available when the asset # Hints for displaying the asset. Note that these parameters are not
152 # immutable; the author of an asset may change them post-publication.
153 # was uploaded.
154 "orientingRotation": { # A [Quaternion](//en.wikipedia.org/wiki/Quaternion). Please note: if in the # A rotation that should be applied to the object root to make it upright.
155 # More precisely, this quaternion transforms from "object space" (the space
156 # in which the object is defined) to "presentation space", a coordinate
157 # system where +Y is up, +X is right, -Z is forward. For example, if
158 # the object is the Eiffel Tower, in its local coordinate system the
159 # object might be laid out such that the base of the tower is on the
160 # YZ plane and the tip of the tower is towards positive X. In this case
161 # this quaternion would specify a rotation (of 90 degrees about the Z
162 # axis) such that in the presentation space the base of the tower is
163 # aligned with the XZ plane, and the tip of the tower lies towards +Y.
164 #
165 # This rotation is unrelated to the object's pose in the web preview,
166 # which is just a camera position setting and is *not* reflected in this
167 # rotation.
168 #
169 # Please note: this is applicable only to the gLTF.
170 # response you see "w: 1" and nothing else this is the default value of
171 # [0, 0, 0, 1] where x,y, and z are 0.
172 "y": 3.14, # The y component.
173 "x": 3.14, # The x component.
174 "z": 3.14, # The z component.
175 "w": 3.14, # The scalar component.
176 },
177 "colorSpace": "A String", # The materials' diffuse/albedo color. This does not apply to vertex colors
178 # or texture maps.
179 "backgroundColor": "A String", # A background color which could be used for displaying the 3D asset in a
180 # 'thumbnail' or 'palette' style view. Authors have the option to set this
181 # background color when publishing or editing their asset.
182 #
183 # This is represented as a six-digit hexademical triplet specifying the
184 # RGB components of the background color, e.g. #FF0000 for Red.
185 },
186 "authorName": "A String", # The author's publicly visible name. Use this name when giving credit to the
187 # author. For more information, see [Licensing](/poly/discover/licensing).
188 "isCurated": True or False, # Whether this asset has been curated by the Poly team.
189 "formats": [ # A list of Formats where each
190 # format describes one representation of the asset.
191 { # The same asset can be represented in different formats, for example,
192 # a [WaveFront .obj](//en.wikipedia.org/wiki/Wavefront_.obj_file) file with its
193 # corresponding .mtl file or a [Khronos glTF](//www.khronos.org/gltf) file
194 # with its corresponding .glb binary data. A format refers to a specific
195 # representation of an asset and contains all information needed to
196 # retrieve and describe this representation.
197 "formatType": "A String", # A short string that identifies the format type of this representation.
198 # Possible values are: `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
199 "root": { # Represents a file in Poly, which can be a root, # The root of the file hierarchy. This will always be populated.
200 # For some format_types - such as `TILT`, which are
201 # self-contained - this is all of the data.
202 #
203 # Other types - such as `OBJ` - often reference other data elements.
204 # These are contained in the resources field.
205 # resource, or thumbnail file.
206 "url": "A String", # The URL where the file data can be retrieved.
207 "relativePath": "A String", # The path of the resource file relative to the
208 # root file. For root or thumbnail files,
209 # this is just the filename.
210 "contentType": "A String", # The MIME content-type, such as `image/png`.
211 # For more information, see
212 # [MIME
213 # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
214 },
215 "formatComplexity": { # Information on the complexity of this Format. # Complexity stats about this representation of the asset.
216 "triangleCount": "A String", # The estimated number of triangles.
217 "lodHint": 42, # A non-negative integer that represents the level of detail (LOD) of this
218 # format relative to other formats of the same asset with the same
219 # format_type.
220 # This hint allows you to sort formats from the most-detailed (0) to
221 # least-detailed (integers greater than 0).
222 },
223 "resources": [ # A list of dependencies of the root element. May include, but is not
224 # limited to, materials, textures, and shader programs.
225 { # Represents a file in Poly, which can be a root,
226 # resource, or thumbnail file.
227 "url": "A String", # The URL where the file data can be retrieved.
228 "relativePath": "A String", # The path of the resource file relative to the
229 # root file. For root or thumbnail files,
230 # this is just the filename.
231 "contentType": "A String", # The MIME content-type, such as `image/png`.
232 # For more information, see
233 # [MIME
234 # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
235 },
236 ],
237 },
238 ],
239 "metadata": "A String", # Application-defined opaque metadata for this asset. This field is only
240 # returned when querying for the signed-in user's own assets, not for public
241 # assets. This string is limited to 1K chars. It is up to the creator of
242 # the asset to define the format for this string (for example, JSON).
243 "createTime": "A String", # For published assets, the time when the asset was published.
244 # For unpublished assets, the time when the asset was created.
245 "remixInfo": { # Info about the sources of this asset (i.e. assets that were remixed to # The remix info for the asset.
246 # create this asset).
247 "sourceAsset": [ # Resource ids for the sources of this remix, of the form:
248 # `assets/{ASSET_ID}`
249 "A String",
250 ],
251 },
252 "name": "A String", # The unique identifier for the asset in the form:
253 # `assets/{ASSET_ID}`.
254 },
255 },
256 ],
257 }</pre>
258</div>
259
260<div class="method">
261 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
262 <pre>Retrieves the next page of results.
263
264Args:
265 previous_request: The request for the previous page. (required)
266 previous_response: The response from the request for the previous page. (required)
267
268Returns:
269 A request object that you can call 'execute()' on to request the next
270 page. Returns None if there are no more items in the collection.
271 </pre>
272</div>
273
274</body></html>