Skip to content

Commit f4ed8da

Browse files
committed
Update Literal in helix models
1 parent 014a10a commit f4ed8da

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

twitchio/models/bits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ def get_image(
153153
154154
Parameters
155155
----------
156-
theme: Literal["light", "dark"]
156+
theme: typing.Literal["light", "dark"]
157157
The background theme of the cheermote. Defaults to "light".
158158
scale: str
159159
The scale (size) of the cheermote. Usually this will be one of: "1", "1.5", "2", "3", "4"
160160
Defaults to "2".
161-
format: Literal["default", "static", "animated"]
161+
format: typing.Literal["default", "static", "animated"]
162162
The format of the image for the cheermote. E.g a static image (PNG) or animated (GIF).
163163
164164
Use "default" to get the default format for the emote, which will be animated if available, otherwise static.

twitchio/models/channel_points.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,11 @@ def fetch_redemptions(
349349
-----------
350350
token_for: str | PartialUser
351351
The user's token that has permission manage or read the broadcaster's reward redemptions.
352-
status: Literal["CANCELED", "FULFILLED", "UNFULFILLED"]
352+
status: typing.Literal["CANCELED", "FULFILLED", "UNFULFILLED"]
353353
The state of the redemption. This can be one of the following: "CANCELED", "FULFILLED", "UNFULFILLED"
354354
ids: list[str] | None
355355
A list of IDs to filter the redemptions by. You may specify up to 50.
356-
sort: Literal["OLDEST", "NEWEST"]
356+
sort: typing.Literal["OLDEST", "NEWEST"]
357357
The order to sort the redemptions by. The default is OLDEST.
358358
first: int
359359
Maximum number of items to return per page. Default is 20.
@@ -394,7 +394,7 @@ class CustomRewardRedemption:
394394
-----------
395395
id: str
396396
The ID that uniquely identifies this redemption.
397-
status: Literal["CANCELED", "FULFILLED", "UNFULFILLED"]
397+
status: typing.Literal["CANCELED", "FULFILLED", "UNFULFILLED"]
398398
The state of the redemption. This can be one of the following: "CANCELED", "FULFILLED", "UNFULFILLED"
399399
redeemed_at: datetime.datetime
400400
The prompt shown to the viewer when they redeem the reward if user input is required.

twitchio/models/chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def get_image(
278278
279279
Parameters
280280
----------
281-
theme: Literal["light", "dark"]
281+
theme: typing.Literal["light", "dark"]
282282
The background theme of the emote. Defaults to "light".
283283
scale: str
284284
The scale (size) of the emote. Usually this will be one of:
@@ -287,7 +287,7 @@ def get_image(
287287
- "3.0" (Large)
288288
289289
Defaults to "2.0".
290-
format: Literal["default", "static", "animated"]
290+
format: typing.Literal["default", "static", "animated"]
291291
The format of the image for the emote. E.g a static image (PNG) or animated (GIF).
292292
293293
Use "default" to get the default format for the emote, which will be animated if available, otherwise static.

twitchio/models/entitlements.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Entitlement:
6060
PartialUser of who was granted the entitlement.
6161
game_id: str
6262
An ID that identifies the game the user was playing when the reward was entitled.
63-
fulfillment_status: Literal["CLAIMED", "FULFILLED"]
63+
fulfillment_status: typing.Literal["CLAIMED", "FULFILLED"]
6464
The entitlement's fulfillment status. Can be either `CLAIMED` or `FULFILLED`.
6565
last_updated: datetime.datetime
6666
Datetime of when the entitlement was last updated.
@@ -110,7 +110,7 @@ class EntitlementStatus:
110110
111111
Attributes
112112
-----------
113-
status: Literal["INVALID_ID", "NOT_FOUND", "SUCCESS", "UNAUTHORIZED", "UPDATE_FAILED"]
113+
status: typing.Literal["INVALID_ID", "NOT_FOUND", "SUCCESS", "UNAUTHORIZED", "UPDATE_FAILED"]
114114
Indicates whether the status of the entitlements in the ids field were successfully updated.
115115
116116
+----------------+----------------------------------------------------------------------------------------------------+

twitchio/models/goals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Goal:
7777
An ID that identifies this goal.
7878
broadcaster: PartialUser
7979
The broadcaster that created the goal.
80-
type: Literal["follower", "subscription", "subscription_count", "new_subscription", "new_subscription_count"]
80+
type: typing.Literal["follower", "subscription", "subscription_count", "new_subscription", "new_subscription_count"]
8181
The type of goal. Possible values are: `follower`, `subscription`, `subscription_count`, `new_subscription`, `new_subscription_count`
8282
Please refer to the documentation for more details.
8383
description: str

twitchio/models/hype_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class HypeTrainContribution:
119119
total: int
120120
The total amount contributed. If type is ``BITS``, total represents the amount of Bits used.
121121
If type is ``SUBS``, total is 500, 1000, or 2500 to represent tier 1, 2, or 3 subscriptions, respectively.
122-
type: Literal["BITS", "SUBS", "OTHER"]
122+
type: typing.Literal["BITS", "SUBS", "OTHER"]
123123
Identifies the contribution method, either BITS, SUBS or OTHER.
124124
user: PartialUser
125125
The user making the contribution.

twitchio/models/moderation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ class UnbanRequest:
304304
The requestor who is asking for an unban.
305305
text: str
306306
Text of the request from requesting user.
307-
status: Literal["pending", "approved", "denied", "acknowledged", "canceled"]
307+
status: typing.Literal["pending", "approved", "denied", "acknowledged", "canceled"]
308308
Status of the request. One of: `pending`, `approved`, `denied`, `acknowledged`, `canceled`
309309
created_at: datetime.datetime
310310
Datetime of when the unban request was created.

twitchio/models/polls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Poll:
7373
A Boolean value that indicates whether viewers may cast additional votes using Channel Points.
7474
channel_points_per_vote: int
7575
The number of points the viewer must spend to cast one additional vote.
76-
status: Literal["ACTIVE", "COMPLETED", "TERMINATED", "ARCHIVED", "MODERATED", "INVALID"]
76+
status: typing.Literal["ACTIVE", "COMPLETED", "TERMINATED", "ARCHIVED", "MODERATED", "INVALID"]
7777
The poll's status. Valid values are `ACTIVE`, `COMPLETED`, `TERMINATED`, `ARCHIVED`, `MODERATED` and `INVALID`.
7878
duration: int
7979
The length of time (in seconds) that the poll will run for.
@@ -124,7 +124,7 @@ async def end_poll(self, *, status: Literal["ARCHIVED", "TERMINATED"]) -> Poll:
124124
125125
Parameters
126126
----------
127-
status Literal["ARCHIVED", "TERMINATED"]
127+
status typing.Literal["ARCHIVED", "TERMINATED"]
128128
The status to set the poll to. Possible case-sensitive values are: "ARCHIVED" and "TERMINATED".
129129
130130
Returns

twitchio/models/predictions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def end_prediction(
137137
138138
Parameters
139139
----------
140-
status: Literal["RESOLVED", "CANCELED", "LOCKED"]
140+
status: typing.Literal["RESOLVED", "CANCELED", "LOCKED"]
141141
The status to set the prediction to. Possible case-sensitive values are: `RESOLVED`, `CANCELED`, `LOCKED`
142142
143143
Returns
@@ -170,7 +170,7 @@ class PredictionOutcome:
170170
The number of Channel Points spent by viewers on this outcome.
171171
top_predictors: list[Predictor]
172172
A list of viewers who were the top predictors; otherwise, None if none.
173-
colour: Literal["BLUE", "PINK", "blue", "pink"]
173+
colour: typing.Literal["BLUE", "PINK", "blue", "pink"]
174174
The number of votes cast using Channel Points.
175175
"""
176176

0 commit comments

Comments
 (0)