twitch_oauth2::scopes

Enum Scope

Source
#[non_exhaustive]
pub enum Scope {
Show 81 variants AnalyticsReadExtensions, AnalyticsReadGames, BitsRead, ChannelBot, ChannelEditCommercial, ChannelManageAds, ChannelManageBroadcast, ChannelManageExtensions, ChannelManageGuestStar, ChannelManageModerators, ChannelManagePolls, ChannelManagePredictions, ChannelManageRaids, ChannelManageRedemptions, ChannelManageSchedule, ChannelManageVideos, ChannelManageVips, ChannelModerate, ChannelReadAds, ChannelReadCharity, ChannelReadEditors, ChannelReadGoals, ChannelReadGuestStar, ChannelReadHypeTrain, ChannelReadPolls, ChannelReadPredictions, ChannelReadRedemptions, ChannelReadStreamKey, ChannelReadSubscriptions, ChannelReadVips, ChannelSubscriptions, ChatEdit, ChatRead, ClipsEdit, ModerationRead, ModeratorManageAnnouncements, ModeratorManageAutoMod, ModeratorManageAutomodSettings, ModeratorManageBannedUsers, ModeratorManageBlockedTerms, ModeratorManageChatMessages, ModeratorManageChatSettings, ModeratorManageGuestStart, ModeratorManageShieldMode, ModeratorManageShoutouts, ModeratorManageUnbanRequests, ModeratorManageWarnings, ModeratorReadAutomodSettings, ModeratorReadBannedUsers, ModeratorReadBlockedTerms, ModeratorReadChatMessages, ModeratorReadChatSettings, ModeratorReadChatters, ModeratorReadFollowers, ModeratorReadGuestStar, ModeratorReadModerators, ModeratorReadShieldMode, ModeratorReadShoutouts, ModeratorReadSuspiciousUsers, ModeratorReadUnbanRequests, ModeratorReadVips, ModeratorReadWarnings, UserBot, UserEdit, UserEditBroadcast, UserEditFollows, UserManageBlockedUsers, UserManageChatColor, UserManageWhispers, UserReadBlockedUsers, UserReadBroadcast, UserReadChat, UserReadEmail, UserReadEmotes, UserReadFollows, UserReadModeratedChannels, UserReadSubscriptions, UserWriteChat, WhispersEdit, WhispersRead, Other(Cow<'static, str>),
}
Expand description

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AnalyticsReadExtensions

View analytics data for the Twitch Extensions owned by the authenticated account.

analytics:read:extensions

§

AnalyticsReadGames

View analytics data for the games owned by the authenticated account.

analytics:read:games

§

BitsRead

View Bits information for a channel.

bits:read

§

ChannelBot

Allows the client’s bot users access to a channel.

channel:bot

§

ChannelEditCommercial

Run commercials on a channel.

channel:edit:commercial

§

ChannelManageAds

Manage ads schedule on a channel.

channel:manage:ads

§

ChannelManageBroadcast

Manage a channel’s broadcast configuration, including updating channel configuration and managing stream markers and stream tags.

channel:manage:broadcast

§

ChannelManageExtensions

Manage a channel’s Extension configuration, including activating Extensions.

channel:manage:extensions

§

ChannelManageGuestStar

Manage Guest Star for your channel.

channel:manage:guest_star

§

ChannelManageModerators

Add or remove the moderator role from users in your channel.

channel:manage:moderators

§

ChannelManagePolls

Manage a channel’s polls.

channel:manage:polls

§

ChannelManagePredictions

Manage of channel’s Channel Points Predictions

channel:manage:predictions

§

ChannelManageRaids

Manage a channel raiding another channel.

channel:manage:raids

§

ChannelManageRedemptions

Manage Channel Points custom rewards and their redemptions on a channel.

channel:manage:redemptions

§

ChannelManageSchedule

Manage a channel’s stream schedule.

channel:manage:schedule

§

ChannelManageVideos

Manage a channel’s videos, including deleting videos.

channel:manage:videos

§

ChannelManageVips

Add or remove the VIP role from users in your channel.

channel:manage:vips

§

ChannelModerate

Perform moderation actions in a channel. The user requesting the scope must be a moderator in the channel.

channel:moderate

§

ChannelReadAds

Read the ads schedule and details on your channel.

channel:read:ads

§

ChannelReadCharity

Read charity campaign details and user donations on your channel.

channel:read:charity

§

ChannelReadEditors

View a list of users with the editor role for a channel.

channel:read:editors

§

ChannelReadGoals

View Creator Goals for a channel.

channel:read:goals

§

ChannelReadGuestStar

Read Guest Star details for your channel.

channel:read:guest_star

§

ChannelReadHypeTrain

View Hype Train information for a channel.

channel:read:hype_train

§

ChannelReadPolls

View a channel’s polls.

channel:read:polls

§

ChannelReadPredictions

View a channel’s Channel Points Predictions.

channel:read:predictions

§

ChannelReadRedemptions

View Channel Points custom rewards and their redemptions on a channel.

channel:read:redemptions

§

ChannelReadStreamKey

View an authorized user’s stream key.

channel:read:stream_key

§

ChannelReadSubscriptions

View a list of all subscribers to a channel and check if a user is subscribed to a channel.

channel:read:subscriptions

§

ChannelReadVips

Read the list of VIPs in your channel.

channel:read:vips

§

ChannelSubscriptions

👎Deprecated: Use ChannelReadSubscriptions (channel:read:subscriptions) instead

Read all subscribers to your channel.

channel_subscriptions

§

ChatEdit

Send live stream chat and rooms messages.

chat:edit

§

ChatRead

View live stream chat and rooms messages.

chat:read

§

ClipsEdit

Manage Clips for a channel.

clips:edit

§

ModerationRead

View a channel’s moderation data including Moderators, Bans, Timeouts, and Automod settings.

moderation:read

§

ModeratorManageAnnouncements

Send announcements in channels where you have the moderator role.

moderator:manage:announcements

§

ModeratorManageAutoMod

Manage messages held for review by AutoMod in channels where you are a moderator.

moderator:manage:automod

§

ModeratorManageAutomodSettings

Manage a broadcaster’s AutoMod settings

moderator:manage:automod_settings

§

ModeratorManageBannedUsers

Ban and unban users.

moderator:manage:banned_users

§

ModeratorManageBlockedTerms

Manage a broadcaster’s list of blocked terms.

moderator:manage:blocked_terms

§

ModeratorManageChatMessages

Delete chat messages in channels where you have the moderator role

moderator:manage:chat_messages

§

ModeratorManageChatSettings

View a broadcaster’s chat room settings.

moderator:manage:chat_settings

§

ModeratorManageGuestStart

Manage Guest Star for channels where you are a Guest Star moderator.

moderator:manage:guest_star

§

ModeratorManageShieldMode

Manage a broadcaster’s Shield Mode status.

moderator:manage:shield_mode

§

ModeratorManageShoutouts

Manage a broadcaster’s shoutouts.

moderator:manage:shoutouts

§

ModeratorManageUnbanRequests

Manage a broadcaster’s unban requests.

moderator:manage:unban_requests

§

ModeratorManageWarnings

Manage a broadcaster’s chat warnings.

moderator:manage:warnings

§

ModeratorReadAutomodSettings

View a broadcaster’s AutoMod settings.

moderator:read:automod_settings

§

ModeratorReadBannedUsers

Read the list of bans or unbans in channels where you have the moderator role.

moderator:read:banned_users

§

ModeratorReadBlockedTerms

View a broadcaster’s list of blocked terms.

moderator:read:blocked_terms

§

ModeratorReadChatMessages

Read deleted chat messages in channels where you have the moderator role.

moderator:read:chat_messages

§

ModeratorReadChatSettings

View a broadcaster’s chat room settings.

moderator:read:chat_settings

§

ModeratorReadChatters

View the chatters in a broadcaster’s chat room.

moderator:read:chatters

§

ModeratorReadFollowers

Read the followers of a broadcaster.

moderator:read:followers

§

ModeratorReadGuestStar

Read Guest Star details for channels where you are a Guest Star moderator.

moderator:read:guest_star

§

ModeratorReadModerators

Read the list of moderators in channels where you have the moderator role.

moderator:read:moderators

§

ModeratorReadShieldMode

View a broadcaster’s Shield Mode status.

moderator:read:shield_mode

§

ModeratorReadShoutouts

View a broadcaster’s shoutouts.

moderator:read:shoutouts

§

ModeratorReadSuspiciousUsers

Read chat messages from suspicious users and see users flagged as suspicious in channels where you have the moderator role.

moderator:read:suspicious_users

§

ModeratorReadUnbanRequests

View a broadcaster’s unban requests.

moderator:read:unban_requests

§

ModeratorReadVips

Read the list of VIPs in channels where you have the moderator role.

moderator:read:vips

§

ModeratorReadWarnings

View a broadcaster’s chat warnings.

moderator:read:warnings

§

UserBot

Allows client’s bot to act as this user.

user:bot

§

UserEdit

Manage a user object.

user:edit

§

UserEditBroadcast

Edit your channel’s broadcast configuration, including extension configuration. (This scope implies user:read:broadcast capability.)

user:edit:broadcast

§

UserEditFollows

👎Deprecated: Not used anymore, see https://discuss.dev.twitch.tv/t/deprecation-of-create-and-delete-follows-api-endpoints/32351

[DEPRECATED] Was previously used for “Create User Follows” and “Delete User Follows.

user:edit:follows

§

UserManageBlockedUsers

Manage the block list of a user.

user:manage:blocked_users

§

UserManageChatColor

Update the color used for the user’s name in chat.Update User Chat Color

user:manage:chat_color

§

UserManageWhispers

Read whispers that you send and receive, and send whispers on your behalf.

user:manage:whispers

§

UserReadBlockedUsers

View the block list of a user.

user:read:blocked_users

§

UserReadBroadcast

View a user’s broadcasting configuration, including Extension configurations.

user:read:broadcast

§

UserReadChat

View live stream chat and room messages.

user:read:chat

§

UserReadEmail

View a user’s email address.

user:read:email

§

UserReadEmotes

View emotes available to a user

user:read:emotes

§

UserReadFollows

View the list of channels a user follows.

user:read:follows

§

UserReadModeratedChannels

Read the list of channels you have moderator privileges in.

user:read:moderated_channels

§

UserReadSubscriptions

View if an authorized user is subscribed to specific channels.

user:read:subscriptions

§

UserWriteChat

Send messages in a chat room.

user:write:chat

§

WhispersEdit

Send whisper messages.

whispers:edit

§

WhispersRead

View your whisper messages.

whispers:read

§

Other(Cow<'static, str>)

Other scope that is not implemented.

Implementations§

Source§

impl Scope

Source

pub fn all() -> Vec<Scope>

Get a vec of all defined twitch Scopes.

Please note that this may not work for you, as some auth flows and “apis” don’t accept all scopes

Source

pub const fn all_slice() -> &'static [Scope]

Get a slice of all defined twitch Scopes.

Please note that this may not work for you, as some auth flows and “apis” don’t accept all scopes

Source

pub const fn description(&self) -> &'static str

Get a description for the token

Source

pub fn parse<C>(s: C) -> Scope
where C: Into<Cow<'static, str>>,

Make a scope from a cow string

Source

pub fn as_str(&self) -> &str

Get the scope as a borrowed string.

Source

pub const fn as_static_str(&self) -> &'static str

Get the scope as a static string slice.

§Panics

This function panics if the scope can’t be represented as a static string slice

Source§

impl Scope

Source

pub const fn to_validator(self) -> Validator

Get the scope as a validator.

Trait Implementations§

Source§

impl Borrow<str> for Scope

Source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
Source§

impl Clone for Scope

Source§

fn clone(&self) -> Scope

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Scope

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Scope

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Scope

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Scope> for String

Source§

fn from(s: Scope) -> Self

Converts to this type from the input type.
Source§

impl From<Scope> for Validator

Source§

fn from(scope: Scope) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Scope

Source§

fn from(s: String) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Scope

Source§

fn eq(&self, other: &Scope) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Scope

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Scope

Source§

impl StructuralPartialEq for Scope

Auto Trait Implementations§

§

impl Freeze for Scope

§

impl RefUnwindSafe for Scope

§

impl Send for Scope

§

impl Sync for Scope

§

impl Unpin for Scope

§

impl UnwindSafe for Scope

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,