Objects used by the Twitch API#
- class twitchAPI.object.TwitchObject#
Bases:
objectA lot of API calls return a child of this in some way (either directly or via generator). You can always use the
to_dict()method to turn that object to a dictionary.Example:
blocked_term = await twitch.add_blocked_term('broadcaster_id', 'moderator_id', 'bad_word') print(blocked_term.id)
- to_dict(include_none_values=False)#
build dict based on annotation types
- __init__(**kwargs)#
- class twitchAPI.object.IterTwitchObject#
Bases:
TwitchObjectSpecial type of
TwitchObject. These usually have some list inside that you may want to dicrectly itterate over in your API usage but that also contain other usefull data outside of that List.Example:
lb = await twitch.get_bits_leaderboard() print(lb.total) for e in lb: print(f'#{e.rank:02d} - {e.user_name}: {e.score}')
- __init__(**kwargs)#
- class twitchAPI.object.AsyncIterTwitchObject#
Bases:
TwitchObject,Generic[T]A few API calls will have usefull data outside of the list the pagination itterates over. For those cases, this object exist.
Example:
schedule = await twitch.get_channel_stream_schedule('user_id') print(schedule.broadcaster_name) async for segment in schedule: print(segment.title)
- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
- class twitchAPI.object.TwitchUser#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.TwitchUserFollow#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.TwitchUserFollowResult#
Bases:
AsyncIterTwitchObject[TwitchUserFollow]-
data:
List[TwitchUserFollow]#
- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
-
data:
- class twitchAPI.object.DateRange#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ExtensionAnalytic#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.GameAnalytics#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CreatorGoal#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.BitsLeaderboardEntry#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.BitsLeaderboard#
Bases:
IterTwitchObject-
data:
List[BitsLeaderboardEntry]#
- __init__(**kwargs)#
-
data:
- class twitchAPI.object.ProductCost#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ProductData#
Bases:
TwitchObject-
cost:
ProductCost#
- __init__(**kwargs)#
-
cost:
- class twitchAPI.object.ExtensionTransaction#
Bases:
TwitchObject-
product_data:
ProductData#
- __init__(**kwargs)#
-
product_data:
- class twitchAPI.object.ChatSettings#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CreatedClip#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Clip#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CodeStatus#
Bases:
TwitchObject-
status:
StatusCode#
- __init__(**kwargs)#
-
status:
- class twitchAPI.object.Game#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.AutoModStatus#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.BannedUser#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.BanUserResponse#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.BlockedTerm#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Moderator#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CreateStreamMarkerResponse#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Stream#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.StreamMarker#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.StreamMarkers#
Bases:
TwitchObject-
markers:
List[StreamMarker]#
- __init__(**kwargs)#
-
markers:
- class twitchAPI.object.GetStreamMarkerResponse#
Bases:
TwitchObject-
videos:
List[StreamMarkers]#
- __init__(**kwargs)#
-
videos:
- class twitchAPI.object.BroadcasterSubscription#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.BroadcasterSubscriptions#
Bases:
AsyncIterTwitchObject[BroadcasterSubscription]-
data:
List[BroadcasterSubscription]#
- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
-
data:
- class twitchAPI.object.UserSubscription#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.StreamTag#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.TeamUser#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ChannelTeam#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.UserExtension#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ActiveUserExtension#
Bases:
UserExtension- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.UserActiveExtensions#
Bases:
TwitchObject-
panel:
Dict[str,ActiveUserExtension]#
-
overlay:
Dict[str,ActiveUserExtension]#
-
component:
Dict[str,ActiveUserExtension]#
- __init__(**kwargs)#
-
panel:
- class twitchAPI.object.VideoMutedSegments#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Video#
Bases:
TwitchObject-
muted_segments:
List[VideoMutedSegments]#
- __init__(**kwargs)#
-
muted_segments:
- class twitchAPI.object.ChannelInformation#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.SearchChannelResult#
Bases:
ChannelInformation- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.SearchCategoryResult#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.StartCommercialResult#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Cheermote#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.GetCheermotesResponse#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.HypeTrainContribution#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.HypeTrainEventData#
Bases:
TwitchObject-
last_contribution:
HypeTrainContribution#
-
top_contributions:
List[HypeTrainContribution]#
- __init__(**kwargs)#
-
last_contribution:
- class twitchAPI.object.HypeTrainEvent#
Bases:
TwitchObject-
event_data:
HypeTrainEventData#
- __init__(**kwargs)#
-
event_data:
- class twitchAPI.object.DropsEntitlement#
Bases:
TwitchObject-
fulfillment_status:
DropsEntitlementFulfillmentStatus#
- __init__(**kwargs)#
-
fulfillment_status:
- class twitchAPI.object.MaxPerStreamSetting#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.MaxPerUserPerStreamSetting#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.GlobalCooldownSetting#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CustomReward#
Bases:
TwitchObject-
max_per_stream_setting:
MaxPerStreamSetting#
-
max_per_user_per_stream_setting:
MaxPerUserPerStreamSetting#
-
global_cooldown_setting:
GlobalCooldownSetting#
- __init__(**kwargs)#
-
max_per_stream_setting:
- class twitchAPI.object.PartialCustomReward#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CustomRewardRedemption#
Bases:
TwitchObject-
status:
CustomRewardRedemptionStatus#
-
reward:
PartialCustomReward#
- __init__(**kwargs)#
-
status:
- class twitchAPI.object.ChannelEditor#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.BlockListEntry#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.PollChoice#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Poll#
Bases:
TwitchObject-
choices:
List[PollChoice]#
-
status:
PollStatus#
- __init__(**kwargs)#
-
choices:
- class twitchAPI.object.Predictor#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.PredictionOutcome#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Prediction#
Bases:
TwitchObject-
outcomes:
List[PredictionOutcome]#
-
status:
PredictionStatus#
- __init__(**kwargs)#
-
outcomes:
- class twitchAPI.object.RaidStartResult#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ChatBadgeVersion#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ChatBadge#
Bases:
TwitchObject-
versions:
List[ChatBadgeVersion]#
- __init__(**kwargs)#
-
versions:
- class twitchAPI.object.Emote#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.GetEmotesResponse#
Bases:
IterTwitchObject- __init__(**kwargs)#
- class twitchAPI.object.EventSubSubscription#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.GetEventSubSubscriptionResult#
Bases:
AsyncIterTwitchObject[EventSubSubscription]-
data:
List[EventSubSubscription]#
- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
-
data:
- class twitchAPI.object.StreamCategory#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ChannelStreamScheduleSegment#
Bases:
TwitchObject-
category:
StreamCategory#
- __init__(**kwargs)#
-
category:
- class twitchAPI.object.StreamVacation#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ChannelStreamSchedule#
Bases:
AsyncIterTwitchObject[ChannelStreamScheduleSegment]-
segments:
List[ChannelStreamScheduleSegment]#
-
vacation:
Optional[StreamVacation]#
- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
-
segments:
- class twitchAPI.object.ChannelVIP#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.UserChatColor#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Artist#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Album#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Soundtrack#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.TrackSource#
Bases:
TwitchObject-
content_type:
SoundtrackSourceType#
- __init__(**kwargs)#
-
content_type:
- class twitchAPI.object.CurrentSoundtrack#
Bases:
TwitchObject-
track:
Soundtrack#
-
source:
TrackSource#
- __init__(**kwargs)#
-
track:
- class twitchAPI.object.Playlist#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.Chatter#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.GetChattersResponse#
Bases:
AsyncIterTwitchObject[Chatter]- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
- class twitchAPI.object.ShieldModeStatus#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CharityAmount#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.CharityCampaign#
Bases:
TwitchObject-
current_amount:
CharityAmount#
-
target_amount:
CharityAmount#
- __init__(**kwargs)#
-
current_amount:
- class twitchAPI.object.CharityCampaignDonation#
Bases:
TwitchObject-
amount:
CharityAmount#
- __init__(**kwargs)#
-
amount:
- class twitchAPI.object.AutoModSettings#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ChannelFollower#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.ChannelFollowersResult#
Bases:
AsyncIterTwitchObject[ChannelFollower]-
data:
List[ChannelFollower]#
- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
-
data:
- class twitchAPI.object.FollowedChannel#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.FollowedChannelsResult#
Bases:
AsyncIterTwitchObject[FollowedChannel]-
data:
List[FollowedChannel]#
- __init__(_data, **kwargs)#
- static __new__(cls, *args, **kwds)#
-
data: