Objects used by EventSub#
- class twitchAPI.object.eventsub.ChannelPollBeginEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelPollBeginData#
- class twitchAPI.object.eventsub.ChannelUpdateEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelUpdateData#
- class twitchAPI.object.eventsub.ChannelFollowEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelFollowData#
- class twitchAPI.object.eventsub.ChannelSubscribeEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelSubscribeData#
- class twitchAPI.object.eventsub.ChannelSubscriptionEndEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelSubscribeData#
- class twitchAPI.object.eventsub.ChannelSubscriptionGiftEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelSubscriptionGiftData#
- class twitchAPI.object.eventsub.ChannelSubscriptionMessageEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.ChannelCheerEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelCheerData#
- class twitchAPI.object.eventsub.ChannelRaidEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelRaidData#
- class twitchAPI.object.eventsub.ChannelBanEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelBanData#
- class twitchAPI.object.eventsub.ChannelUnbanEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelUnbanData#
- class twitchAPI.object.eventsub.ChannelModeratorAddEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelModeratorAddData#
- class twitchAPI.object.eventsub.ChannelModeratorRemoveEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelModeratorRemoveData#
- class twitchAPI.object.eventsub.ChannelPointsCustomRewardAddEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.ChannelPointsCustomRewardUpdateEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.ChannelPointsCustomRewardRemoveEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.ChannelPointsCustomRewardRedemptionAddEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.ChannelPointsCustomRewardRedemptionUpdateEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.ChannelPollProgressEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelPollProgressData#
- class twitchAPI.object.eventsub.ChannelPollEndEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelPollEndData#
- class twitchAPI.object.eventsub.ChannelPredictionEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelPredictionData#
- class twitchAPI.object.eventsub.ChannelPredictionEndEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelPredictionEndData#
- class twitchAPI.object.eventsub.DropEntitlementGrantEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
DropEntitlementGrantData#
- class twitchAPI.object.eventsub.ExtensionBitsTransactionCreateEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.GoalEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
- class twitchAPI.object.eventsub.HypeTrainEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
HypeTrainData#
- class twitchAPI.object.eventsub.HypeTrainEndEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
HypeTrainEndData#
- class twitchAPI.object.eventsub.StreamOnlineEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
StreamOnlineData#
- class twitchAPI.object.eventsub.StreamOfflineEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
StreamOfflineData#
- class twitchAPI.object.eventsub.UserAuthorizationGrantEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
UserAuthorizationGrantData#
- class twitchAPI.object.eventsub.UserAuthorizationRevokeEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
UserAuthorizationRevokeData#
- class twitchAPI.object.eventsub.UserUpdateEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
UserUpdateData#
- class twitchAPI.object.eventsub.ShieldModeEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ShieldModeData#
- class twitchAPI.object.eventsub.CharityCampaignStartEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
CharityCampaignStartData#
- class twitchAPI.object.eventsub.CharityCampaignProgressEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
CharityCampaignProgressData#
- class twitchAPI.object.eventsub.CharityCampaignStopEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
CharityCampaignStopData#
- class twitchAPI.object.eventsub.CharityDonationEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
CharityDonationData#
- class twitchAPI.object.eventsub.ChannelShoutoutCreateEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelShoutoutCreateData#
- class twitchAPI.object.eventsub.ChannelShoutoutReceiveEvent#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription#
-
event:
ChannelShoutoutReceiveData#
- class twitchAPI.object.eventsub.Subscription#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelPollBeginData#
Bases:
TwitchObject-
choices:
List[PollChoice]# Array of choices for the poll
-
bits_voting:
BitsVoting# Not supported
-
channel_points_voting:
ChannelPointsVoting# The Channel Points voting settings for the Poll
- __init__(**kwargs)#
-
choices:
- class twitchAPI.object.eventsub.PollChoice#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.BitsVoting#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelPointsVoting#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelUpdateData#
Bases:
TwitchObject-
content_classification_labels:
List[str]# Array of classification label IDs currently applied to the Channel
- __init__(**kwargs)#
-
content_classification_labels:
- class twitchAPI.object.eventsub.ChannelFollowData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelSubscribeData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelSubscriptionEndData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelSubscriptionGiftData#
Bases:
TwitchObject-
user_id:
Optional[str]# The user ID for the user who sent the subscription gift. None if it was an anonymous subscription gift.
-
user_login:
Optional[str]# The user login for the user who sent the subscription gift. None if it was an anonymous subscription gift.
-
user_name:
Optional[str]# The user display name for the user who sent the subscription gift. None if it was an anonymous subscription gift.
-
cumulative_total:
Optional[int]# The number of subscriptions giftet by this user in teh channel. None for anonymous gifts or if the gifter has opted out of sharing this information
- __init__(**kwargs)#
-
user_id:
- class twitchAPI.object.eventsub.ChannelSubscriptionMessageData#
Bases:
TwitchObject-
message:
SubscriptionMessage# An object that contains the resubscription message and emote information needed to recreate the message.
-
cumulative_months:
Optional[int]# The number of consecutive months the user’s current subscription has been active. None if the user has opted out of sharing this information.
- __init__(**kwargs)#
-
message:
- class twitchAPI.object.eventsub.SubscriptionMessage#
Bases:
TwitchObject-
emotes:
List[Emote]# An array that includes the emote ID and start and end positions for where the emote appears in the text
- __init__(**kwargs)#
-
emotes:
- class twitchAPI.object.eventsub.Emote#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelCheerData#
Bases:
TwitchObject-
user_id:
Optional[str]# The user ID for the user who cheered on the specified channel. None if is_anonymous is True.
-
user_login:
Optional[str]# The user login for the user who cheered on the specified channel. None if is_anonymous is True.
-
user_name:
Optional[str]# The user display name for the user who cheered on the specified channel. None if is_anonymous is True.
- __init__(**kwargs)#
-
user_id:
- class twitchAPI.object.eventsub.ChannelRaidData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelBanData#
Bases:
TwitchObject-
ends_at:
Optional[datetime]# The timestamp of when the timeout ends. None if the user was banned instead of put in a timeout.
-
is_permanent:
bool# Indicates whether the ban is permanent (True) or a timeout (False). If True, ends_at will be None.
- __init__(**kwargs)#
-
ends_at:
- class twitchAPI.object.eventsub.ChannelUnbanData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelModeratorAddData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelModeratorRemoveData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelPointsCustomRewardData#
Bases:
TwitchObject-
should_redemptions_skip_request_queue:
bool# Should redemptions be set to
fulfilledstatus immediately when redeemed and skip the request queue instead of the normalunfulfilledstatus.
-
max_per_stream:
MaxPerStream# Whether a maximum per stream is enabled and what the maximum is
-
max_per_user_per_stream:
MaxPerUserPerStream# Whether a maximum per user per stream is enabled and what the maximum is
-
global_cooldown:
GlobalCooldown# Whether a cooldown is enabled and what the cooldown is in seconds
-
cooldown_expires_at:
Optional[datetime]# Timestamp of the cooldown expiration. None if the reward is not on cooldown.
-
redemptions_redeemed_current_stream:
Optional[int]# The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. None if the broadcasters stream is not live or max_per_stream isn not enabled.
- __init__(**kwargs)#
-
should_redemptions_skip_request_queue:
- class twitchAPI.object.eventsub.GlobalCooldown#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.Image#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.MaxPerStream#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.MaxPerUserPerStream#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelPointsCustomRewardRedemptionData#
Bases:
TwitchObject-
status:
str# Defaults to
unfulfilled. Possible values are:unknown,unfulfilled,fulfilledandcanceled
- __init__(**kwargs)#
-
status:
- class twitchAPI.object.eventsub.Reward#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.ChannelPollProgressData#
Bases:
TwitchObject-
choices:
List[PollChoice]# An array of choices for the poll. Includes vote counts.
-
bits_voting:
BitsVoting# not supported
-
channel_points_voting:
ChannelPointsVoting# The Channel Points voting settings for the poll
- __init__(**kwargs)#
-
choices:
- class twitchAPI.object.eventsub.ChannelPollEndData#
Bases:
TwitchObject-
choices:
List[PollChoice]# An array of choices for the poll. Includes vote counts.
-
bits_voting:
BitsVoting# not supported
-
channel_points_voting:
ChannelPointsVoting# The Channel Points voting settings for the poll
- __init__(**kwargs)#
-
choices:
- class twitchAPI.object.eventsub.ChannelPredictionData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.Outcome#
Bases:
TwitchObject-
top_predictors:
TopPredictors# An array of users who used the most Channel Points on this outcome.
- __init__(**kwargs)#
-
top_predictors:
- class twitchAPI.object.eventsub.TopPredictors#
Bases:
TwitchObject-
channel_points_won:
int# The number of Channel Points won. This value is always null in the event payload for Prediction progress and Prediction lock. This value is 0 if the outcome did not win or if the Prediction was canceled and Channel Points were refunded.
- __init__(**kwargs)#
-
channel_points_won:
- class twitchAPI.object.eventsub.ChannelPredictionEndData#
Bases:
TwitchObject-
outcomes:
List[Outcome]# An array of outcomes for the Channel Points Prediction. Includes top_predictors.
- __init__(**kwargs)#
-
outcomes:
- class twitchAPI.object.eventsub.DropEntitlementGrantData#
Bases:
TwitchObject-
data:
Entitlement# Entitlement object
- __init__(**kwargs)#
-
data:
- class twitchAPI.object.eventsub.Entitlement#
Bases:
TwitchObject-
category_id:
str# Twitch category ID of the game that was being played when this benefit was entitled.
- __init__(**kwargs)#
-
category_id:
- class twitchAPI.object.eventsub.Product#
Bases:
TwitchObject-
in_development:
bool# Flag indicating if the product is in development. If in_development is true, bits will be 0.
- __init__(**kwargs)#
-
in_development:
- class twitchAPI.object.eventsub.ExtensionBitsTransactionCreateData#
Bases:
TwitchObject- __init__(**kwargs)#
- class twitchAPI.object.eventsub.GoalData#
Bases:
TwitchObject-
type:
str# The type of goal. Possible values are:
follow — The goal is to increase followers.
subscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.
subscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.
new_subscription — The goal is to increase subscriptions. This type shows only the net increase in tier points associated with the subscriptions (it does not account for users that unsubscribed since the goal started).
new_subscription_count — The goal is to increase subscriptions. This type shows only the net increase in the number of subscriptions (it does not account for users that unsubscribed since the goal started).
-
description:
str# A description of the goal, if specified. The description may contain a maximum of 40 characters.
-
is_achieved:
Optional[bool]# A Boolean value that indicates whether the broadcaster achieved their goal. Is true if the goal was achieved; otherwise, false. Only the channel.goal.end event includes this field.
-
current_amount:
int# The goals current value. The goals type determines how this value is increased or decreased
If type is follow, this field is set to the broadcaster’s current number of followers. This number increases with new followers and decreases when users unfollow the broadcaster.
If type is subscription, this field is increased and decreased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased or decreased by 2, not 1.
If type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.
If type is new_subscription, this field is increased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased by 2, not 1.
If type is new_subscription_count, this field is increased by 1 for each new subscription.
-
target_amount:
int# The goal’s target value. For example, if the broadcaster has 200 followers before creating the goal, and their goal is to double that number, this field is set to 400.
-
ended_at:
Optional[datetime]# The timestamp which indicates when the broadcaster ended the goal. Only the channel.goal.end event includes this field.
- __init__(**kwargs)#
-
type:
- class twitchAPI.object.eventsub.TopContribution#
Bases:
TwitchObject-
type:
str# The contribution method used. Possible values are:
bits — Cheering with Bits.
subscription — Subscription activity like subscribing or gifting subscriptions.
other — Covers other contribution methods not listed.
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
type:
- class twitchAPI.object.eventsub.LastContribution#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.HypeTrainData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
top_contributions:
List[TopContribution]# The contributors with the most points contributed.
-
last_contribution:
LastContribution# The most recent contribution.
- class twitchAPI.object.eventsub.HypeTrainEndData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
top_contributions:
List[TopContribution]# The contributors with the most points contributed.
- class twitchAPI.object.eventsub.StreamOnlineData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.StreamOfflineData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.UserAuthorizationGrantData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.UserAuthorizationRevokeData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.UserUpdateData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.ShieldModeData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
broadcaster_user_id:
str# An ID that identifies the broadcaster whose Shield Mode status was updated.
-
moderator_user_id:
str# An ID that identifies the moderator that updated the Shield Mode’s status. If the broadcaster updated the status, this ID will be the same as broadcaster_user_id.
- class twitchAPI.object.eventsub.Amount#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
value:
int# The monetary amount. The amount is specified in the currency’s minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550.
- class twitchAPI.object.eventsub.CharityCampaignStartData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.CharityCampaignStopData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.CharityCampaignProgressData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.CharityDonationData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.ChannelShoutoutCreateData#
Bases:
TwitchObject- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
moderator_user_id:
str# An ID that identifies the moderator that sent the Shoutout. If the broadcaster sent the Shoutout, this ID is the same as the ID in broadcaster_user_id.
-
viewer_count:
int# The number of users that were watching the broadcaster’s stream at the time of the Shoutout.