Skip to content

Commit 32c2843

Browse files
committed
Add more migrating guide
1 parent 709a199 commit 32c2843

File tree

1 file changed

+113
-2
lines changed

1 file changed

+113
-2
lines changed

docs/getting-started/migrating.rst

Lines changed: 113 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ In addition to the above changes, the :class:`~twitchio.Client` has undergone ot
162162
- :meth:`twitchio.Client.update_entitlements`
163163
- :meth:`twitchio.Client.update_extensions`
164164
- :meth:`twitchio.Client.websocket_subscriptions`
165-
165+
- :meth:`twitchio.Client.fetch_conduit`
166+
- :meth:`twitchio.Client.fetch_conduits`
167+
- :meth:`twitchio.Client.create_conduit`
166168

167169
**Changed:**
168170

@@ -212,6 +214,45 @@ In addition to the above changes, the :class:`~twitchio.Client` has undergone ot
212214
- ``Client.fetch_global_emotes()``
213215

214216

217+
Conduits and AutoClient/Bot
218+
===========================
219+
220+
Recently Twitch added the ``Conduit`` transport type. Conduits help separate your EventSub subscriptions from the underlying
221+
connection/transport (Websocket/Webhook) and load balances the events sent between them.
222+
223+
Read more about Conduits on the `Twitch Docs <https://dev.twitch.tv/docs/eventsub/handling-conduit-events>`_ .
224+
225+
Conduits come with some advantages over traditional EventSub:
226+
227+
- Uses App Access Tokens (Not User Tokens)
228+
- Subscription Continuity (Subscriptions remain on the Conduit even if the Bot and all it's connections disconnect for upto 72 hours)
229+
- Load balancing between connections
230+
- Scale up and down easily
231+
- Less subscription limits
232+
233+
In TwitchIO V3 we support Conduits in two forms:
234+
235+
- Via :class:`twitchio.AutoClient` and :class:`twitchio.ext.commands.AutoBot`
236+
- Your own implementation using the Models and API.
237+
238+
We highly recommended using Conduits in-place of the regular EventSub implementation for your application. The easiest way to get
239+
started is with :class:`twitchio.AutoClient` and :class:`twitchio.ext.commands.AutoBot`.
240+
241+
**Added:**
242+
243+
- :class:`twitchio.AutoClient`
244+
- :class:`twitchio.ext.commands.AutoBot`
245+
- :class:`twitchio.ConduitInfo`
246+
- :class:`twitchio.Conduit`
247+
- :class:`twitchio.ConduitShard`
248+
- :class:`twitchio.MultiSubscribePayload`
249+
- :class:`twitchio.MultiSubscribeSuccess`
250+
- :class:`twitchio.MultiSubscribeError`
251+
- :meth:`twitchio.Client.fetch_conduit`
252+
- :meth:`twitchio.Client.fetch_conduits`
253+
- :meth:`twitchio.Client.create_conduit`
254+
255+
215256
Logging
216257
=======
217258

@@ -340,6 +381,39 @@ To wait until the bot is ready, consider using :meth:`twitchio.Client.wait_until
340381
- ``Client.wait_for_ready`` is now :meth:`twitchio.Client.wait_until_ready`
341382

342383

384+
Sounds Ext
385+
===========
386+
387+
The sounds extension has been removed and will be replaced with an ``Overlays`` extension in a future release.
388+
389+
390+
Routines Ext
391+
============
392+
393+
The way you use Routines has not changed significantly, with only one difference. You can no longer provide the ``seconds``, ``minutes``, ``hours`` etc
394+
arguments and instead pass a :class:`datetime.timedelta` in their place.
395+
396+
Besides this change, Routines mostly underwent optimizations and compatability with asyncio changes.
397+
398+
**Added:**
399+
400+
- :meth:`twitchio.ext.routines.Routine.next_iteration`
401+
- :attr:`twitchio.ext.routines.Routine.last_iteration`
402+
- :attr:`twitchio.ext.routines.Routine.current_iteration`
403+
- :attr:`twitchio.ext.routines.Routine.args`
404+
- :attr:`twitchio.ext.routines.Routine.kwargs`
405+
406+
**Changed:**
407+
408+
- :func:`twitchio.ext.routines.routine`
409+
- Accepts a :class:`datetime.timedelta` in place of individual units.
410+
- :meth:`twitchio.ext.routines.Routine.change_interval`
411+
- Accepts a :class:`datetime.timedelta` in place of individual units.
412+
413+
**Removed:**
414+
415+
- Attribute ``Routine.start_time``.
416+
343417

344418
Changelog
345419
=========
@@ -366,6 +440,20 @@ Dependencies:
366440
Added
367441
~~~~~
368442

443+
Conduits:
444+
445+
- :class:`twitchio.AutoClient`
446+
- :class:`twitchio.ext.commands.AutoBot`
447+
- :class:`twitchio.ConduitInfo`
448+
- :class:`twitchio.Conduit`
449+
- :class:`twitchio.ConduitShard`
450+
- :class:`twitchio.MultiSubscribePayload`
451+
- :class:`twitchio.MultiSubscribeSuccess`
452+
- :class:`twitchio.MultiSubscribeError`
453+
- :class:`twitchio.`
454+
455+
Adapters:
456+
369457
- :class:`twitchio.web.AiohttpAdapter`
370458
- :class:`twitchio.web.StarletteAdapter`
371459

@@ -407,6 +495,9 @@ Client:
407495
- :meth:`twitchio.Client.update_entitlements`
408496
- :meth:`twitchio.Client.update_extensions`
409497
- :meth:`twitchio.Client.websocket_subscriptions`
498+
- :meth:`twitchio.Client.fetch_conduit`
499+
- :meth:`twitchio.Client.fetch_conduits`
500+
- :meth:`twitchio.Client.create_conduit`
410501

411502
Utils/Helpers:
412503

@@ -422,6 +513,14 @@ Events:
422513
- :func:`twitchio.event_oauth_authorized`
423514
- :func:`twitchio.event_token_refreshed`
424515

516+
Routines:
517+
518+
- :meth:`twitchio.ext.routines.Routine.next_iteration`
519+
- :attr:`twitchio.ext.routines.Routine.last_iteration`
520+
- :attr:`twitchio.ext.routines.Routine.current_iteration`
521+
- :attr:`twitchio.ext.routines.Routine.args`
522+
- :attr:`twitchio.ext.routines.Routine.kwargs`
523+
425524
Changed
426525
~~~~~~~
427526

@@ -437,6 +536,14 @@ Client:
437536
- ``Client.fetch_chatters_colors`` is now :meth:`~twitchio.Client.fetch_chatters_color`
438537
- ``Client.fetch_content_classification_labels`` is now :meth:`~twitchio.Client.fetch_classifications`
439538

539+
Routines:
540+
541+
- :func:`twitchio.ext.routines.routine`
542+
- Accepts a :class:`datetime.timedelta` in place of individual units.
543+
- :meth:`twitchio.ext.routines.Routine.change_interval`
544+
- Accepts a :class:`datetime.timedelta` in place of individual units.
545+
546+
440547
Removed
441548
~~~~~~~
442549

@@ -477,4 +584,8 @@ Client:
477584
- ``Client.update_chatter_color()``
478585
- ``Client.from_client_credentials()``
479586
- ``Client.fetch_global_chat_badges()``
480-
- ``Client.fetch_global_emotes()``
587+
- ``Client.fetch_global_emotes()``
588+
589+
Routines:
590+
591+
- Attribute ``Routine.start_time``.

0 commit comments

Comments
 (0)