Skip to content

Releases: Teekeks/pyTwitchAPI

v3.4.0

13 Jan 23:39
3a325de
Compare
Choose a tag to compare

Twitch

  • Added the following new Endpoints:
    • "Update Shield Mode Status" Twitch.update_shield_mode_status()
    • "Get Shield Mode Status" Twitch.get_shield_mode_status()
  • Added the new tags Field to the following Endpoints:
    • "Get Streams" Twitch.get_streams()
    • "Get Followed Streams" Twitch.get_followed_streams()
    • "Search Channels" Twitch.search_channels()
    • "Get Channel Information" Twitch.get_channel_information()
    • "Modify Channel Information" Twitch.modify_channel_information()
  • Improved documentation

EventSub

  • Added the following new Topics:
    • "Shield Mode End" EventSub.listen_channel_shield_mode_end()
    • "Shield Mode Begin" EventSub.listen_channel_shield_mode_begin()
  • Improved type hints of listen_ functions
  • Added check if given callback is a coroutine to listen_ functions

PubSub

  • Fixed AttributeError when reconnecting

Chat

  • Expanded documentation on Events and Commands
  • Fixed room cache being randomly destroyed over time
  • Improved message handling performance drastically for high volume chat bots
  • Fixed AttributeError when reconnecting
  • Chat.join_room() now times out when it was unable to join a room instead of being infinitly stuck
  • Chat.join_room() now returns a list of channels it was unable to join
  • Added Chat.join_timeout
  • Added Chat.unregister_command()
  • Added Chat.unregister_event()
  • Added the following new Events:
    • ChatEvent.USER_LEFT - Triggered when a user leaves a chat channel
    • ChatEvent.CHAT_CLEARED - Triggered when a user was timed out, banned or the messages where deleted
    • ChatEvent.WHISPER - Triggered when a user sends a whisper message to the bot

OAuth

  • fixed UserAuthenticator.authenticate() getting stuck when user_token is provided (thanks @Tempystral)

v3.3.0

04 Jan 01:58
bb15ac4
Compare
Choose a tag to compare
  • Added new event to Chat: ChatEvent.MESSAGE_DELETE which triggers whenever a single message got deleted in a channel
  • Added Chat.send_raw_irc_message() method for sending raw irc commands to the websocket. Use with care!
  • Fixed missing state cleanup after closing Chat, preventing the same instance from being started again
  • fixed ChatRoom.room_id always being Null

v3.2.2

01 Jan 00:23
330c860
Compare
Choose a tag to compare
  • Fixed return type of Twitch.get_broadcaster_subscriptions()
  • removed any field starting with underscore from TwitchObject.to_dict()

v3.2.1

19 Dec 20:59
9465d5c
Compare
Choose a tag to compare
  • Fixed bug that resulted in a timeout when reading big API requests
  • Optimized the use of Sessions, slight to decent performance optimization for API requests, especially for async generators

v3.2.0

16 Dec 20:13
56c4735
Compare
Choose a tag to compare
  • Made the used loggers available for easy logging configuration
  • added the option to set the chat command prefix via Chat.set_prefix()
  • Twitch.set_user_authentication() now also throws a MissingScopeException when no scope is given. (thanks @aw-was-here !)

v3.1.0

10 Dec 20:45
424a304
Compare
Choose a tag to compare
  • Added the Endpoint "Get Chatters"
  • Added the MODERATOR_READ_CHATTERS AuthScope
  • Added missing total field to Twitch.get_users_follows()
  • added send() shorthand to ChatCommand, this makes sending command replies easier.
  • Fixed issue which prevented the Twitch client being used inside a EventSub, PubSub or Chat callback
  • Fixed issue with using the wrong API url in Twitch.create_custom_reward()
  • twitchAPI.helper.first() now returns None when there is no data to return instead of raising StopAsyncIteration exception
  • Exceptions in Chat callback methods are now properly displayed

v3.0.1

28 Nov 22:15
d1dd2e7
Compare
Choose a tag to compare
  • Fixed bug which resulted in Timeout context manager should be used inside a task when subscribing to more than one EventSub topic

v3.0.0

27 Nov 19:12
5f94630
Compare
Choose a tag to compare

This Version is a major rework of the library. Please see the migration guide to learn how to migrate.

Highlights

  • Library is now fully async
  • Twitch API responses are now Objects and Generators instead of pure dictionaries
  • Automatic Pagination of API results
  • First alpha of a Chat Bot implementation
  • More customizability for the UserAuthenticator
  • A lot of new Endpoints where added
  • New look and content for the documentation

Full Changelog

  • Rewrote the twitchAPI to be async
  • twitchAPI now uses Objects instead of dictionaries
  • added automatic pagination to all relevant API endpoints
  • PubSub now uses async callbacks
  • EventSub subscribing and unsubscribing is now async
  • Added a alpha version of a Twitch Chat Bot implementation
  • switched AuthScope CHANNEL_MANAGE_CHAT_SETTINGS to MODERATOR_MANAGE_CHAT_SETTINGS
  • Added the following AuthScopes:
    • MODERATOR_MANAGE_ANNOUNCEMENTS
    • MODERATOR_MANAGE_CHAT_MESSAGES
    • USER_MANAGE_CHAT_COLOR
    • CHANNEL_MANAGE_MODERATORS
    • CHANNEL_READ_VIPS
    • CHANNEL_MANAGE_VIPS
    • USER_MANAGE_WHISPERS
  • added twitchAPI.helper.first() helper function
  • Added the following new Endpoints:
    • "Send Whisper"
    • "Remove Channel VIP"
    • "Add Channel VIP"
    • "Get VIPs"
    • "Add Channel Moderator"
    • "Remove Channel Moderator"
    • "Get User Chat Color"
    • "Update User Chat Color"
    • "Delete Chat Message"
    • "Send Chat Announcement"
    • "Get Soundtrack Current Track"
    • "Get Soundtrack Playlist"
    • "Get Soundtrack Playlists"
  • Removed the folllowing deprecated Endpoints:
    • "Get Banned Event"
    • "Get Moderator Events"
    • "Get Webhook Subscriptions"
  • The following Endpoints got changed:
    • Added igdb_id search parameter to Twitch.get_games()
    • Removed the Voting related fields in Twitch.create_poll() due to being deprecated
    • Updated the logic in Twitch.update_custom_reward() to avoid API errors
    • Removed id parameter from Twitch.get_hype_train_events()
    • Fixed the range check in Twitch.get_channel_information()
  • Twitch.app_auth_refresh_callback and Twitch.user_auth_refresh_callback are now async
  • Added oauth.get_user_info()
  • UserAuthenticator:
    • You can now set the document that will be shown at the end of the Auth flow by setting UserAuthenticator.document
    • The optional callback is now called with the access and refresh token instead of the user token
    • Added browser controls to UserAuthenticator.authenticate()
  • removed requests and websockets libraries from the requirements (resulting in smaller library footprint)

v2.5.7

22 Jul 16:13
6f5616c
Compare
Choose a tag to compare
  • Fixed the End Poll Endpoint
  • Properly define terminated poll status (thanks @iProdigy!)

v2.5.6

19 Jul 12:40
30c50ee
Compare
Choose a tag to compare
  • Updated Create Prediction to take between 2 and 10 outcomes (thanks @lynara!)
  • Added "Get Creator Goals" Endpoint (thanks @gitagogaming!)
  • TwitchAPIException will now also include the message from the Twitch API when available