stream-chat 4.12.0__py3-none-any.whl → 4.12.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stream_chat/__pkg__.py +1 -1
- stream_chat/async_chat/campaign.py +4 -2
- stream_chat/async_chat/client.py +6 -1
- stream_chat/base/campaign.py +3 -1
- stream_chat/base/client.py +2 -1
- stream_chat/campaign.py +4 -2
- stream_chat/client.py +7 -2
- stream_chat/types/campaign.py +3 -1
- {stream_chat-4.12.0.dist-info → stream_chat-4.12.1.dist-info}/METADATA +2 -2
- {stream_chat-4.12.0.dist-info → stream_chat-4.12.1.dist-info}/RECORD +13 -13
- {stream_chat-4.12.0.dist-info → stream_chat-4.12.1.dist-info}/LICENSE +0 -0
- {stream_chat-4.12.0.dist-info → stream_chat-4.12.1.dist-info}/WHEEL +0 -0
- {stream_chat-4.12.0.dist-info → stream_chat-4.12.1.dist-info}/top_level.txt +0 -0
stream_chat/__pkg__.py
CHANGED
|
@@ -38,10 +38,12 @@ class Campaign(CampaignInterface):
|
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
async def start(
|
|
41
|
-
self,
|
|
41
|
+
self,
|
|
42
|
+
scheduled_for: Optional[Union[str, datetime.datetime]] = None,
|
|
43
|
+
stop_at: Optional[Union[str, datetime.datetime]] = None,
|
|
42
44
|
) -> StreamResponse:
|
|
43
45
|
return await self.client.start_campaign( # type: ignore
|
|
44
|
-
campaign_id=self.campaign_id, scheduled_for=scheduled_for
|
|
46
|
+
campaign_id=self.campaign_id, scheduled_for=scheduled_for, stop_at=stop_at
|
|
45
47
|
)
|
|
46
48
|
|
|
47
49
|
async def stop(self) -> StreamResponse:
|
stream_chat/async_chat/client.py
CHANGED
|
@@ -485,7 +485,7 @@ class StreamChatAsync(StreamChatInterface, AsyncContextManager):
|
|
|
485
485
|
return await self._parse_response(response)
|
|
486
486
|
|
|
487
487
|
async def create_blocklist(
|
|
488
|
-
self, name: str, words: Iterable[str], type: str = "
|
|
488
|
+
self, name: str, words: Iterable[str], type: str = "word"
|
|
489
489
|
) -> StreamResponse:
|
|
490
490
|
return await self.post(
|
|
491
491
|
"blocklists", data={"name": name, "words": words, "type": type}
|
|
@@ -676,12 +676,17 @@ class StreamChatAsync(StreamChatInterface, AsyncContextManager):
|
|
|
676
676
|
self,
|
|
677
677
|
campaign_id: str,
|
|
678
678
|
scheduled_for: Optional[Union[str, datetime.datetime]] = None,
|
|
679
|
+
stop_at: Optional[Union[str, datetime.datetime]] = None,
|
|
679
680
|
) -> StreamResponse:
|
|
680
681
|
payload = {}
|
|
681
682
|
if scheduled_for is not None:
|
|
682
683
|
if isinstance(scheduled_for, datetime.datetime):
|
|
683
684
|
scheduled_for = scheduled_for.isoformat()
|
|
684
685
|
payload["scheduled_for"] = scheduled_for
|
|
686
|
+
if stop_at is not None:
|
|
687
|
+
if isinstance(stop_at, datetime.datetime):
|
|
688
|
+
stop_at = stop_at.isoformat()
|
|
689
|
+
payload["stop_at"] = stop_at
|
|
685
690
|
return await self.post(f"campaigns/{campaign_id}/start", data=payload)
|
|
686
691
|
|
|
687
692
|
async def stop_campaign(self, campaign_id: str) -> StreamResponse:
|
stream_chat/base/campaign.py
CHANGED
|
@@ -40,7 +40,9 @@ class CampaignInterface(abc.ABC):
|
|
|
40
40
|
|
|
41
41
|
@abc.abstractmethod
|
|
42
42
|
def start(
|
|
43
|
-
self,
|
|
43
|
+
self,
|
|
44
|
+
scheduled_for: Optional[Union[str, datetime.datetime]] = None,
|
|
45
|
+
stop_at: Optional[Union[str, datetime.datetime]] = None,
|
|
44
46
|
) -> Union[StreamResponse, Awaitable[StreamResponse]]:
|
|
45
47
|
pass
|
|
46
48
|
|
stream_chat/base/client.py
CHANGED
|
@@ -765,7 +765,7 @@ class StreamChatInterface(abc.ABC):
|
|
|
765
765
|
|
|
766
766
|
@abc.abstractmethod
|
|
767
767
|
def create_blocklist(
|
|
768
|
-
self, name: str, words: Iterable[str], type: str = "
|
|
768
|
+
self, name: str, words: Iterable[str], type: str = "word"
|
|
769
769
|
) -> Union[StreamResponse, Awaitable[StreamResponse]]:
|
|
770
770
|
"""
|
|
771
771
|
Create a blocklist
|
|
@@ -1102,6 +1102,7 @@ class StreamChatInterface(abc.ABC):
|
|
|
1102
1102
|
self,
|
|
1103
1103
|
campaign_id: str,
|
|
1104
1104
|
scheduled_for: Optional[Union[str, datetime.datetime]] = None,
|
|
1105
|
+
stop_at: Optional[Union[str, datetime.datetime]] = None,
|
|
1105
1106
|
) -> Union[StreamResponse, Awaitable[StreamResponse]]:
|
|
1106
1107
|
"""
|
|
1107
1108
|
Start a campaign at given time or now if not specified
|
stream_chat/campaign.py
CHANGED
|
@@ -36,10 +36,12 @@ class Campaign(CampaignInterface):
|
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
def start(
|
|
39
|
-
self,
|
|
39
|
+
self,
|
|
40
|
+
scheduled_for: Optional[Union[str, datetime.datetime]] = None,
|
|
41
|
+
stop_at: Optional[Union[str, datetime.datetime]] = None,
|
|
40
42
|
) -> StreamResponse:
|
|
41
43
|
return self.client.start_campaign( # type: ignore
|
|
42
|
-
campaign_id=self.campaign_id, scheduled_for=scheduled_for
|
|
44
|
+
campaign_id=self.campaign_id, scheduled_for=scheduled_for, stop_at=stop_at
|
|
43
45
|
)
|
|
44
46
|
|
|
45
47
|
def stop(self) -> StreamResponse:
|
stream_chat/client.py
CHANGED
|
@@ -467,7 +467,7 @@ class StreamChat(StreamChatInterface):
|
|
|
467
467
|
return self._parse_response(response)
|
|
468
468
|
|
|
469
469
|
def create_blocklist(
|
|
470
|
-
self, name: str, words: Iterable[str], type: str = "
|
|
470
|
+
self, name: str, words: Iterable[str], type: str = "word"
|
|
471
471
|
) -> StreamResponse:
|
|
472
472
|
return self.post(
|
|
473
473
|
"blocklists", data={"name": name, "words": words, "type": type}
|
|
@@ -609,7 +609,7 @@ class StreamChat(StreamChatInterface):
|
|
|
609
609
|
)
|
|
610
610
|
|
|
611
611
|
def campaign( # type: ignore
|
|
612
|
-
self, campaign_id: Optional[str] = None, data: CampaignData = None
|
|
612
|
+
self, campaign_id: Optional[str] = None, data: Optional[CampaignData] = None
|
|
613
613
|
) -> Campaign:
|
|
614
614
|
return Campaign(client=self, campaign_id=campaign_id, data=data)
|
|
615
615
|
|
|
@@ -649,12 +649,17 @@ class StreamChat(StreamChatInterface):
|
|
|
649
649
|
self,
|
|
650
650
|
campaign_id: str,
|
|
651
651
|
scheduled_for: Optional[Union[str, datetime.datetime]] = None,
|
|
652
|
+
stop_at: Optional[Union[str, datetime.datetime]] = None,
|
|
652
653
|
) -> StreamResponse:
|
|
653
654
|
payload = {}
|
|
654
655
|
if scheduled_for is not None:
|
|
655
656
|
if isinstance(scheduled_for, datetime.datetime):
|
|
656
657
|
scheduled_for = scheduled_for.isoformat()
|
|
657
658
|
payload["scheduled_for"] = scheduled_for
|
|
659
|
+
if stop_at is not None:
|
|
660
|
+
if isinstance(stop_at, datetime.datetime):
|
|
661
|
+
stop_at = stop_at.isoformat()
|
|
662
|
+
payload["stop_at"] = stop_at
|
|
658
663
|
return self.post(f"campaigns/{campaign_id}/start", data=payload)
|
|
659
664
|
|
|
660
665
|
def stop_campaign(self, campaign_id: str) -> StreamResponse:
|
stream_chat/types/campaign.py
CHANGED
|
@@ -31,11 +31,13 @@ class ChannelTemplate(TypedDict, total=False):
|
|
|
31
31
|
Parameters:
|
|
32
32
|
type: The type of channel.
|
|
33
33
|
id: The ID of the channel.
|
|
34
|
+
members: List of member IDs.
|
|
34
35
|
custom: Custom data.
|
|
35
36
|
"""
|
|
36
37
|
|
|
37
38
|
type: str
|
|
38
|
-
id: str
|
|
39
|
+
id: Optional[str]
|
|
40
|
+
members: Optional[List[str]]
|
|
39
41
|
custom: Optional[Dict]
|
|
40
42
|
|
|
41
43
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: stream-chat
|
|
3
|
-
Version: 4.12.
|
|
3
|
+
Version: 4.12.1
|
|
4
4
|
Summary: Client for Stream Chat.
|
|
5
5
|
Home-page: https://github.com/GetStream/stream-chat-python
|
|
6
6
|
Author: Tommaso Barbugli
|
|
7
7
|
Author-email: support@getstream.io
|
|
8
8
|
Project-URL: Bug Tracker, https://github.com/GetStream/stream-chat-python/issues
|
|
9
9
|
Project-URL: Documentation, https://getstream.io/activity-feeds/docs/python/?language=python
|
|
10
|
-
Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.12.
|
|
10
|
+
Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.12.1
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Intended Audience :: System Administrators
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
stream_chat/__init__.py,sha256=xYQuC8xcPLJxJnFWzaNaO-sVUc7IJZYe13OIPRaDBEA,116
|
|
2
|
-
stream_chat/__pkg__.py,sha256=
|
|
3
|
-
stream_chat/campaign.py,sha256=
|
|
2
|
+
stream_chat/__pkg__.py,sha256=n_cQUeLvytzgt4sytXXqvw9Fe8FMTfvFz-1c7JdKYjk,206
|
|
3
|
+
stream_chat/campaign.py,sha256=Z7bBo2rGMs02JkA1k9_206J0spcSLecjdhQuRnrc2Eo,2156
|
|
4
4
|
stream_chat/channel.py,sha256=SxlnRM8U1yo_k3wDBC4azz3_LDRPclDV5GBmGCfqB8U,7766
|
|
5
|
-
stream_chat/client.py,sha256=
|
|
5
|
+
stream_chat/client.py,sha256=0PacvOGFy7FKIwYEex1VVkl604EWMeEJdmQ3NjpfW14,28160
|
|
6
6
|
stream_chat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
stream_chat/segment.py,sha256=NqfjNZ9i7RYlLkBohxu3-Xc4l3zo3fnKoh2IMLAUrmo,2387
|
|
8
8
|
stream_chat/async_chat/__init__.py,sha256=V6x7yDCdXbP3vMuSan6Xm7RE_njZUvflImqOxfKRt4Y,67
|
|
9
|
-
stream_chat/async_chat/campaign.py,sha256=
|
|
9
|
+
stream_chat/async_chat/campaign.py,sha256=Bc3iHZigxserUycZK4wDuXU0wXVH2G6fIDiYNVYPkeE,1885
|
|
10
10
|
stream_chat/async_chat/channel.py,sha256=yn9P7u1lJdwoCVw9gKotadq6s1rdYSM_wnxhdaZpnTI,8124
|
|
11
|
-
stream_chat/async_chat/client.py,sha256=
|
|
11
|
+
stream_chat/async_chat/client.py,sha256=KRebkAv-eMO87XYGbDWKlag3ba99KpEghjkbWmw5LrU,30314
|
|
12
12
|
stream_chat/async_chat/segment.py,sha256=qo8waiGTkRRDRFYKW0GtrcSgnBkDF-PVSaCSBEnYwAg,2473
|
|
13
13
|
stream_chat/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
stream_chat/base/campaign.py,sha256=
|
|
14
|
+
stream_chat/base/campaign.py,sha256=dAVkTYyirEpgyOPn8JyDebNMKeJu02vTuqgmPvdQoWU,1449
|
|
15
15
|
stream_chat/base/channel.py,sha256=G6thUgND74z0gvI-N3b3vEsrDJ-D4MrAfW2um_E4x9w,13788
|
|
16
|
-
stream_chat/base/client.py,sha256=
|
|
16
|
+
stream_chat/base/client.py,sha256=uY0OsIqOPHs1vWtdov6o4kAoo2IdEYqMb-KBG_kewqQ,40247
|
|
17
17
|
stream_chat/base/exceptions.py,sha256=eh1qW5d6zjUrlgsHNEBebAr0jVH2UupZ06w8sp2cseI,819
|
|
18
18
|
stream_chat/base/segment.py,sha256=_UONbdF4OjaGIpsTzyY5UN_U3VAfuZyAkJnS3RfsM5k,2020
|
|
19
19
|
stream_chat/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
stream_chat/types/base.py,sha256=JKlOxQVPvMClTo0ev63Ya-K-dX-98j95qSE-KKzziEE,858
|
|
21
|
-
stream_chat/types/campaign.py,sha256=
|
|
21
|
+
stream_chat/types/campaign.py,sha256=JyAn08oMaEsxPSqmVTdsfJK4xpfErPQV7Xr7zLQm99M,2293
|
|
22
22
|
stream_chat/types/rate_limit.py,sha256=v3Z4Ur0yoEdFLiHa1CNABEej2nxPlHQ6Bpy2XxW-TYQ,165
|
|
23
23
|
stream_chat/types/segment.py,sha256=28pLB3ADJcF8Y5PZHa4VACVg-ySxM94nCiP4uNvQxfs,925
|
|
24
24
|
stream_chat/types/stream_response.py,sha256=jWKPrOU7u6dZ2SyOK53uQCXTstrL1HshO9fA7R6Bt_A,2391
|
|
25
|
-
stream_chat-4.12.
|
|
26
|
-
stream_chat-4.12.
|
|
27
|
-
stream_chat-4.12.
|
|
28
|
-
stream_chat-4.12.
|
|
29
|
-
stream_chat-4.12.
|
|
25
|
+
stream_chat-4.12.1.dist-info/LICENSE,sha256=H66SBDuPWSRHzKPEdyjAk3C0THQRcGPfqqve4naQuu0,14424
|
|
26
|
+
stream_chat-4.12.1.dist-info/METADATA,sha256=URkKgtoi9hOx2F1cKXNLX27lb5xKPz559eGDPt4cKWY,7332
|
|
27
|
+
stream_chat-4.12.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
28
|
+
stream_chat-4.12.1.dist-info/top_level.txt,sha256=26uTfg4bWcEaFrVKlzGGgfONH1p5DDe21G07EKfYSvo,12
|
|
29
|
+
stream_chat-4.12.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|