Struct twitch_api::helix::moderation::GetModeratorsRequest
source · [−]#[non_exhaustive]pub struct GetModeratorsRequest<'a> {
pub broadcaster_id: Cow<'a, UserIdRef>,
pub user_id: Cow<'a, [&'a UserIdRef]>,
pub after: Option<Cow<'a, CursorRef>>,
pub first: Option<usize>,
}
helix
only.Expand description
Query Parameters for Get Moderators
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: Cow<'a, UserIdRef>
Must match the User ID in the Bearer token.
user_id: Cow<'a, [&'a UserIdRef]>
Filters the results and only returns a status object for users who are moderators in this channel and have a matching user_id.
after: Option<Cow<'a, CursorRef>>
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.
first: Option<usize>
Number of values to be returned per page. Limit: 100. Default: 20.
Implementations
sourceimpl<'a> GetModeratorsRequest<'a>
impl<'a> GetModeratorsRequest<'a>
sourcepub fn builder() -> GetModeratorsRequestBuilder<'a, ((), (), (), ())>
pub fn builder() -> GetModeratorsRequestBuilder<'a, ((), (), (), ())>
Create a builder for building GetModeratorsRequest
.
On the builder, call .broadcaster_id(...)
, .user_id(...)
(optional), .after(...)
(optional), .first(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetModeratorsRequest
.
sourceimpl<'a> GetModeratorsRequest<'a>
impl<'a> GetModeratorsRequest<'a>
sourcepub fn broadcaster_id(broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
pub fn broadcaster_id(broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
Get moderators in a broadcasters channel.
Examples found in repository?
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
pub fn get_moderators_in_channel_from_id<'b: 'a, T>(
&'a self,
broadcaster_id: impl types::IntoCow<'b, types::UserIdRef> + 'b,
token: &'a T,
) -> std::pin::Pin<
Box<
dyn futures::Stream<Item = Result<helix::moderation::Moderator, ClientError<'a, C>>>
+ 'a,
>,
>
where
T: TwitchToken + Send + Sync + ?Sized,
{
let req = helix::moderation::GetModeratorsRequest::broadcaster_id(broadcaster_id);
make_stream(req, token, self, std::collections::VecDeque::from)
}
Trait Implementations
sourceimpl<'a> Clone for GetModeratorsRequest<'a>
impl<'a> Clone for GetModeratorsRequest<'a>
sourcefn clone(&self) -> GetModeratorsRequest<'a>
fn clone(&self) -> GetModeratorsRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetModeratorsRequest<'a>
impl<'a> Debug for GetModeratorsRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetModeratorsRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetModeratorsRequest<'a>
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 GetModeratorsRequest<'_>
impl Paginated for GetModeratorsRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<GetModeratorsRequest<'a>> for GetModeratorsRequest<'a>
impl<'a> PartialEq<GetModeratorsRequest<'a>> for GetModeratorsRequest<'a>
sourcefn eq(&self, other: &GetModeratorsRequest<'a>) -> bool
fn eq(&self, other: &GetModeratorsRequest<'a>) -> bool
sourceimpl Request for GetModeratorsRequest<'_>
impl Request for GetModeratorsRequest<'_>
sourceconst PATH: &'static str = "moderation/moderators"
const PATH: &'static str = "moderation/moderators"
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 GetModeratorsRequest<'_>
impl RequestGet for GetModeratorsRequest<'_>
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<'a> Serialize for GetModeratorsRequest<'a>
impl<'a> Serialize for GetModeratorsRequest<'a>
impl<'a> Eq for GetModeratorsRequest<'a>
impl<'a> StructuralEq for GetModeratorsRequest<'a>
impl<'a> StructuralPartialEq for GetModeratorsRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetModeratorsRequest<'a>
impl<'a> Send for GetModeratorsRequest<'a>
impl<'a> Sync for GetModeratorsRequest<'a>
impl<'a> Unpin for GetModeratorsRequest<'a>
impl<'a> UnwindSafe for GetModeratorsRequest<'a>
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.