-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathresponses.py
More file actions
executable file
·80 lines (70 loc) · 1.91 KB
/
responses.py
File metadata and controls
executable file
·80 lines (70 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
from pydantic import BaseModel
from typing import Optional
from datetime import datetime, date
from typing import List
class BaseUserResponse(BaseModel):
id: int
username: str
class UserResponse(BaseUserResponse):
biography: Optional[str]
birthdate: Optional[date]
company: Optional[str]
created_at: datetime
email: Optional[str]
fullname: Optional[str]
location: Optional[str]
website: Optional[str]
class MeResponse(UserResponse):
display_birthday: bool
email_public: bool
hide_inappropriate: bool
class ImageSize(BaseModel):
url: str
width: int
height: int
class ImageSizes(BaseModel):
is_3dmodel: Optional[bool]
upload_id: Optional[int]
thumbnail: ImageSize
small: ImageSize
medium: ImageSize
large: ImageSize
class ItemRevisionResponse(BaseModel):
id: int
name: str
description: str
instructions: str
tags: Optional[str]
license: str
version: str
flagged_at: Optional[datetime]
previewImage: Optional[ImageSizes]
images: Optional[List[ImageSizes]]
class ItemResponse(BaseModel):
id: int
revision_id: int
name: str
description: str
instructions: str
tags: Optional[str]
license: str
version: str
flagged_at: Optional[datetime]
previewImage: Optional[ImageSizes]
images: Optional[List[ImageSizes]]
user: Optional[BaseUserResponse]
item_revision: Optional[ItemRevisionResponse]
item_revisions: Optional[List[ItemRevisionResponse]]
class PaginatedItemsResponse(BaseModel):
offset: int
limit: int
count: Optional[int]
results: List[ItemResponse]
dude: Optional[int]
class PaginatedSearchResponse(PaginatedItemsResponse):
q: str
class PaginatedUsersResponse(BaseModel):
offset: int
limit: int
count: Optional[int]
results: List[UserResponse]