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
|
content: SceneContentHydrated
|
||||||
text: str
|
text: str
|
||||||
previews: ScenePreviews
|
previews: ScenePreviews
|
||||||
|
published: bool
|
||||||
|
|
||||||
|
|
||||||
@dataclass_json(undefined="EXCLUDE")
|
@dataclass_json(undefined="EXCLUDE")
|
||||||
|
@ -297,6 +298,8 @@ class SceneInfo:
|
||||||
likes: int
|
likes: int
|
||||||
clicks: Optional[int]
|
clicks: Optional[int]
|
||||||
shares: Optional[int]
|
shares: Optional[int]
|
||||||
|
text: str
|
||||||
|
published: bool
|
||||||
|
|
||||||
|
|
||||||
@dataclass_json(undefined="EXCLUDE")
|
@dataclass_json(undefined="EXCLUDE")
|
||||||
|
@ -306,9 +309,17 @@ class ScenePermissions:
|
||||||
edit: bool
|
edit: bool
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass_json(undefined="EXCLUDE")
|
||||||
|
@dataclass
|
||||||
|
class SceneContentUpdate:
|
||||||
|
background_id: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
@dataclass_json(undefined="EXCLUDE")
|
@dataclass_json(undefined="EXCLUDE")
|
||||||
@dataclass
|
@dataclass
|
||||||
class SceneUpdate:
|
class SceneUpdate:
|
||||||
outgoing_url: Optional[str] = None
|
outgoing_url: Optional[str] = None
|
||||||
place: Optional[ScenePlace] = None
|
place: Optional[ScenePlace] = None
|
||||||
text: Optional[str] = None
|
text: Optional[str] = None
|
||||||
|
content: Optional[SceneContentUpdate] = None
|
||||||
|
publish: Optional[bool] = None
|
||||||
|
|
|
@ -70,6 +70,7 @@ class AddSceneRequest:
|
||||||
place: ScenePlace
|
place: ScenePlace
|
||||||
content: SceneContent
|
content: SceneContent
|
||||||
text: str
|
text: str
|
||||||
|
publish: bool
|
||||||
outgoing_url: Optional[str] = None
|
outgoing_url: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
|
@ -187,7 +188,7 @@ class HandleClient:
|
||||||
page_num : int
|
page_num : int
|
||||||
Which page to retrieve. Page zero gives the most recently-created
|
Which page to retrieve. Page zero gives the most recently-created
|
||||||
scenes, page one gives the next batch, etc.
|
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
|
The number of items per page to retrieve. Valid values are between
|
||||||
1 and 100.
|
1 and 100.
|
||||||
|
|
||||||
|
@ -532,6 +533,7 @@ class HandleClient:
|
||||||
content=content,
|
content=content,
|
||||||
text=text,
|
text=text,
|
||||||
outgoing_url=outgoing_url,
|
outgoing_url=outgoing_url,
|
||||||
|
publish=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
return self.add_scene(req)
|
return self.add_scene(req)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче