twitch.py 3.2.3__tar.gz → 3.2.4__tar.gz
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.
- {twitch_py-3.2.3/twitch.py.egg-info → twitch_py-3.2.4}/PKG-INFO +1 -1
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/__init__.py +1 -1
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/chat.py +14 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/http.py +19 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/state.py +9 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/chat.py +25 -1
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/chat.py +69 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4/twitch.py.egg-info}/PKG-INFO +1 -1
- {twitch_py-3.2.3 → twitch_py-3.2.4}/LICENSE +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/MANIFEST.in +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/README.md +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/pyproject.toml +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/requirements.txt +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/setup.cfg +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/setup.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/channel.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/client.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/errors.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/bot/__init__.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/bot/bot.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/oauth/__init__.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/oauth/enums.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/oauth/http.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/oauth/oauth.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/overlay/__init__.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/overlay/attachment.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/overlay/geteway.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/overlay/overlay.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/overlay/route.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/ext/overlay/template.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/gateway.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/py.typed +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/stream.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/__init__.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/activity.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/analytics.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/bits.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/channels.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/__init__.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/activity.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/bits.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/channels.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/interaction.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/moderation.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/streams.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/eventsub/users.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/interaction.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/moderation.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/search.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/streams.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/types/users.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/user.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch/utils.py +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch.py.egg-info/SOURCES.txt +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch.py.egg-info/dependency_links.txt +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch.py.egg-info/requires.txt +0 -0
- {twitch_py-3.2.3 → twitch_py-3.2.4}/twitch.py.egg-info/top_level.txt +0 -0
|
@@ -67,6 +67,20 @@ class Chat:
|
|
|
67
67
|
self._auth_user_id)
|
|
68
68
|
return data['data'][0]
|
|
69
69
|
|
|
70
|
+
|
|
71
|
+
async def get_shared_chat_session(self) -> Optional[chat.SharedChatSession]:
|
|
72
|
+
"""
|
|
73
|
+
Retrieve the shared chat session details for the broadcaster.
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
-------
|
|
77
|
+
chat.SharedChatSession
|
|
78
|
+
A dictionary containing details about the shared chat session.
|
|
79
|
+
"""
|
|
80
|
+
data: Data[List[chat.SharedChatSession]] = await self._state.http.get_shared_chat_session(self._auth_user_id,
|
|
81
|
+
self._user_id)
|
|
82
|
+
return data['data'][0] if len(data['data']) != 0 else None
|
|
83
|
+
|
|
70
84
|
async def update_settings(self,
|
|
71
85
|
emote_mode: Optional[bool] = None,
|
|
72
86
|
follower_mode: Optional[bool] = None,
|
|
@@ -428,6 +428,21 @@ class HTTPClient:
|
|
|
428
428
|
'version': '1',
|
|
429
429
|
'condition': {'broadcaster': 'user_id', 'user': 'broadcaster_user_id'}
|
|
430
430
|
},
|
|
431
|
+
'shared_chat_begin': {
|
|
432
|
+
'name': 'channel.shared_chat.begin',
|
|
433
|
+
'version': '1',
|
|
434
|
+
'condition': {'broadcaster': None, 'user': 'broadcaster_user_id'}
|
|
435
|
+
},
|
|
436
|
+
'shared_chat_update': {
|
|
437
|
+
'name': 'channel.shared_chat.update',
|
|
438
|
+
'version': '1',
|
|
439
|
+
'condition': {'broadcaster': None, 'user': 'broadcaster_user_id'}
|
|
440
|
+
},
|
|
441
|
+
'shared_chat_end': {
|
|
442
|
+
'name': 'channel.shared_chat.end',
|
|
443
|
+
'version': '1',
|
|
444
|
+
'condition': {'broadcaster': None, 'user': 'broadcaster_user_id'}
|
|
445
|
+
},
|
|
431
446
|
'subscribe': {
|
|
432
447
|
'name': 'channel.subscribe',
|
|
433
448
|
'version': '1',
|
|
@@ -1028,6 +1043,10 @@ class HTTPClient:
|
|
|
1028
1043
|
return self.request(Route(broadcaster_id, 'GET', 'charity/donations', **params))
|
|
1029
1044
|
|
|
1030
1045
|
# Chat
|
|
1046
|
+
|
|
1047
|
+
def get_shared_chat_session(self, __id: str, broadcaster_id: str) -> Response[Data[List[chat.SharedChatSession]]]:
|
|
1048
|
+
return self.request(Route(__id, 'GET', 'shared_chat/session', broadcaster_id=broadcaster_id))
|
|
1049
|
+
|
|
1031
1050
|
def get_chatters(self,
|
|
1032
1051
|
broadcaster_id: str,
|
|
1033
1052
|
moderator_id: str,
|
|
@@ -522,6 +522,15 @@ class ConnectionState:
|
|
|
522
522
|
def parse_channel_chat_settings_update(self, data: eventsub.chat.SettingsUpdateEvent) -> None:
|
|
523
523
|
self.__dispatch('chat_settings_update', data)
|
|
524
524
|
|
|
525
|
+
def parse_channel_shared_chat_begin(self, data: eventsub.chat.SharedChatBeginEvent) -> None:
|
|
526
|
+
self.__dispatch('shared_chat_begin', data)
|
|
527
|
+
|
|
528
|
+
def parse_channel_shared_chat_update(self, data: eventsub.chat.SharedChatUpdateEvent) -> None:
|
|
529
|
+
self.__dispatch('shared_chat_update', data)
|
|
530
|
+
|
|
531
|
+
def parse_channel_shared_chat_end(self, data: eventsub.chat.SharedChatEndEvent) -> None:
|
|
532
|
+
self.__dispatch('shared_chat_end', data)
|
|
533
|
+
|
|
525
534
|
# Bits
|
|
526
535
|
def parse_channel_cheer(self, data: eventsub.bits.CheerEvent) -> None:
|
|
527
536
|
self.__dispatch('cheer', data)
|
|
@@ -28,7 +28,7 @@ from typing import TYPE_CHECKING, TypedDict
|
|
|
28
28
|
from .users import SpecificUser
|
|
29
29
|
|
|
30
30
|
if TYPE_CHECKING:
|
|
31
|
-
from typing import List, Optional, Literal, NotRequired
|
|
31
|
+
from typing import List, Optional, Literal, NotRequired, Dict
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class EmoteImages(TypedDict):
|
|
@@ -226,3 +226,27 @@ class UserChatColor(SpecificUser):
|
|
|
226
226
|
The hexadecimal color code chosen by the user for their chat messages.
|
|
227
227
|
"""
|
|
228
228
|
color: str
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class SharedChatSession(TypedDict):
|
|
232
|
+
"""
|
|
233
|
+
A TypedDict representing a shared chat session.
|
|
234
|
+
|
|
235
|
+
Attributes
|
|
236
|
+
----------
|
|
237
|
+
session_id: str
|
|
238
|
+
Unique identifier for the chat session.
|
|
239
|
+
host_broadcaster_id: str
|
|
240
|
+
Identifier for the host broadcaster.
|
|
241
|
+
participants: List[Dict[Literal['broadcaster_id'], str]]
|
|
242
|
+
List of participants with broadcaster IDs.
|
|
243
|
+
created_at str
|
|
244
|
+
Timestamp of when the session was created.
|
|
245
|
+
updated_at: str
|
|
246
|
+
Timestamp of the last update to the session.
|
|
247
|
+
"""
|
|
248
|
+
session_id: str
|
|
249
|
+
host_broadcaster_id: str
|
|
250
|
+
participants: List[Dict[Literal['broadcaster_id'], str]]
|
|
251
|
+
created_at: str
|
|
252
|
+
updated_at: str
|
|
@@ -721,3 +721,72 @@ class SettingsUpdateEvent(SpecificBroadcaster):
|
|
|
721
721
|
slow_mode_wait_time_seconds: Optional[int]
|
|
722
722
|
subscriber_mode: bool
|
|
723
723
|
unique_chat_mode: bool
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
class SharedChatBeginEvent(SpecificBroadcaster):
|
|
727
|
+
"""
|
|
728
|
+
Represents the beginning of a channel shared chat session event.
|
|
729
|
+
|
|
730
|
+
Attributes
|
|
731
|
+
----------
|
|
732
|
+
session_id: str
|
|
733
|
+
The unique identifier for the shared chat session.
|
|
734
|
+
host_broadcaster_user_id: str
|
|
735
|
+
The User ID of the host channel.
|
|
736
|
+
host_broadcaster_user_name: str
|
|
737
|
+
The display name of the host channel.
|
|
738
|
+
host_broadcaster_user_login: str
|
|
739
|
+
The user login of the host channel.
|
|
740
|
+
participants: List[SpecificBroadcaster]
|
|
741
|
+
The list of participants in the session.
|
|
742
|
+
"""
|
|
743
|
+
session_id: str
|
|
744
|
+
host_broadcaster_user_id: str
|
|
745
|
+
host_broadcaster_user_name: str
|
|
746
|
+
host_broadcaster_user_login: str
|
|
747
|
+
participants: List[SpecificBroadcaster]
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
class SharedChatUpdateEvent(SpecificBroadcaster):
|
|
751
|
+
"""
|
|
752
|
+
Represents an update to a channel shared chat session event.
|
|
753
|
+
|
|
754
|
+
Attributes
|
|
755
|
+
----------
|
|
756
|
+
session_id: str
|
|
757
|
+
The unique identifier for the shared chat session.
|
|
758
|
+
host_broadcaster_user_id: str
|
|
759
|
+
The User ID of the host channel.
|
|
760
|
+
host_broadcaster_user_name: str
|
|
761
|
+
The display name of the host channel.
|
|
762
|
+
host_broadcaster_user_login: str
|
|
763
|
+
The user login of the host channel.
|
|
764
|
+
participants: List[SpecificBroadcaster]
|
|
765
|
+
The list of participants in the session.
|
|
766
|
+
"""
|
|
767
|
+
session_id: str
|
|
768
|
+
host_broadcaster_user_id: str
|
|
769
|
+
host_broadcaster_user_name: str
|
|
770
|
+
host_broadcaster_user_login: str
|
|
771
|
+
participants: List[SpecificBroadcaster]
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
class SharedChatEndEvent(SpecificBroadcaster):
|
|
775
|
+
"""
|
|
776
|
+
Represents the end of a channel shared chat session event.
|
|
777
|
+
|
|
778
|
+
Attributes
|
|
779
|
+
----------
|
|
780
|
+
session_id: str
|
|
781
|
+
The unique identifier for the shared chat session.
|
|
782
|
+
host_broadcaster_user_id: str
|
|
783
|
+
The User ID of the host channel.
|
|
784
|
+
host_broadcaster_user_name: str
|
|
785
|
+
The display name of the host channel.
|
|
786
|
+
host_broadcaster_user_login: str
|
|
787
|
+
The user login of the host channel.
|
|
788
|
+
"""
|
|
789
|
+
session_id: str
|
|
790
|
+
host_broadcaster_user_id: str
|
|
791
|
+
host_broadcaster_user_name: str
|
|
792
|
+
host_broadcaster_user_login: str
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|