Update data structures and scene creation to account for backend publishing update.
This commit is contained in:
Родитель
9d743f0883
Коммит
473c2ca082
|
@ -286,6 +286,7 @@ class SceneHydrated:
|
|||
content: SceneContentHydrated
|
||||
text: str
|
||||
previews: ScenePreviews
|
||||
published: bool
|
||||
|
||||
|
||||
@dataclass_json(undefined="EXCLUDE")
|
||||
|
@ -297,6 +298,8 @@ class SceneInfo:
|
|||
likes: int
|
||||
clicks: Optional[int]
|
||||
shares: Optional[int]
|
||||
text: str
|
||||
published: bool
|
||||
|
||||
|
||||
@dataclass_json(undefined="EXCLUDE")
|
||||
|
@ -306,9 +309,17 @@ class ScenePermissions:
|
|||
edit: bool
|
||||
|
||||
|
||||
@dataclass_json(undefined="EXCLUDE")
|
||||
@dataclass
|
||||
class SceneContentUpdate:
|
||||
background_id: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass_json(undefined="EXCLUDE")
|
||||
@dataclass
|
||||
class SceneUpdate:
|
||||
outgoing_url: Optional[str] = None
|
||||
place: Optional[ScenePlace] = None
|
||||
text: Optional[str] = None
|
||||
content: Optional[SceneContentUpdate] = None
|
||||
publish: Optional[bool] = None
|
||||
|
|
|
@ -70,6 +70,7 @@ class AddSceneRequest:
|
|||
place: ScenePlace
|
||||
content: SceneContent
|
||||
text: str
|
||||
publish: bool
|
||||
outgoing_url: Optional[str] = None
|
||||
|
||||
|
||||
|
@ -187,7 +188,7 @@ class HandleClient:
|
|||
page_num : int
|
||||
Which page to retrieve. Page zero gives the most recently-created
|
||||
scenes, page one gives the next batch, etc.
|
||||
page_size : optinal int, defaults to 10
|
||||
page_size : optional int, defaults to 10
|
||||
The number of items per page to retrieve. Valid values are between
|
||||
1 and 100.
|
||||
|
||||
|
@ -532,6 +533,7 @@ class HandleClient:
|
|||
content=content,
|
||||
text=text,
|
||||
outgoing_url=outgoing_url,
|
||||
publish=True,
|
||||
)
|
||||
|
||||
return self.add_scene(req)
|
||||
|
|
Загрузка…
Ссылка в новой задаче