Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 85 additions & 61 deletions getstream/chat/async_rest_client.py

Large diffs are not rendered by default.

146 changes: 85 additions & 61 deletions getstream/chat/rest_client.py

Large diffs are not rendered by default.

150 changes: 110 additions & 40 deletions getstream/common/async_rest_client.py

Large diffs are not rendered by default.

148 changes: 108 additions & 40 deletions getstream/common/rest_client.py

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions getstream/feeds/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def get_or_create(
user_id: Optional[str] = None,
view: Optional[str] = None,
watch: Optional[bool] = None,
discard_actors: Optional[List[str]] = None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Preserve existing positional argument bindings.

These new parameters precede existing parameters in public methods. An existing positional call can now send a value as a different request option. For example, follow_batch(follows, True) previously set create_users; it now sets _async, which FollowBatch rejects. Append new options after existing parameters, or otherwise preserve the old positional bindings in the generated API.

  • getstream/feeds/feeds.py#L43-L43: preserve the existing binding of data and subsequent feed options.
  • getstream/feeds/feeds.py#L249-L249: preserve the existing binding of limit and subsequent pinned-activity options.
  • getstream/feeds/rest_client.py#L50-L50: preserve the existing binding of skip_push and subsequent activity fields.
  • getstream/feeds/rest_client.py#L176-L176: preserve the existing binding of include_private_activities and subsequent query fields.
  • getstream/feeds/rest_client.py#L345-L345: preserve the existing binding of user_id, user, and vote.
  • getstream/feeds/rest_client.py#L523-L523: preserve the existing binding of user_id, language, and translate_text.
  • getstream/feeds/rest_client.py#L952-L952: preserve the existing binding of limit and subsequent comment-query fields.
  • getstream/feeds/rest_client.py#L1469-L1469: preserve the existing binding of data and subsequent feed options.
  • getstream/feeds/rest_client.py#L1768-L1768: preserve the existing binding of limit and subsequent pinned-activity options.
  • getstream/feeds/rest_client.py#L2248-L2248: preserve the existing binding of create_users and enrich_own_fields.
  • getstream/feeds/rest_client.py#L2264-L2264: preserve the existing binding of create_users and enrich_own_fields.
  • getstream/feeds/rest_client.py#L2524-L2524: preserve the existing binding of delete_notification_activity and enrich_own_fields.
  • getstream/feeds/rest_client.py#L2542-L2542: preserve the existing binding of delete_notification_activity and enrich_own_fields.
📍 Affects 2 files
  • getstream/feeds/feeds.py#L43-L43 (this comment)
  • getstream/feeds/feeds.py#L249-L249
  • getstream/feeds/rest_client.py#L50-L50
  • getstream/feeds/rest_client.py#L176-L176
  • getstream/feeds/rest_client.py#L345-L345
  • getstream/feeds/rest_client.py#L523-L523
  • getstream/feeds/rest_client.py#L952-L952
  • getstream/feeds/rest_client.py#L1469-L1469
  • getstream/feeds/rest_client.py#L1768-L1768
  • getstream/feeds/rest_client.py#L2248-L2248
  • getstream/feeds/rest_client.py#L2264-L2264
  • getstream/feeds/rest_client.py#L2524-L2524
  • getstream/feeds/rest_client.py#L2542-L2542

data: Optional[FeedInput] = None,
enrichment_options: Optional[EnrichmentOptions] = None,
external_ranking: Optional[Dict[str, object]] = None,
Expand All @@ -64,6 +65,7 @@ def get_or_create(
user_id=user_id,
view=view,
watch=watch,
discard_actors=discard_actors,
data=data,
enrichment_options=enrichment_options,
external_ranking=external_ranking,
Expand Down Expand Up @@ -244,23 +246,33 @@ def query_pinned_activities(
language: Optional[str] = None,
translate_text: Optional[bool] = None,
enrich_own_fields: Optional[bool] = None,
include_expired_activities: Optional[bool] = None,
include_moderated_activities: Optional[bool] = None,
include_soft_deleted_activities: Optional[bool] = None,
limit: Optional[int] = None,
next: Optional[str] = None,
prev: Optional[str] = None,
user_id: Optional[str] = None,
sort: Optional[List[SortParamRequest]] = None,
filter: Optional[Dict[str, object]] = None,
user: Optional[UserRequest] = None,
) -> StreamResponse[QueryPinnedActivitiesResponse]:
response = self.client.query_pinned_activities(
feed_group_id=self.feed_group,
feed_id=self.id,
language=language,
translate_text=translate_text,
enrich_own_fields=enrich_own_fields,
include_expired_activities=include_expired_activities,
include_moderated_activities=include_moderated_activities,
include_soft_deleted_activities=include_soft_deleted_activities,
limit=limit,
next=next,
prev=prev,
user_id=user_id,
sort=sort,
filter=filter,
user=user,
)
self._sync_from_response(response.data)
return response
Expand Down
Loading
Loading