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: Text

Ancestors

  • builtins.dict

Class variables

var accepts_tips : bool
var count_of_designs : int
var count_of_followers : int
var count_of_following : int
var cover : str
var first_name : str
var id : int
var is_following : bool
var last_name : str
var location : str
var name : str
var public_url : str
var thumbnail : str
var url : str
class SearchResponse (*args, **kwargs)

Response from a /search endpoint call

Expand 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: bool

Ancestors

  • builtins.dict

Class variables

var comment_count : int
var created_at : datetime.datetime
var creatorCreator
var id : int
var is_nsfw : bool
var is_private : Optional[bool]
var is_published : Optional[bool]
var is_purchased : Optional[bool]
var like_count : int
var make_count : int
var name : str
var preview_image : str
var public_url : str
var tags : List[Tag]
var thumbnail : str
var 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: Text

Ancestors

  • builtins.dict

Class variables

var absolute_url : str
var count : int
var name : str
var tag : str
var things_url : str
var url : str