• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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.assets.html">assets</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
79<p class="firstline">Returns detailed information about an asset given its name.</p>
80<p class="toc_element">
81  <code><a href="#list">list(orderBy=None, pageSize=None, maxComplexity=None, keywords=None, x__xgafv=None, category=None, pageToken=None, format=None, curated=None)</a></code></p>
82<p class="firstline">Lists all public, remixable assets. These are assets with an access level</p>
83<p class="toc_element">
84  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
88    <code class="details" id="get">get(name, x__xgafv=None)</code>
89  <pre>Returns detailed information about an asset given its name.
90PRIVATE assets are returned only if
91 the currently authenticated user (via OAuth token) is the author of the
92 asset.
93
94Args:
95  name: string, Required. An asset's name in the form `assets/{ASSET_ID}`. (required)
96  x__xgafv: string, V1 error format.
97    Allowed values
98      1 - v1 error format
99      2 - v2 error format
100
101Returns:
102  An object of the form:
103
104    { # Represents and describes an asset in the Poly library. An asset is a 3D model
105      # or scene created using [Tilt Brush](//www.tiltbrush.com),
106      # [Blocks](//vr.google.com/blocks/), or any 3D program that produces a file
107      # that can be upload to Poly.
108    "updateTime": "A String", # The time when the asset was last modified. For published assets, whose
109        # contents are immutable, the update time changes only when metadata
110        # properties, such as visibility, are updated.
111    "displayName": "A String", # The human-readable name, set by the asset's author.
112    "description": "A String", # The human-readable description, set by the asset's author.
113    "license": "A String", # The license under which the author has made the asset available
114        # for use, if any.
115    "visibility": "A String", # The visibility of the asset and who can access it.
116    "thumbnail": { # Represents a file in Poly, which can be a root, # The thumbnail image for the asset.
117        # resource, or thumbnail file.
118      "url": "A String", # The URL where the file data can be retrieved.
119      "relativePath": "A String", # The path of the resource file relative to the
120          # root file. For root or thumbnail files,
121          # this is just the filename.
122      "contentType": "A String", # The MIME content-type, such as `image/png`.
123          # For more information, see
124          # [MIME
125          # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
126    },
127    "presentationParams": { # Hints for displaying the asset, based on information available when the asset # Hints for displaying the asset. Note that these parameters are not
128        # immutable; the author of an asset may change them post-publication.
129        # was uploaded.
130      "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.
131          # More precisely, this quaternion transforms from "object space" (the space
132          # in which the object is defined) to "presentation space", a coordinate
133          # system where +Y is up, +X is right, -Z is forward. For example, if
134          # the object is the Eiffel Tower, in its local coordinate system the
135          # object might be laid out such that the base of the tower is on the
136          # YZ plane and the tip of the tower is towards positive X. In this case
137          # this quaternion would specify a rotation (of 90 degrees about the Z
138          # axis) such that in the presentation space the base of the tower is
139          # aligned with the XZ plane, and the tip of the tower lies towards +Y.
140          #
141          # This rotation is unrelated to the object's pose in the web preview,
142          # which is just a camera position setting and is *not* reflected in this
143          # rotation.
144          #
145          # Please note: this is applicable only to the gLTF.
146          # response you see "w: 1" and nothing else this is the default value of
147          # [0, 0, 0, 1] where x,y, and z are 0.
148        "y": 3.14, # The y component.
149        "x": 3.14, # The x component.
150        "z": 3.14, # The z component.
151        "w": 3.14, # The scalar component.
152      },
153      "colorSpace": "A String", # The materials' diffuse/albedo color. This does not apply to vertex colors
154          # or texture maps.
155      "backgroundColor": "A String", # A background color which could be used for displaying the 3D asset in a
156          # 'thumbnail' or 'palette' style view. Authors have the option to set this
157          # background color when publishing or editing their asset.
158          #
159          # This is represented as a six-digit hexademical triplet specifying the
160          # RGB components of the background color, e.g. #FF0000 for Red.
161    },
162    "authorName": "A String", # The author's publicly visible name. Use this name when giving credit to the
163        # author. For more information, see [Licensing](/poly/discover/licensing).
164    "isCurated": True or False, # Whether this asset has been curated by the Poly team.
165    "formats": [ # A list of Formats where each
166        # format describes one representation of the asset.
167      { # The same asset can be represented in different formats, for example,
168          # a [WaveFront .obj](//en.wikipedia.org/wiki/Wavefront_.obj_file) file with its
169          # corresponding .mtl file or a [Khronos glTF](//www.khronos.org/gltf) file
170          # with its corresponding .glb binary data. A format refers to a specific
171          # representation of an asset and contains all information needed to
172          # retrieve and describe this representation.
173        "formatType": "A String", # A short string that identifies the format type of this representation.
174            # Possible values are: `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
175        "root": { # Represents a file in Poly, which can be a root, # The root of the file hierarchy. This will always be populated.
176            # For some format_types - such as `TILT`, which are
177            # self-contained - this is all of the data.
178            #
179            # Other types - such as `OBJ` - often reference other data elements.
180            # These are contained in the resources field.
181            # resource, or thumbnail file.
182          "url": "A String", # The URL where the file data can be retrieved.
183          "relativePath": "A String", # The path of the resource file relative to the
184              # root file. For root or thumbnail files,
185              # this is just the filename.
186          "contentType": "A String", # The MIME content-type, such as `image/png`.
187              # For more information, see
188              # [MIME
189              # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
190        },
191        "formatComplexity": { # Information on the complexity of this Format. # Complexity stats about this representation of the asset.
192          "triangleCount": "A String", # The estimated number of triangles.
193          "lodHint": 42, # A non-negative integer that represents the level of detail (LOD) of this
194              # format relative to other formats of the same asset with the same
195              # format_type.
196              # This hint allows you to sort formats from the most-detailed (0) to
197              # least-detailed (integers greater than 0).
198        },
199        "resources": [ # A list of dependencies of the root element. May include, but is not
200            # limited to, materials, textures, and shader programs.
201          { # Represents a file in Poly, which can be a root,
202              # resource, or thumbnail file.
203            "url": "A String", # The URL where the file data can be retrieved.
204            "relativePath": "A String", # The path of the resource file relative to the
205                # root file. For root or thumbnail files,
206                # this is just the filename.
207            "contentType": "A String", # The MIME content-type, such as `image/png`.
208                # For more information, see
209                # [MIME
210                # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
211          },
212        ],
213      },
214    ],
215    "metadata": "A String", # Application-defined opaque metadata for this asset. This field is only
216        # returned when querying for the signed-in user's own assets, not for public
217        # assets. This string is limited to 1K chars. It is up to the creator of
218        # the asset to define the format for this string (for example, JSON).
219    "createTime": "A String", # For published assets, the time when the asset was published.
220        # For unpublished assets, the time when the asset was created.
221    "remixInfo": { # Info about the sources of this asset (i.e. assets that were remixed to # The remix info for the asset.
222        # create this asset).
223      "sourceAsset": [ # Resource ids for the sources of this remix, of the form:
224          # `assets/{ASSET_ID}`
225        "A String",
226      ],
227    },
228    "name": "A String", # The unique identifier for the asset in the form:
229        # `assets/{ASSET_ID}`.
230  }</pre>
231</div>
232
233<div class="method">
234    <code class="details" id="list">list(orderBy=None, pageSize=None, maxComplexity=None, keywords=None, x__xgafv=None, category=None, pageToken=None, format=None, curated=None)</code>
235  <pre>Lists all public, remixable assets. These are assets with an access level
236of PUBLIC and published under the
237CC-By license.
238
239Args:
240  orderBy: string, Specifies an ordering for assets. Acceptable values are:
241`BEST`, `NEWEST`, `OLDEST`. Defaults to `BEST`, which ranks assets
242based on a combination of popularity and other features.
243  pageSize: integer, The maximum number of assets to be returned. This value must be between `1`
244and `100`. Defaults to `20`.
245  maxComplexity: string, Returns assets that are of the specified complexity or less. Defaults to
246COMPLEX. For example, a request for
247MEDIUM assets also includes
248SIMPLE assets.
249  keywords: string, One or more search terms to be matched against all text that Poly has
250indexed for assets, which includes display_name,
251description, and tags. Multiple keywords should be
252separated by spaces.
253  x__xgafv: string, V1 error format.
254    Allowed values
255      1 - v1 error format
256      2 - v2 error format
257  category: string, Filter assets based on the specified category. Supported values are:
258`animals`, `architecture`, `art`, `food`, `nature`, `objects`, `people`,
259`scenes`, `technology`, and `transport`.
260  pageToken: string, Specifies a continuation token from a previous search whose results were
261split into multiple pages. To get the next page, submit the same request
262specifying the value from
263next_page_token.
264  format: string, Return only assets with the matching format. Acceptable values are:
265`BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, `TILT`.
266  curated: boolean, Return only assets that have been curated by the Poly team.
267
268Returns:
269  An object of the form:
270
271    { # A response message from a request to list.
272    "nextPageToken": "A String", # The continuation token for retrieving the next page. If empty,
273        # indicates that there are no more pages. To get the next page, submit the
274        # same request specifying this value as the
275        # page_token.
276    "totalSize": 42, # The total number of assets in the list, without pagination.
277    "assets": [ # A list of assets that match the criteria specified in the request.
278      { # Represents and describes an asset in the Poly library. An asset is a 3D model
279          # or scene created using [Tilt Brush](//www.tiltbrush.com),
280          # [Blocks](//vr.google.com/blocks/), or any 3D program that produces a file
281          # that can be upload to Poly.
282        "updateTime": "A String", # The time when the asset was last modified. For published assets, whose
283            # contents are immutable, the update time changes only when metadata
284            # properties, such as visibility, are updated.
285        "displayName": "A String", # The human-readable name, set by the asset's author.
286        "description": "A String", # The human-readable description, set by the asset's author.
287        "license": "A String", # The license under which the author has made the asset available
288            # for use, if any.
289        "visibility": "A String", # The visibility of the asset and who can access it.
290        "thumbnail": { # Represents a file in Poly, which can be a root, # The thumbnail image for the asset.
291            # resource, or thumbnail file.
292          "url": "A String", # The URL where the file data can be retrieved.
293          "relativePath": "A String", # The path of the resource file relative to the
294              # root file. For root or thumbnail files,
295              # this is just the filename.
296          "contentType": "A String", # The MIME content-type, such as `image/png`.
297              # For more information, see
298              # [MIME
299              # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
300        },
301        "presentationParams": { # Hints for displaying the asset, based on information available when the asset # Hints for displaying the asset. Note that these parameters are not
302            # immutable; the author of an asset may change them post-publication.
303            # was uploaded.
304          "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.
305              # More precisely, this quaternion transforms from "object space" (the space
306              # in which the object is defined) to "presentation space", a coordinate
307              # system where +Y is up, +X is right, -Z is forward. For example, if
308              # the object is the Eiffel Tower, in its local coordinate system the
309              # object might be laid out such that the base of the tower is on the
310              # YZ plane and the tip of the tower is towards positive X. In this case
311              # this quaternion would specify a rotation (of 90 degrees about the Z
312              # axis) such that in the presentation space the base of the tower is
313              # aligned with the XZ plane, and the tip of the tower lies towards +Y.
314              #
315              # This rotation is unrelated to the object's pose in the web preview,
316              # which is just a camera position setting and is *not* reflected in this
317              # rotation.
318              #
319              # Please note: this is applicable only to the gLTF.
320              # response you see "w: 1" and nothing else this is the default value of
321              # [0, 0, 0, 1] where x,y, and z are 0.
322            "y": 3.14, # The y component.
323            "x": 3.14, # The x component.
324            "z": 3.14, # The z component.
325            "w": 3.14, # The scalar component.
326          },
327          "colorSpace": "A String", # The materials' diffuse/albedo color. This does not apply to vertex colors
328              # or texture maps.
329          "backgroundColor": "A String", # A background color which could be used for displaying the 3D asset in a
330              # 'thumbnail' or 'palette' style view. Authors have the option to set this
331              # background color when publishing or editing their asset.
332              #
333              # This is represented as a six-digit hexademical triplet specifying the
334              # RGB components of the background color, e.g. #FF0000 for Red.
335        },
336        "authorName": "A String", # The author's publicly visible name. Use this name when giving credit to the
337            # author. For more information, see [Licensing](/poly/discover/licensing).
338        "isCurated": True or False, # Whether this asset has been curated by the Poly team.
339        "formats": [ # A list of Formats where each
340            # format describes one representation of the asset.
341          { # The same asset can be represented in different formats, for example,
342              # a [WaveFront .obj](//en.wikipedia.org/wiki/Wavefront_.obj_file) file with its
343              # corresponding .mtl file or a [Khronos glTF](//www.khronos.org/gltf) file
344              # with its corresponding .glb binary data. A format refers to a specific
345              # representation of an asset and contains all information needed to
346              # retrieve and describe this representation.
347            "formatType": "A String", # A short string that identifies the format type of this representation.
348                # Possible values are: `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
349            "root": { # Represents a file in Poly, which can be a root, # The root of the file hierarchy. This will always be populated.
350                # For some format_types - such as `TILT`, which are
351                # self-contained - this is all of the data.
352                #
353                # Other types - such as `OBJ` - often reference other data elements.
354                # These are contained in the resources field.
355                # resource, or thumbnail file.
356              "url": "A String", # The URL where the file data can be retrieved.
357              "relativePath": "A String", # The path of the resource file relative to the
358                  # root file. For root or thumbnail files,
359                  # this is just the filename.
360              "contentType": "A String", # The MIME content-type, such as `image/png`.
361                  # For more information, see
362                  # [MIME
363                  # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
364            },
365            "formatComplexity": { # Information on the complexity of this Format. # Complexity stats about this representation of the asset.
366              "triangleCount": "A String", # The estimated number of triangles.
367              "lodHint": 42, # A non-negative integer that represents the level of detail (LOD) of this
368                  # format relative to other formats of the same asset with the same
369                  # format_type.
370                  # This hint allows you to sort formats from the most-detailed (0) to
371                  # least-detailed (integers greater than 0).
372            },
373            "resources": [ # A list of dependencies of the root element. May include, but is not
374                # limited to, materials, textures, and shader programs.
375              { # Represents a file in Poly, which can be a root,
376                  # resource, or thumbnail file.
377                "url": "A String", # The URL where the file data can be retrieved.
378                "relativePath": "A String", # The path of the resource file relative to the
379                    # root file. For root or thumbnail files,
380                    # this is just the filename.
381                "contentType": "A String", # The MIME content-type, such as `image/png`.
382                    # For more information, see
383                    # [MIME
384                    # types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
385              },
386            ],
387          },
388        ],
389        "metadata": "A String", # Application-defined opaque metadata for this asset. This field is only
390            # returned when querying for the signed-in user's own assets, not for public
391            # assets. This string is limited to 1K chars. It is up to the creator of
392            # the asset to define the format for this string (for example, JSON).
393        "createTime": "A String", # For published assets, the time when the asset was published.
394            # For unpublished assets, the time when the asset was created.
395        "remixInfo": { # Info about the sources of this asset (i.e. assets that were remixed to # The remix info for the asset.
396            # create this asset).
397          "sourceAsset": [ # Resource ids for the sources of this remix, of the form:
398              # `assets/{ASSET_ID}`
399            "A String",
400          ],
401        },
402        "name": "A String", # The unique identifier for the asset in the form:
403            # `assets/{ASSET_ID}`.
404      },
405    ],
406  }</pre>
407</div>
408
409<div class="method">
410    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
411  <pre>Retrieves the next page of results.
412
413Args:
414  previous_request: The request for the previous page. (required)
415  previous_response: The response from the request for the previous page. (required)
416
417Returns:
418  A request object that you can call 'execute()' on to request the next
419  page. Returns None if there are no more items in the collection.
420    </pre>
421</div>
422
423</body></html>