Struct twitch_api::helix::moderation::get_banned_users::GetBannedUsersRequest
source · [−]#[non_exhaustive]pub struct GetBannedUsersRequest {
pub broadcaster_id: UserId,
pub user_id: Vec<UserId>,
pub after: Option<Cursor>,
pub before: Option<Cursor>,
pub first: Option<usize>,
}
helix
only.Expand description
Query Parameters for Get Banned Users
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.broadcaster_id: UserId
Must match the User ID in the Bearer token.
user_id: Vec<UserId>
Filters the results and only returns a status object for users who are banned in this channel and have a matching user_id. Format: Repeated Query Parameter, eg. /moderation/banned?broadcaster_id=1&user_id=2&user_id=3 Maximum: 100
after: Option<Cursor>
Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
before: Option<Cursor>
Cursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
first: Option<usize>
Number of values to be returned per page. Limit: 100. Default: 20.
Implementations
sourceimpl GetBannedUsersRequest
impl GetBannedUsersRequest
sourcepub fn builder() -> GetBannedUsersRequestBuilder<((), (), (), (), ())>
pub fn builder() -> GetBannedUsersRequestBuilder<((), (), (), (), ())>
Create a builder for building GetBannedUsersRequest
.
On the builder, call .broadcaster_id(...)
, .user_id(...)
(optional), .after(...)
(optional), .before(...)
(optional), .first(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetBannedUsersRequest
.
sourceimpl GetBannedUsersRequest
impl GetBannedUsersRequest
sourcepub fn broadcaster_id(broadcaster_id: impl Into<UserId>) -> Self
pub fn broadcaster_id(broadcaster_id: impl Into<UserId>) -> Self
Get banned users in a broadcasters channel.
Examples found in repository?
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
pub fn get_banned_users_in_channel_from_id<T>(
&'a self,
broadcaster_id: impl Into<types::UserId>,
token: &'a T,
) -> std::pin::Pin<
Box<
dyn futures::Stream<Item = Result<helix::moderation::BannedUser, ClientError<'a, C>>>
+ 'a,
>,
>
where
T: TwitchToken + Send + Sync + ?Sized,
{
let req = helix::moderation::GetBannedUsersRequest::broadcaster_id(broadcaster_id);
make_stream(req, token, self, std::collections::VecDeque::from)
}
sourcepub fn users(self, user_ids: impl IntoIterator<Item = impl Into<UserId>>) -> Self
pub fn users(self, user_ids: impl IntoIterator<Item = impl Into<UserId>>) -> Self
Check if supplied users are banned.
Trait Implementations
sourceimpl Clone for GetBannedUsersRequest
impl Clone for GetBannedUsersRequest
sourcefn clone(&self) -> GetBannedUsersRequest
fn clone(&self) -> GetBannedUsersRequest
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for GetBannedUsersRequest
impl Debug for GetBannedUsersRequest
sourceimpl<'de> Deserialize<'de> for GetBannedUsersRequest
impl<'de> Deserialize<'de> for GetBannedUsersRequest
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl Paginated for GetBannedUsersRequest
impl Paginated for GetBannedUsersRequest
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl PartialEq<GetBannedUsersRequest> for GetBannedUsersRequest
impl PartialEq<GetBannedUsersRequest> for GetBannedUsersRequest
sourcefn eq(&self, other: &GetBannedUsersRequest) -> bool
fn eq(&self, other: &GetBannedUsersRequest) -> bool
sourceimpl Request for GetBannedUsersRequest
impl Request for GetBannedUsersRequest
type Response = Vec<BannedUser, Global>
type Response = Vec<BannedUser, Global>
sourceconst PATH: &'static str = "moderation/banned"
const PATH: &'static str = "moderation/banned"
channels
for Get Channel Informationsourceconst SCOPE: &'static [Scope] = _
const SCOPE: &'static [Scope] = _
twitch_oauth2
only.sourceconst OPT_SCOPE: &'static [Scope] = _
const OPT_SCOPE: &'static [Scope] = _
twitch_oauth2
only.sourcefn query(&self) -> Result<String, SerializeError>
fn query(&self) -> Result<String, SerializeError>
sourcefn get_uri(&self) -> Result<Uri, InvalidUri>
fn get_uri(&self) -> Result<Uri, InvalidUri>
sourcefn get_bare_uri() -> Result<Uri, InvalidUri>
fn get_bare_uri() -> Result<Uri, InvalidUri>
sourceimpl RequestGet for GetBannedUsersRequest
impl RequestGet for GetBannedUsersRequest
sourcefn create_request(
&self,
token: &str,
client_id: &str
) -> Result<Request<Bytes>, CreateRequestError>
fn create_request(
&self,
token: &str,
client_id: &str
) -> Result<Request<Bytes>, CreateRequestError>
http::Request
from this Request
in your clientsourcefn parse_response<B: Into<Bytes>>(
request: Option<Self>,
uri: &Uri,
response: Response<B>
) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestGetError>where
Self: Sized,
fn parse_response<B: Into<Bytes>>(
request: Option<Self>,
uri: &Uri,
response: Response<B>
) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestGetError>where
Self: Sized,
sourcefn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response: &str,
status: StatusCode
) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestGetError>where
Self: Sized,
fn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response: &str,
status: StatusCode
) -> Result<Response<Self, <Self as Request>::Response>, HelixRequestGetError>where
Self: Sized,
sourceimpl Serialize for GetBannedUsersRequest
impl Serialize for GetBannedUsersRequest
impl Eq for GetBannedUsersRequest
impl StructuralEq for GetBannedUsersRequest
impl StructuralPartialEq for GetBannedUsersRequest
Auto Trait Implementations
impl RefUnwindSafe for GetBannedUsersRequest
impl Send for GetBannedUsersRequest
impl Sync for GetBannedUsersRequest
impl Unpin for GetBannedUsersRequest
impl UnwindSafe for GetBannedUsersRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.