Features
- [twitch-auth] add new package, contains all authentication helpers, the
AuthProvider
interface and its default implementations (fe6ace2, #140) - [twitch-api-call] add new package, a thin wrapper around
fetch
for Twitch API calls (fe6ace2) - [twitch]
ApiClient
can be intermittently used as anAuthProvider
to support the previous usage, but you should migrate to using theAuthProvider
implementations (e.g. fromtwitch-auth
) directly (fe6ace2)
Breaking changes
- [twitch]
TwitchClient
is now calledApiClient
(this is only breaking for 4.2.0-pre.0 users) (fe6ace2)
Deprecations
- [all] all symbols are now strictly camel case (as opposed to some exceptions there were before, like
TwitchAPICallType
, nowTwitchApiCallType
). The respective old names have been deprecated and scheduled for removal in 5.0. (c497452, #136) - [twitch]
TwitchClient.withCredentials
,TwitchClient.withClientCredentials
(construct the providers fromtwitch-auth
directly and pass them to theApiClient
constructor instead) (fe6ace2) - [twitch] static methods that were moved to
twitch-api-call
:ApiClient.callApi
->callTwitchApi
,ApiClient.getAccessToken
->exchangeCode
,ApiClient.getAppAccessToken
->getAppToken
,ApiClient.refreshAccessToken
->refreshUserToken
,ApiClient.getTokenInfo
->getTokenInfo
(fe6ace2) - [twitch-chat-client]
ChatClient.forTwitchClient
- use theChatClient
constructor with exactly the same parameters instead (fe6ace2) - [twitch-chat-client] passing an
ApiClient
instance to theChatClient
constructor; pass anAuthProvider
instead (fe6ace2)
Fixes
- [twitch-webhooks] fix deep import of webhook option object breaking the ESM build (b08fbfa)