All Available Functions

This page contains all the public method available to work with

Note

All Examples on the page assumes that app is the Bot class instance

Get User Info

  • Bot().get_user(username: str)

    Get the User Info of the specified username or user_id

    Arguments
    username: str

    Username or User ID of the user you want to get info of.

    Return
    Returns:

    User

    user = app.get_user('kharltayyab')
    

Get User Videos

  • Bot().get_user_videos(username: str, sort: str = "TIME", pages: int = 1, cursor: str = None, wait_time: int = 2)

    Get the Videos of the specified username

    Arguments
    username(Required): str

    Username or User ID of the user you want to get Videos of.

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Videos Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    UserVideos

    videos = app.get_user_videos('kharltayyab')
    for video in videos:
        print(video)
    
  • Bot().iter_user_videos(username: str, sort: str = "TIME", pages: int = 1, cursor: str = None, wait_time: int = 2)

    Get the Videos of the specified username as a generator

    Arguments
    username(Required): str

    Username or User ID of the user you want to get Videos of.

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Videos Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Generator : (UserVideos , list[Video])

    for _, videos in app.iter_user_videos('kharltayyab'):
        print(videos)
    

Get User Video Clips

  • Bot().get_user_clips(username: str, sort: str = "TIME", pages: int = 1, cursor: str = None, wait_time: int = 2)

    Get the Videos Clips of the specified username

    Arguments
    username(Required): str

    Username or User ID of the user you want to get Video Clips of.

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Clips Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    UserClips

    clips = app.get_user_clips('kharltayyab')
    for clip in clips:
        print(clip)
    
  • Bot().iter_user_clips(username: str, sort: str = "TIME", pages: int = 1, cursor: str = None, wait_time: int = 2)

    Get the Video Clips of the specified username as a generator

    Arguments
    username(Required): str

    Username or User ID of the user you want to get Video Clips of.

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Clips Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Generator : (UserClips , list[Clip])

    for _, clips in app.iter_user_clips('kharltayyab'):
        print(clips)
    

Searching a Keyword

  • Bot().search(keyword: str, filter_: str = "SearchStreams", pages: int = 1, wait_time: int = 2, cursor: str = None)

    Search for a on Twitch

    Arguments
    keyword(Required): str

    The keyword which is supposed to be searched

    pages(optional): int = 1

    Number of Pages you want to get

    filter_(optional): str = "SearchStreams"

    Filter you would like to apply on the search. More about Filters

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Search

    results = app.search('kharltayyab')
    for result in results:
        print(result)
    
  • Bot().iter_search(keyword: str, filter_: str = "SearchStreams", pages: int = 1, wait_time: int = 2, cursor: str = None)

    Search for a on Twitch as a generator

    Arguments
    keyword(Required): str

    The keyword which is supposed to be searched

    pages(optional): int = 1

    Number of Pages you want to get

    filter_(optional): str = "SearchStreams"

    Filter you would like to apply on the search. More about Filters

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Generator: (Search, list[Clip | Video | User | Stream])

    for _, results in app.iter_search('kharltayyab'):
        print(results)
    

Get Top Streams

  • Bot().get_top_streams(tags: List[str] = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Twitch Top Streams

    Arguments
    tags: list[str]

    List of tags to look for in streams

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TopStreams

    streams = app.get_top_streams()
    for stream in streams:
        print(stream)
    
  • Bot().iter_top_streams(tags: List[str] = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Twitch Top Streams as generator

    Arguments
    tags: list[str]

    List of tags to look for in streams

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TopStreams, list[Stream]

    for _, streams in app.iter_top_streams():
        print(streams)
    

Get Top Games

  • Bot().get_top_games(tags: List[str] = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Twitch Top Games

    Arguments
    tags: list[str]

    List of tags to look for in streams

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TopGames

    games = app.get_top_games()
    for game in games:
        print(game)
    
  • Bot().iter_top_games(tags: List[str] = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Twitch Top Games as generator

    Arguments
    tags: list[str]

    List of tags to look for in streams

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TopStreams, list[Game]

    for _, games in app.iter_top_games():
        print(games)
    

Get Game Streams

  • Bot().get_game_streams(game: Union[str, int, Game], tags: List[str] = None, sort: str = "VIEWER_COUNT", pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Streams of specific game

    Arguments
    game: str

    Name of the Game

    tags: list[str]

    List of tags to look for in streams

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    GameStreams

    streams = app.get_game_streams()
    for stream in streams:
        print(stream)
    
  • Bot().iter_top_games(game: Union[str, int, Game], tags: List[str] = None, sort: str = "VIEWER_COUNT", pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Streams of specific game as generator

    Arguments
    game: str

    Name of the Game

    tags: list[str]

    List of tags to look for in streams

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    GameStreams, list[Stream]

    for _, streams in app.iter_game_streams():
        print(streams)
    

Get Game Clips

  • Bot().get_game_clips(game: Union[str, int, Game], sort: str = "VIEWER_COUNT", languages: str = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Clips of specific game

    Arguments
    game: str

    Name of the Game

    languages: str

    What should be the language of clip

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    GameClips

    clips = app.get_game_clips()
    for clip in clips:
        print(clip)
    
  • Bot().iter_game_clips(game: Union[str, int, Game], sort: str = "VIEWER_COUNT", languages: str = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Clips of specific game as generator

    Arguments
    game: str

    Name of the Game

    languages: str

    What should be the language of clip

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    GameClips, list[Clip]

    for _, clips in app.get_game_clips():
        print(clips)
    

Get Game Videos

  • Bot().get_game_videos(game: Union[str, int, Game], sort: str = "VIEWER_COUNT", languages: str = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Videos of specific game

    Arguments
    game: str

    Name of the Game

    languages: str

    What should be the language of clip

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    GameVideos

    videos = app.get_game_videos()
    for video in videos:
        print(video)
    
  • Bot().iter_game_videos(game: Union[str, int, Game], sort: str = "VIEWER_COUNT", languages: str = None, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Videos of specific game as generator

    Arguments
    game: str

    Name of the Game

    languages: str

    What should be the language of clip

    sort: str

    Sort the Results

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    GameVideos, list[Video]

    for _, videos in app.get_game_videos():
        print(videos)