2828import logging
2929import traceback
3030import sys
31- from typing import Union , Callable , List , Optional , Tuple , Any , Coroutine , Dict
31+ from typing import Union , Callable , List , Optional , Tuple , Any , Coroutine , Dict , Literal
3232
3333from twitchio .errors import HTTPException , AuthenticationError
3434from . import models
@@ -648,6 +648,7 @@ async def fetch_streams(
648648 user_logins : Optional [List [str ]] = None ,
649649 languages : Optional [List [str ]] = None ,
650650 token : Optional [str ] = None ,
651+ type : Literal ["all" , "live" ] = "all"
651652 ):
652653 """|coro|
653654
@@ -665,19 +666,21 @@ async def fetch_streams(
665666 language for the stream(s). ISO 639-1 or two letter code for supported stream language
666667 token: Optional[:class:`str`]
667668 An optional OAuth token to use instead of the bot OAuth token
669+ type: Literal["all", "live"]
670+ One of ``"all"`` or ``"live"``. Defaults to ``"all"``. Specifies what type of stream to fetch.
668671
669672 Returns
670673 --------
671674 List[:class:`twitchio.Stream`]
672675 """
673676 from .models import Stream
674677
675- assert user_ids or game_ids or user_logins
676678 data = await self ._http .get_streams (
677679 game_ids = game_ids ,
678680 user_ids = user_ids ,
679681 user_logins = user_logins ,
680682 languages = languages ,
683+ type_ = type ,
681684 token = token ,
682685 )
683686 return [Stream (self ._http , x ) for x in data ]
0 commit comments