Skip to content

Commit

Permalink
Change forum post revision data class.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed Apr 15, 2024
1 parent 04364b0 commit fb23f08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions yellowstone/request/forum_post_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

@dataclass
class ForumPostRevisionData:
revision_id: int
post_id: int
title: str
content: str
html: str


def get(
Expand Down Expand Up @@ -49,6 +51,8 @@ def get(
assert response["body"] == "ok", "Response body not 'ok'"
assert response["postId"] == post_id, "Post ID does not match response"
return ForumPostRevisionData(
revision_id=revision_id,
post_id=post_id,
title=response["title"],
content=response["content"].strip(),
html=response["content"].strip(),
)

0 comments on commit fb23f08

Please sign in to comment.