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.ChannelChatClearEvent#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription
#
-
event:
ChannelChatClearData
#
- class twitchAPI.object.eventsub.ChannelChatClearUserMessagesEvent#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription
#
- class twitchAPI.object.eventsub.ChannelChatMessageDeleteEvent#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription
#
- class twitchAPI.object.eventsub.ChannelChatNotificationEvent#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
subscription:
Subscription
#
-
event:
ChannelChatNotificationData
#
- 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
fulfilled
status immediately when redeemed and skip the request queue instead of the normalunfulfilled
status.
-
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
,fulfilled
andcanceled
- __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.
-
total:
int
# The total amount contributed. If type is bits, total represents the amount of Bits used. If type is subscription, total is 500, 1000, or 2500 to represent tier 1, 2, or 3 subscriptions, respectively.
- __init__(**kwargs)#
-
type:
- class twitchAPI.object.eventsub.LastContribution#
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.
-
total:
int
# The total amount contributed. If type is bits, total represents the amount of Bits used. If type is subscription, total is 500, 1000, or 2500 to represent tier 1, 2, or 3 subscriptions, respectively.
- __init__(**kwargs)#
-
type:
- class twitchAPI.object.eventsub.HypeTrainData#
Bases:
TwitchObject
-
top_contributions:
List
[TopContribution
]# The contributors with the most points contributed.
-
last_contribution:
LastContribution
# The most recent contribution.
-
expires_at:
datetime
# The time when the Hype Train expires. The expiration is extended when the Hype Train reaches a new level.
- __init__(**kwargs)#
-
top_contributions:
- class twitchAPI.object.eventsub.HypeTrainEndData#
Bases:
TwitchObject
-
top_contributions:
List
[TopContribution
]# The contributors with the most points contributed.
-
cooldown_ends_at:
datetime
# The time when the Hype Train cooldown ends so that the next Hype Train can start.
- __init__(**kwargs)#
-
top_contributions:
- class twitchAPI.object.eventsub.StreamOnlineData#
Bases:
TwitchObject
- __init__(**kwargs)#
- class twitchAPI.object.eventsub.StreamOfflineData#
Bases:
TwitchObject
- __init__(**kwargs)#
- class twitchAPI.object.eventsub.UserAuthorizationGrantData#
Bases:
TwitchObject
-
user_name:
str
# The user display name for the user who has granted authorization for your client id.
- __init__(**kwargs)#
-
user_name:
- class twitchAPI.object.eventsub.UserAuthorizationRevokeData#
Bases:
TwitchObject
-
user_login:
str
# The user login for the user who has revoked authorization for your client id. This is null if the user no longer exists.
-
user_name:
str
# The user display name for the user who has revoked authorization for your client id. This is null if the user no longer exists.
- __init__(**kwargs)#
-
user_login:
- class twitchAPI.object.eventsub.UserUpdateData#
Bases:
TwitchObject
-
email:
str
# The user’s email address. The event includes the user’s email address only if the app used to request this event type includes the user:read:email scope for the user; otherwise, the field is set to an empty string. See Create EventSub Subscription.
-
email_verified:
bool
# A Boolean value that determines whether Twitch has verified the user’s email address. Is true if Twitch has verified the email address; otherwise, false.
NOTE: Ignore this field if the email field contains an empty string.
- __init__(**kwargs)#
-
email:
- class twitchAPI.object.eventsub.ShieldModeData#
Bases:
TwitchObject
-
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.
-
started_at:
datetime
# The timestamp of when the moderator activated Shield Mode. The object includes this field only for channel.shield_mode.begin events.
-
ended_at:
datetime
# The timestamp of when the moderator deactivated Shield Mode. The object includes this field only for channel.shield_mode.end events.
- __init__(**kwargs)#
-
broadcaster_user_id:
- class twitchAPI.object.eventsub.Amount#
Bases:
TwitchObject
-
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.
-
decimal_places:
int
# The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:
value / 10^decimal_places
-
currency:
str
# The ISO-4217 three-letter currency code that identifies the type of currency in value.
- __init__(**kwargs)#
-
value:
- 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.
- class twitchAPI.object.eventsub.ChannelShoutoutReceiveData#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.ChannelChatClearData#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.ChannelChatClearUserMessagesData#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.ChannelChatMessageDeleteData#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.Badge#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.MessageFragmentCheermote#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
prefix:
str
# The name portion of the Cheermote string that you use in chat to cheer Bits. The full Cheermote string is the concatenation of {prefix} + {number of Bits}. For example, if the prefix is “Cheer” and you want to cheer 100 Bits, the full Cheermote string is Cheer100. When the Cheermote string is entered in chat, Twitch converts it to the image associated with the Bits tier that was cheered.
- class twitchAPI.object.eventsub.MessageFragmentEmote#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
format:
List
[str
]# The formats that the emote is available in. For example, if the emote is available only as a static PNG, the array contains only static. But if the emote is available as a static PNG and an animated GIF, the array contains static and animated. The possible formats are:
animated — An animated GIF is available for this emote.
static — A static PNG file is available for this emote.
- class twitchAPI.object.eventsub.MessageFragmentMention#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.MessageFragment#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
cheermote:
Optional
[MessageFragmentCheermote
]# Metadata pertaining to the cheermote.
-
emote:
Optional
[MessageFragmentEmote
]# Metadata pertaining to the emote.
-
mention:
Optional
[MessageFragmentMention
]# Metadata pertaining to the mention.
- class twitchAPI.object.eventsub.Message#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
fragments:
List
[MessageFragment
]# Ordered list of chat message fragments.
- class twitchAPI.object.eventsub.AnnouncementNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.CharityDonationNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.BitsBadgeTierNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.SubNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.RaidNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.ResubNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
sub_tier:
str
# The type of subscription plan being used. Possible values are:
1000 — First level of paid or Prime subscription
2000 — Second level of paid subscription
3000 — Third level of paid subscription
- class twitchAPI.object.eventsub.UnraidNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- class twitchAPI.object.eventsub.SubGiftNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
cumulative_total:
Optional
[int
]# Optional. The amount of gifts the gifter has given in this channel. None if anonymous.
- class twitchAPI.object.eventsub.CommunitySubGiftNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.GiftPaidUpgradeNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
gifter_user_id:
Optional
[str
]# Optional. The user ID of the user who gifted the subscription. None if anonymous.
- class twitchAPI.object.eventsub.PrimePaidUpgradeNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
- class twitchAPI.object.eventsub.PayItForwardNoticeMetadata#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
gifter_user_id:
Optional
[str
]# Optional. The user ID of the user who gifted the subscription. None if anonymous.
- class twitchAPI.object.eventsub.ChannelChatNotificationData#
Bases:
TwitchObject
- __init__(**kwargs)#
- to_dict(include_none_values=False)#
build dict based on annotation types
-
notice_type:
str
# The type of notice. Possible values are:
sub
resub
sub_gift
community_sub_gift
gift_paid_upgrade
prime_paid_upgrade
raid
unraid
pay_it_forward
announcement
bits_badge_tier
charity_donation
-
sub:
Optional
[SubNoticeMetadata
]# Information about the sub event. None if notice_type is not sub.
-
resub:
Optional
[ResubNoticeMetadata
]# Information about the resub event. None if notice_type is not resub.
-
sub_gift:
Optional
[SubGiftNoticeMetadata
]# Information about the gift sub event. None if notice_type is not sub_gift.
-
community_sub_gift:
Optional
[CommunitySubGiftNoticeMetadata
]# Information about the community gift sub event. None if notice_type is not community_sub_gift.
-
gift_paid_upgrade:
Optional
[GiftPaidUpgradeNoticeMetadata
]# Information about the community gift paid upgrade event. None if notice_type is not gift_paid_upgrade.
-
prime_paid_upgrade:
Optional
[PrimePaidUpgradeNoticeMetadata
]# Information about the Prime gift paid upgrade event. None if notice_type is not prime_paid_upgrade.
-
raid:
Optional
[RaidNoticeMetadata
]# Information about the raid event. None if notice_type is not raid.
-
unraid:
Optional
[UnraidNoticeMetadata
]# Returns an empty payload if notice_type is unraid, otherwise returns None.
-
pay_it_forward:
Optional
[PayItForwardNoticeMetadata
]# Information about the pay it forward event. None if notice_type is not pay_it_forward.
-
announcement:
Optional
[AnnouncementNoticeMetadata
]# Information about the announcement event. None if notice_type is not announcement
-
charity_donation:
Optional
[CharityDonationNoticeMetadata
]# Information about the charity donation event. None if notice_type is not charity_donation.
-
bits_badge_tier:
Optional
[BitsBadgeTierNoticeMetadata
]# Information about the bits badge tier event. None if notice_type is not bits_badge_tier.