Skip to content

Commit d7512f6

Browse files
committed
Update docs
Updated documentation
1 parent 7aa26f3 commit d7512f6

File tree

4 files changed

+76
-54
lines changed

4 files changed

+76
-54
lines changed

docs/reference.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ Chatter
9595
.. autoclass:: Chatter
9696
:members:
9797

98+
ChatterColor
99+
-------------
100+
.. attributetable:: ChatterColor
101+
102+
.. autoclass:: ChatterColor
103+
:members:
104+
:inherited-members:
105+
98106
CheerEmote
99107
------------
100108
.. attributetable:: CheerEmote
@@ -251,6 +259,14 @@ Predictions
251259
:members:
252260
:inherited-members:
253261

262+
Raid
263+
-----
264+
.. attributetable:: Raid
265+
266+
.. autoclass:: Raid
267+
:members:
268+
:inherited-members:
269+
254270
Schedules
255271
----------
256272
.. attributetable:: Schedule

twitchio/client.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ async def delete_videos(self, token: str, ids: List[int]) -> List[int]:
704704
Parameters
705705
-----------
706706
token: :class:`str`
707-
An oauth token with the channel:manage:videos scope
707+
An oauth token with the ``channel:manage:videos`` scope
708708
ids: List[:class:`int`]
709709
A list of video ids from the channel of the oauth token to delete
710710
@@ -718,7 +718,7 @@ async def delete_videos(self, token: str, ids: List[int]) -> List[int]:
718718

719719
return resp
720720

721-
async def fetch_chatters_colors(self, user_ids: List[int], token: Optional[str] = None):
721+
async def fetch_chatters_colors(self, user_ids: List[int], token: Optional[str] = None):
722722
"""|coro|
723723
724724
Fetches the color of a chatter.
@@ -728,7 +728,7 @@ async def fetch_chatters_colors(self, user_ids: List[int], token: Optional[str]
728728
user_ids: List[:class:`int`]
729729
List of user ids to fetch the colors for
730730
token: Optional[:class:`str`]
731-
An oauth token with the channel:read:redirect scope
731+
An optional user oauth token
732732
733733
Returns
734734
--------
@@ -745,7 +745,7 @@ async def update_chatter_color(self, token: str, user_id: int, color: str):
745745
Parameters
746746
-----------
747747
token: :class:`str`
748-
An oauth token with the user:manage:chat_color scope.
748+
An oauth token with the ``user:manage:chat_color`` scope.
749749
user_id: :class:`int`
750750
The ID of the user whose color is being updated, this must match the user ID in the token.
751751
color: :class:`str`
@@ -756,9 +756,7 @@ async def update_chatter_color(self, token: str, user_id: int, color: str):
756756
--------
757757
None
758758
"""
759-
await self._http.put_user_chat_color(
760-
token=token, user_id=str(user_id), color=color
761-
)
759+
await self._http.put_user_chat_color(token=token, user_id=str(user_id), color=color)
762760

763761
async def get_webhook_subscriptions(self):
764762
"""|coro|

twitchio/http.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,16 +487,17 @@ async def get_predictions(
487487
return await self.request(Route("GET", "predictions", query=params, token=token), paginate=False)
488488

489489
async def patch_prediction(
490-
self, token: str, broadcaster_id: int, prediction_id: str, status: str, winning_outcome_id: str = None
490+
self, token: str, broadcaster_id: str, prediction_id: str, status: str, winning_outcome_id: Optional[str] = None
491491
):
492492
body = {
493-
"broadcaster_id": str(broadcaster_id),
493+
"broadcaster_id": broadcaster_id,
494494
"id": prediction_id,
495495
"status": status,
496496
}
497497

498-
if status == "RESOLVED":
498+
if status == "RESOLVED" and winning_outcome_id:
499499
body["winning_outcome_id"] = winning_outcome_id
500+
500501
return await self.request(
501502
Route(
502503
"PATCH",

0 commit comments

Comments
 (0)