- MSRV bumped to
1.71.1
- Fixed a typo in
ModeratorManageGuestStart
(now:ModeratorManageGuestStar
)
AppAccessToken
andUserToken
now return the correct duration inexpires_in
after refreshing.
- MSRV bumped to
1.70.0
- Added new scopes
channel:manage:guest_star
,channel:read:guest_star
,moderator:manage:guest_star
,moderator:manage:unban_requests
,moderator:manage:warnings
,moderator:read:banned_users
,moderator:read:chat_messages
,moderator:read:guest_star
,moderator:read:moderators
,moderator:read:suspicious_users
,moderator:read:unban_requests
,moderator:read:vips
,moderator:read:warnings
,user:read:emotes
- Removed unused generic in
AppAccessToken::from_existing
- BREAKING: Updated
http
to1.1.0
andreqwest
to0.12.2
- Added new scope
user:write:chat
- Added new scope
user:read:moderated_channels
- Added new scopes
channel:bot
,user:bot
,user:read:chat
,channel:manage:ads
andchannel:read:ads
.
- Made
validator!()
work so that it returns an empty validator which matches anything.
- Added
Validator
andvalidator!
for validating tokens. - Added new function
UserToken::from_token
for creating a token with only a access token available.
- Added
moderator:read:followers
scope - Added
Scope::all_slice
,Scope::as_static_str
to do const operations - Added
ValidationError::InvalidToken
to signify a invalid response for that specific token type
- Made
Scope::description
const - Made error enums non exhaustive
- Marked
user:edit:follows
as deprecated
- Removed
ValidationError::NoLogin
, replaced withValidationError::InvalidToken
- Added scopes for shoutouts
- Marked
channel_subscriptions
as deprecated.
- Updated
twitch_types
to0.4.0
- MSRV bumped to
1.66.1
- Changed
Client
trait to not be specified over a lifetime. Fixes an issue where &'1 Thing<'static> where: Thing<'static> would wrongly lower '1 to be specific. See twitch-rs/twitch_api#236
- Added new scopes
moderator:read:chatters
,moderator:read:shield_mode
,moderator:manage:shield_mode
- Added new feature flag
client
that enables client specific functions. Without this feature,twitch_oauth2
will only provide non-async functions and provide library users functions that returnshttp::Request
s and consumehttp::Response
s. ValidatedToken::expires_in
is now anOption
.
- Bumped
aliri_braid
to0.2
, this change means that thenew
method on the types intypes
only take an owned string nowAccessToken::new
,ClientId::new
,ClientSecret::new
,CsrfToken::new
andRefreshToken::new
now take aString
instead ofimpl Into<String>
- Organization moved to
twitch-rs
- Added scopes
channel:manage:raids
,channel:manage:moderators
,channel:manage:vips
,channel:read:charity
,channel:read:vips
,moderator:manage:announcements
,moderator:manage:chat_messages
,user:manage:chat_color
anduser:manage:whispers
- switch to
twitch_types
forUserId
andNickname
/UserName
- bump MSRV to 1.60, also changes the feature names for clients to their simpler variant
surf
andclient
- Added new scopes
moderator:manage:automod_settings
,moderator:manage:banned_users
,moderator:manage:blocked_terms
,moderator:manage:chat_settings
,moderator:read:automod_settings
,moderator:read:blocked_terms
andmoderator:read:chat_settings
- All types associated with tokens are now defined in this crate. This is a consequence of the
oauth2
dependency being removed from tree. Additionally, as another consequence, clients are now able to be specified as afor<'a> &'a T where T: Client<'a>
, meaningtwitch_api
can use its clients as an interface to token requests, and clients can persist instead of being rebuilt every call. Care should be taken when making clients, as SSRF and similar attacks are possible with improper client configurations.
- Added types/braids
ClientId
,ClientSecret
,AccessToken
,RefreshToken
andCsrfToken
. - Added way to interact with the Twitch-CLI mock API using environment variables.
See static variables
AUTH_URL
,TOKEN_URL
,VALIDATE_URL
andREVOKE_URL
for more information. - Added
impl Borrow<str> for Scope
, meaning it can be used in places it couldn't be used before. Primarily, it allows the following code to work:let scopes = vec![Scope::ChatEdit, Scope::ChatRead]; let space_separated_scope: String = scopes.as_slice().join(" ");
- Added scope
channel:read:goals
- Requests to
id.twitch.tv
now follow the documentation, instead of following a subset of the RFC for oauth2. - URLs are now initialized lazily and specified as
url::Url
s.
- Removed
oauth2
dependency.
- Added new scope
channel:manage:schedule
- Added new scopes
channel:manage:polls
,channel:manage:predictions
,channel:read:polls
,channel:read:predictions
, andmoderator:manage:automod
, - Added function
Scope::description
to get the description of the scope
- Made crate runtime agnostic with custom clients.
- Updated deps.
- Add an extra (optional) client secret field to
UserToken::from_existing
(thanks Dinnerbone) - Added
channel:manage:redemptions
,channel:read:editors
,channel:manage:videos
,user:read:blocked_users
,user:manage:blocked_users
,user:read:subscriptions
anduser:read:follows
- Implemented OAuth Authorization Code Flow with
UserTokenBuilder
- Added a way to suggest or infer that an user token is never expiring, making
is_elapsed
return false andexpires_in
a bogus (max) duration.
- MSRV: 1.51
- Made scope take
Cow<&'static str>
- Made fields
access_token
,refresh_token
,user_id
andlogin
pub
onUserToken
andAppAccessToken
(where applicable) - Fixed wrong scope
user:read:stream_key
->channel:read:stream_key
- BREAKING: changed
TwitchToken::expires
->TwitchToken::expires_in
to calculate current lifetime of token
Changelog starts on v0.5.0