Skip to content

Commit

Permalink
fix eventsub ext docs
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmTomahawkx committed Mar 6, 2022
1 parent 3b621f2 commit b762a7f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 53 deletions.
24 changes: 12 additions & 12 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
2.2.0
=====
- ext.sounds
- Added sounds extension. Check the sounds documentation for more information.
- Added sounds extension. Check the :ref:`sounds-ref` documentation for more information.

- TwitchIO
- Loosen aiohttp requirements to allow 3.8.1
- :class:`Stream` was missing from ``__all__``. It is now available in the twitchio namespace.
- :class:`twitchio.Stream` was missing from ``__all__``. It is now available in the twitchio namespace.
- Added ``.status``, ``.reason`` and ``.extra`` to :class:`HTTPException`
- Fix Message._timestamp value when tag is not provided by twitch
- Fix :func:`Client.wait_for_ready`
- Remove loop= parameter inside :func:`Client.wait_for` for 3.10 compatibility
- Add `is_broadcaster` check to `PartialChatter` class. This is accessible as `Context.author.is_broadcaster`
- :func:`User.fetch_follow` will now return ``None`` if the FollowEvent does not exists
- Fix ``Message._timestamp`` value when tag is not provided by twitch
- Fix :func:`twitchio.Client.wait_for_ready`
- Remove loop= parameter inside :func:`twitchio.Client.wait_for` for 3.10 compatibility
- Add ``is_broadcaster`` check to :class:`twitchio.PartialChatter`. This is accessible as ``Context.author.is_broadcaster``
- :func:`twitchio.User.fetch_follow` will now return ``None`` if the FollowEvent does not exists
- TwitchIO will now correctly handle error raised when only the prefix is typed in chat
- Fix paginate logic in :func:`TwitchHTTP.request`

Expand All @@ -25,17 +25,17 @@

- ext.eventsub
- Add support for the following subscription types
- :class:`ext.eventsub.PollBeginProgressData`
- :class:`twitchio.ext.eventsub.PollBeginProgressData`
- ``channel.poll.begin``:
- ``channel.poll.progress``
- :class:`ext.eventsub.PollEndData`
- :class:`twitchio.ext.eventsub.PollEndData`
- ``channel.poll.end``
- :class:`ext.eventsub.PredictionBeginProgressData`
- :class:`twitchio.ext.eventsub.PredictionBeginProgressData`
- ``channel.prediction.begin``
- ``channel.prediction.progress``
- :class:`ext.eventsub.PredictionLockData`
- :class:`twitchio.ext.eventsub.PredictionLockData`
- ``channel.prediction.lock``
- :class:`ext.eventsub.PredictionEndData`
- :class:`twitchio.ext.eventsub.PredictionEndData`
- ``channel.prediction.end``

2.1.5
Expand Down
84 changes: 43 additions & 41 deletions twitchio/ext/eventsub/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,18 @@ class ChannelBanData(EventData):
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user that was banned
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The broadcaster who's channel the ban occurred in
moderator: :class:`PartialUser`
moderator: :class:`twitchio.PartialUser`
The moderator responsible for the ban
reason: :class:`str`
The reason for the ban
ends_at: Optional[:class:`datetime.datetime`]
When the ban ends at. Could be ``None``
permanant: :class:`bool`
A typo of ``permanent``. Kept for backwards compatibility
A typo of ``permanent`` Kept for backwards compatibility
permanent: :class:`bool`
Whether the ban is permanent
"""
Expand All @@ -219,9 +219,9 @@ class ChannelSubscribeData(EventData):
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user who subscribed
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel that was subscribed to
tier: :class:`int`
The tier of the subscription
Expand All @@ -246,9 +246,9 @@ class ChannelCheerData(EventData):
----------
is_anonymous: :class:`bool`
Whether the cheer was anonymous
user: Optional[:class:`PartialUser`]
user: Optional[:class:`twitchio.PartialUser`]
The user that cheered. Will be ``None`` if ``is_anonymous`` is ``True``
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the cheer happened on
message: :class:`str`
The message sent along with the bits
Expand All @@ -272,7 +272,7 @@ class ChannelUpdateData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel that was updated
title: :class:`str`
The title of the stream
Expand Down Expand Up @@ -303,11 +303,11 @@ class ChannelUnbanData(EventData):
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user that was unbanned
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the unban occurred in
moderator: :class`PartialUser`
moderator: :class`twitchio.PartialUser`
The moderator that preformed the unban
"""

Expand All @@ -325,9 +325,9 @@ class ChannelFollowData(EventData):
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user that followed
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel that was followed
followed_at: :class:`datetime.datetime`
When the follow occurred
Expand All @@ -347,9 +347,9 @@ class ChannelRaidData(EventData):
Attributes
-----------
raider: :class:`PartialUser`
raider: :class:`twitchio.PartialUser`
The person initiating the raid
reciever: :class:`PartialUser`
reciever: :class:`twitchio.PartialUser`
The person recieving the raid
viewer_count: :class:`int`
The amount of people raiding
Expand All @@ -369,9 +369,9 @@ class ChannelModeratorAddRemoveData(EventData):
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user being added or removed from the moderator status
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel that is having a moderator added/removed
"""

Expand All @@ -390,9 +390,9 @@ class CustomRewardAddUpdateRemoveData(EventData):
-----------
id: :class:`str`
The ID of the custom reward
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the custom reward was modified in
reward: :class:`CustomReward`
reward: :class:`twitchio.CustomReward`
The reward object
"""

Expand All @@ -410,9 +410,9 @@ class CustomRewardRedemptionAddUpdateData(EventData):
Attributes
-----------
broadcaster: :class:PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the redemption occurred in
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user that redeemed the reward
id: :class:`str`
The ID of the redemption
Expand All @@ -422,7 +422,7 @@ class CustomRewardRedemptionAddUpdateData(EventData):
One of "unknown", "unfulfilled", "fulfilled", or "cancelled"
redeemed_at: :class:`datetime.datetime`
When the reward was redeemed at
reward: :class:`CustomReward`
reward: :class:`twitchio.CustomReward`
The reward object
"""

Expand All @@ -444,7 +444,7 @@ class HypeTrainContributor:
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user
type: :class:`str`
One of "bits" or "subscription". The way they contributed to the hype train
Expand All @@ -463,9 +463,11 @@ def __init__(self, client: EventSubClient, data: dict):
class HypeTrainBeginProgressData(EventData):
"""
A Hype Train Begin/Progress event
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the Hype Train occurred in
total_points: :class:`int`
The total amounts of points in the Hype Train
Expand Down Expand Up @@ -511,7 +513,7 @@ class HypeTrainEndData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the Hype Train occurred in
total_points: :class:`int`
The total amounts of points in the Hype Train
Expand Down Expand Up @@ -629,17 +631,17 @@ class PollBeginProgressData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the poll occured in
poll_id: :class:`str`
The ID of the poll
title: :class:`str`
The title of the poll
choices: List[:class:`PollChoice`]
The choices in the poll
bits_voting: :class:BitsVoting
bits_voting: :class:`BitsVoting`
Information on voting on the poll with Bits
channel_points_voting: :class:ChannelPointsVoting
channel_points_voting: :class:`ChannelPointsVoting`
Information on voting on the poll with Channel Points
started_at: :class:`datetime.datetime`
When the poll started
Expand Down Expand Up @@ -676,17 +678,17 @@ class PollEndData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the poll occured in
poll_id: :class:`str`
The ID of the poll
title: :class:`str`
The title of the poll
choices: List[:class:`PollChoice`]
The choices in the poll
bits_voting: :class:BitsVoting
bits_voting: :class:`BitsVoting`
Information on voting on the poll with Bits
channel_points_voting: :class:ChannelPointsVoting
channel_points_voting: :class:`ChannelPointsVoting`
Information on voting on the poll with Channel Points
status: :class:`PollStatus`
How the poll ended
Expand Down Expand Up @@ -726,7 +728,7 @@ class Predictor:
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user who predicted an outcome
channel_points_used: :class:`int`
How many Channel Points the user used to predict this outcome
Expand Down Expand Up @@ -756,7 +758,7 @@ class PredictionOutcome:
channel_points: :class:`int`
The amount of Channel Points that have been bet for this outcome
color: :class:`str`
The color of the outcome. Can be `blue` or `pink`.
The color of the outcome. Can be `blue` or `pink`
users: :class:`int`
The number of users who predicted the outcome
top_predictors: List[:class:`Predictor`]
Expand Down Expand Up @@ -801,7 +803,7 @@ class PredictionBeginProgressData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the prediction occured in
prediction_id: :class:`str`
The ID of the prediction
Expand Down Expand Up @@ -832,7 +834,7 @@ class PredictionLockData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the prediction occured in
prediction_id: :class:`str`
The ID of the prediction
Expand Down Expand Up @@ -863,7 +865,7 @@ class PredictionEndData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel the prediction occured in
prediction_id: :class:`str`
The ID of the prediction
Expand Down Expand Up @@ -909,7 +911,7 @@ class StreamOnlineData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel that went live
id: :class:`str`
Some sort of ID for the stream
Expand All @@ -933,7 +935,7 @@ class StreamOfflineData(EventData):
Attributes
-----------
broadcaster: :class:`PartialUser`
broadcaster: :class:`twitchio.PartialUser`
The channel that stopped streaming
"""

Expand All @@ -949,7 +951,7 @@ class UserAuthorizationRevokedData(EventData):
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user that has revoked authorization for your app
client_id: :class:`str`
The client id of the app that had its authorization revoked
Expand All @@ -968,7 +970,7 @@ class UserUpdateData(EventData):
Attributes
-----------
user: :class:`PartialUser`
user: :class:`twitchio.PartialUser`
The user that was updated
email: Optional[:class:`str`]
The users email, if you have permission to read this information
Expand Down

0 comments on commit b762a7f

Please sign in to comment.