Module thingiverse.types.search
Expand source code
from datetime import datetime
from typing import Optional, Text, TypedDict, List
class Creator(TypedDict):
"""A creator of a resource like a Thing"""
id: int
name: Text
first_name: Text
last_name: Text
url: Text
public_url: Text
thumbnail: Text
count_of_followers: int
count_of_following: int
count_of_designs: int
accepts_tips: bool
is_following: bool
location: Text
cover: Text
class Tag(TypedDict):
"""A Thingiverse Tag"""
name: Text
tag: Text
url: Text
count: int
things_url: Text
absolute_url: Text
class SearchResult(TypedDict):
"""Search response result"""
id: int
name: Text
url: Text
public_url: Text
created_at: datetime
thumbnail: Text
preview_image: Text
creator: Creator
is_private: Optional[bool]
is_purchased: Optional[bool]
is_published: Optional[bool]
comment_count: int
make_count: int
like_count: int
tags: List[Tag]
is_nsfw: bool
class SearchResponse(TypedDict):
"""Response from a `/search` endpoint call"""
total: int
hits: List[SearchResult]
Classes
class Creator (*args, **kwargs)-
A creator of a resource like a Thing
Expand source code
class Creator(TypedDict): """A creator of a resource like a Thing""" id: int name: Text first_name: Text last_name: Text url: Text public_url: Text thumbnail: Text count_of_followers: int count_of_following: int count_of_designs: int accepts_tips: bool is_following: bool location: Text cover: TextAncestors
- builtins.dict
Class variables
var accepts_tips : boolvar count_of_designs : intvar count_of_followers : intvar count_of_following : intvar cover : strvar first_name : strvar id : intvar is_following : boolvar last_name : strvar location : strvar name : strvar public_url : strvar thumbnail : strvar url : str
class SearchResponse (*args, **kwargs)-
Response from a
/searchendpoint callExpand source code
class SearchResponse(TypedDict): """Response from a `/search` endpoint call""" total: int hits: List[SearchResult]Ancestors
- builtins.dict
Class variables
var hits : List[SearchResult]var total : int
class SearchResult (*args, **kwargs)-
Search response result
Expand source code
class SearchResult(TypedDict): """Search response result""" id: int name: Text url: Text public_url: Text created_at: datetime thumbnail: Text preview_image: Text creator: Creator is_private: Optional[bool] is_purchased: Optional[bool] is_published: Optional[bool] comment_count: int make_count: int like_count: int tags: List[Tag] is_nsfw: boolAncestors
- builtins.dict
Class variables
var comment_count : intvar created_at : datetime.datetimevar creator : Creatorvar id : intvar is_nsfw : boolvar is_private : Optional[bool]var is_published : Optional[bool]var is_purchased : Optional[bool]var like_count : intvar make_count : intvar name : strvar preview_image : strvar public_url : strvar thumbnail : strvar url : str
class Tag (*args, **kwargs)-
A Thingiverse Tag
Expand source code
class Tag(TypedDict): """A Thingiverse Tag""" name: Text tag: Text url: Text count: int things_url: Text absolute_url: TextAncestors
- builtins.dict
Class variables
var absolute_url : strvar count : intvar name : strvar tag : strvar things_url : strvar url : str