datagen.api.catalog.glasses#
- class datagen.api.catalog.glasses#
This class gives you access to the catalog of glasses assets. When you get a 3D asset from this catalog, it comes in the form of a
datagen.api.assets.Glasses
object.You can query the glasses catalog using these functions:
- get(self, id: str = None, limit: int = None, **attributes) Union[Glasses, List[Glasses]]: #
Gets glasses assets from the asset catalog.
- Parameters:
id (str) – Optional. Searches for a specific glasses asset matching the chosen UUID.
limit (int) –
Optional. Caps the number of
datagen.api.assets.Glasses
objects that will be included in the response.If limit=1, returns a single
datagen.api.assets.Glasses
object.If limit>1, returns an object of type List[
datagen.api.assets.Glasses
] (even if there turns out to be only one matching glasses asset in that list).
attributes (Any) – Optional. A dictionary of attributes matching one or more of the properties in
datagen.api.catalog.attributes.GlassesAttributes
.
- Returns:
The glasses asset or assets that match your search query
- Return type:
List[
datagen.api.assets.Glasses
] in the form of a lazy listdatagen.api.assets.Glasses
when limit=1 or when an id is provided
- count(self, **attributes) int: #
Queries the catalog for the number of glasses assets matching a request
- Parameters:
attributes (Any) – Optional. A dictionary of attributes matching one or more of the properties in
datagen.api.catalog.attributes.GlassesAttributes
.- Returns:
The number of glasses assets in the catalog matching your query.
- Return type:
int