Skip to content

Commit

Permalink
list_subscriptions: Encoded list_subscriptions parameters.
Browse files Browse the repository at this point in the history
Rectified the list_subscriptions api parameters to ,
take up default parameters rather than a dictionary .

As discussed within zulip/zulip#16698
  • Loading branch information
aryanshridhar committed Nov 12, 2020
1 parent f2d80c6 commit 228488e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zulip/zulip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,14 +1278,16 @@ def remove_alert_words(self, alert_words: List[str]) -> Dict[str, Any]:
}
)

def list_subscriptions(self, request: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
def list_subscriptions(self, include_subscribers: bool = False) -> Dict[str, Any]:
'''
See examples/list-subscriptions for example usage.
'''
return self.call_endpoint(
url='users/me/subscriptions',
method='GET',
request=request,
request={
'include_subscribers': include_subscribers
}
)

def add_subscriptions(self, streams: Iterable[Dict[str, Any]], **kwargs: Any) -> Dict[str, Any]:
Expand Down

0 comments on commit 228488e

Please sign in to comment.