graph LR
Twitch_API_Clients["Twitch API Clients"]
API_Request_Handling["API Request Handling"]
Twitch_Data_Models["Twitch Data Models"]
API_Configuration_Utilities["API Configuration & Utilities"]
Old_API_Specific_Endpoints["Old API Specific Endpoints"]
Twitch_API_Clients -- "uses" --> API_Configuration_Utilities
Twitch_API_Clients -- "delegates to" --> Old_API_Specific_Endpoints
Twitch_API_Clients -- "uses" --> API_Request_Handling
API_Request_Handling -- "uses" --> API_Configuration_Utilities
API_Request_Handling -- "produces" --> Twitch_Data_Models
Twitch_Data_Models -- "consumed by" --> Twitch_API_Clients
Twitch_Data_Models -- "consumed by" --> Old_API_Specific_Endpoints
API_Configuration_Utilities -- "used by" --> Twitch_API_Clients
API_Configuration_Utilities -- "used by" --> API_Request_Handling
Old_API_Specific_Endpoints -- "uses" --> API_Request_Handling
Old_API_Specific_Endpoints -- "produces" --> Twitch_Data_Models
Old_API_Specific_Endpoints -- "uses" --> API_Configuration_Utilities
click Twitch_API_Clients href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-twitch-client/Twitch API Clients.md" "Details"
click API_Request_Handling href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-twitch-client/API Request Handling.md" "Details"
click Twitch_Data_Models href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-twitch-client/Twitch Data Models.md" "Details"
click API_Configuration_Utilities href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-twitch-client/API Configuration & Utilities.md" "Details"
click Old_API_Specific_Endpoints href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/python-twitch-client/Old API Specific Endpoints.md" "Details"
This graph illustrates the architecture of the python-twitch-client library, which provides a comprehensive interface for interacting with both the older Twitch API (v5) and the newer Twitch Helix API. The core functionality revolves around making API requests, handling responses by converting them into Python objects, and managing authentication and configuration.
Provides the main interfaces for interacting with both the older Twitch API (v5) and the newer Twitch Helix API, acting as a facade for different API versions and their respective functionalities.
Related Classes/Methods:
python-twitch-client.twitch.client.TwitchClient:__init__(24:43)python-twitch-client.twitch.client.TwitchClient:channel_feed(46:51)python-twitch-client.twitch.client.TwitchClient:clips(54:59)python-twitch-client.twitch.client.TwitchClient:channels(62:67)python-twitch-client.twitch.client.TwitchClient:chat(70:73)python-twitch-client.twitch.client.TwitchClient:collections(76:81)python-twitch-client.twitch.client.TwitchClient:communities(84:89)python-twitch-client.twitch.client.TwitchClient:games(92:97)python-twitch-client.twitch.client.TwitchClient:ingests(100:105)python-twitch-client.twitch.client.TwitchClient:search(108:113)python-twitch-client.twitch.client.TwitchClient:streams(116:121)python-twitch-client.twitch.client.TwitchClient:teams(124:129)python-twitch-client.twitch.client.TwitchClient:users(132:137)python-twitch-client.twitch.client.TwitchClient:videos(140:145)python-twitch-client.twitch.helix.api.TwitchHelix:__init__(32:41)python-twitch-client.twitch.helix.api.TwitchHelix:get_oauth(43:70)python-twitch-client.twitch.helix.api.TwitchHelix:get_streams(72:118)python-twitch-client.twitch.helix.api.TwitchHelix:get_games(120:136)python-twitch-client.twitch.helix.api.TwitchHelix:get_clips(138:187)python-twitch-client.twitch.helix.api.TwitchHelix:get_top_games(189:205)python-twitch-client.twitch.helix.api.TwitchHelix:get_videos(207:271)python-twitch-client.twitch.helix.api.TwitchHelix:get_streams_metadata(273:319)python-twitch-client.twitch.helix.api.TwitchHelix:get_user_follows(321:340)python-twitch-client.twitch.helix.api.TwitchHelix:get_users(342:358)python-twitch-client.twitch.helix.api.TwitchHelix:get_tags(360:376)
Manages the underlying HTTP communication with both Twitch API v5 and Helix endpoints, including handling request headers, rate limits, and pagination for efficient data retrieval.
Related Classes/Methods:
python-twitch-client.twitch.api.base.TwitchAPI:__init__(15:20)python-twitch-client.twitch.api.base.TwitchAPI:_get_request_headers(22:32)python-twitch-client.twitch.api.base.TwitchAPI:_request_get(34:57)python-twitch-client.twitch.api.base.TwitchAPI:_request_post(59:70)python-twitch-client.twitch.api.base.TwitchAPI:_request_put(72:82)python-twitch-client.twitch.api.base.TwitchAPI:_request_delete(84:95)python-twitch-client.twitch.helix.base.TwitchAPIMixin:_wait_for_rate_limit_reset(18:38)python-twitch-client.twitch.helix.base.TwitchAPIMixin:_get_request_headers(40:46)python-twitch-client.twitch.helix.base.TwitchAPIMixin:_request_get(48:76)python-twitch-client.twitch.helix.base.APICursor:__init__(80:95)python-twitch-client.twitch.helix.base.APICursor:next_page(118:133)python-twitch-client.twitch.helix.base.APICursor:total(140:143)python-twitch-client.twitch.helix.base.APIGet:fetch(155:157)
Defines the Python object structures for representing various Twitch API resources, facilitating the conversion of raw API responses into easily manipulable objects within the application.
Related Classes/Methods:
python-twitch-client.twitch.resources:convert_to_twitch_object(4:34)python-twitch-client.twitch.resources.TwitchObject:construct_from(58:61)python-twitch-client.twitch.resources.TwitchObject:refresh_from(63:65)python-twitch-client.twitch.resources.TwitchObject.__setitem__(53:55)python-twitch-client.twitch.resources.Channel(81:82)python-twitch-client.twitch.resources.Clip(85:86)python-twitch-client.twitch.resources.Collection(89:90)python-twitch-client.twitch.resources.Comment(93:94)python-twitch-client.twitch.resources.Community(97:98)python-twitch-client.twitch.resources.Featured(101:102)python-twitch-client.twitch.resources.Follow(105:106)python-twitch-client.twitch.resources.Game(109:110)python-twitch-client.twitch.resources.Ingest(113:114)python-twitch-client.twitch.resources.Item(117:118)python-twitch-client.twitch.resources.Post(121:122)python-twitch-client.twitch.resources.Stream(125:126)python-twitch-client.twitch.resources.StreamMetadata(129:130)python-twitch-client.twitch.resources.Subscription(133:134)python-twitch-client.twitch.resources.Tag(137:138)python-twitch-client.twitch.resources.Team(141:142)python-twitch-client.twitch.resources.TopGame(145:146)python-twitch-client.twitch.resources.User(149:150)python-twitch-client.twitch.resources.UserBlock(153:154)python-twitch-client.twitch.resources.Video(157:158)
Handles the loading and management of API credentials and settings, provides custom exception handling for API-related errors, and enforces authentication requirements for sensitive operations.
Related Classes/Methods:
python-twitch-client.twitch.conf:credentials_from_config_file(13:22)python-twitch-client.twitch.conf:backoff_config(25:34)python-twitch-client.twitch.conf._get_config(7:10)twitch.exceptions.TwitchException(1:2)twitch.exceptions.TwitchAuthException(5:6)twitch.exceptions.TwitchAttributeException(9:10)twitch.exceptions.TwitchNotProvidedException(13:14)twitch.exceptions.TwitchOAuthException(17:18)python-twitch-client.twitch.decorators.oauth_required(4:10)
Encapsulates the specific functionalities and methods for interacting with various categories of the older Twitch API (v5), such as channels, streams, users, and communities.
Related Classes/Methods:
python-twitch-client.twitch.api.collections.Collections:get_metadata(8:10)python-twitch-client.twitch.api.collections.Collections:get(12:17)python-twitch-client.twitch.api.collections.Collections:get_by_channel(19:31)python-twitch-client.twitch.api.collections.Collections:create(34:41)python-twitch-client.twitch.api.collections.Collections:update(44:48)python-twitch-client.twitch.api.collections.Collections:create_thumbnail(51:55)python-twitch-client.twitch.api.collections.Collections:delete(58:59)python-twitch-client.twitch.api.collections.Collections:add_item(62:67)python-twitch-client.twitch.api.collections.Collections:delete_item(70:72)python-twitch-client.twitch.api.collections.Collections:move_item(75:78)python-twitch-client.twitch.api.streams.Streams(8:83)python-twitch-client.twitch.api.users.Users(14:130)python-twitch-client.twitch.api.chat.Chat(4:18)python-twitch-client.twitch.api.communities.Communities(7:136)python-twitch-client.twitch.api.channel_feed.ChannelFeed(7:105)python-twitch-client.twitch.api.teams.Teams(6:19)python-twitch-client.twitch.api.videos.Videos(14:88)python-twitch-client.twitch.api.games.Games(6:15)python-twitch-client.twitch.api.channels.Channels(16:156)python-twitch-client.twitch.api.clips.Clips(8:56)python-twitch-client.twitch.api.ingests.Ingests(5:8)python-twitch-client.twitch.api.search.Search(6:33)