diff --git a/src/fopost/models.py b/src/fopost/models.py index be93a11..b0f3a58 100644 --- a/src/fopost/models.py +++ b/src/fopost/models.py @@ -677,7 +677,7 @@ class InboxPostContext(FopostModel): class InboxItem(FopostModel): - """A comment, mention or direct message on a connected account.""" + """A comment, mention, review or direct message on a connected account.""" id: str workspace_id: str | None = None @@ -690,6 +690,8 @@ class InboxItem(FopostModel): author_handle: str | None = None author_avatar_url: str | None = None text: str | None = None + #: Stars on a review, 1-5. ``None`` on every other type. + rating: int | None = None attachments: list[InboxAttachment] = [] permalink: str | None = None post_external_id: str | None = None @@ -729,6 +731,8 @@ class InboxThread(FopostModel): last_comment_at: datetime | None = None last_comment_text: str | None = None last_comment_author: str | None = None + #: Stars, on a review thread. ``None`` on comments and mentions. + rating: int | None = None post: InboxPostContext | None = None account: InboxAccountRef | None = None diff --git a/src/fopost/resources/inbox.py b/src/fopost/resources/inbox.py index 2e0efa8..9cf9af8 100644 --- a/src/fopost/resources/inbox.py +++ b/src/fopost/resources/inbox.py @@ -1,4 +1,4 @@ -"""``client.inbox`` — comments, mentions and direct messages on connected accounts.""" +"""``client.inbox`` — comments, mentions, reviews and direct messages on connected accounts.""" from __future__ import annotations @@ -84,7 +84,11 @@ def threads( page: int = 1, per_page: int = 25, ) -> Page[InboxThread]: - """One row per post with comments; ``kind="mentions"`` for posts we were tagged in.""" + """One row per post with comments. + + ``kind="mentions"`` returns the posts we were tagged in, ``kind="reviews"`` + one row per review left on the business, each carrying its ``rating``. + """ body = self._http.get( "/inbox/posts", {