Struct twitch_api::helix::chat::GetChattersRequest
source · [−]#[non_exhaustive]pub struct GetChattersRequest<'a> {
pub broadcaster_id: Cow<'a, UserIdRef>,
pub moderator_id: Cow<'a, UserIdRef>,
pub first: Option<usize>,
pub after: Option<Cow<'a, CursorRef>>,
}
helix
only.Expand description
Query Parameters for Get Chatters
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>
The ID of the broadcaster whose list of chatters you want to get.
moderator_id: Cow<'a, UserIdRef>
The ID of the moderator or the specified broadcaster that’s requesting the list of chatters. This ID must match the user ID associated with the user access token.
The moderator must have permission to moderate the broadcaster’s chat room.
first: Option<usize>
The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 1,000. The default is 100.
after: Option<Cow<'a, CursorRef>>
The cursor used to get the next page of results. The Pagination object in the response contains the cursor’s value.
Implementations
sourceimpl<'a> GetChattersRequest<'a>
impl<'a> GetChattersRequest<'a>
sourcepub fn builder() -> GetChattersRequestBuilder<'a, ((), (), (), ())>
pub fn builder() -> GetChattersRequestBuilder<'a, ((), (), (), ())>
Create a builder for building GetChattersRequest
.
On the builder, call .broadcaster_id(...)
, .moderator_id(...)
, .first(...)
(optional), .after(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetChattersRequest
.
sourceimpl<'a> GetChattersRequest<'a>
impl<'a> GetChattersRequest<'a>
sourcepub fn new(
broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a,
moderator_id: impl IntoCow<'a, UserIdRef> + 'a
) -> Self
pub fn new(
broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a,
moderator_id: impl IntoCow<'a, UserIdRef> + 'a
) -> Self
Get chatters in broadcasters channel
Notes
The moderator has to be the token owner and can moderate the chat
Examples found in repository?
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
pub fn get_chatters<T>(
&'a self,
broadcaster_id: impl Into<&'a types::UserIdRef>,
moderator_id: impl Into<&'a types::UserIdRef>,
batch_size: impl Into<Option<usize>>,
token: &'a T,
) -> std::pin::Pin<
Box<dyn futures::Stream<Item = Result<helix::chat::Chatter, ClientError<'a, C>>> + 'a>,
>
where
T: TwitchToken + Send + Sync + ?Sized,
{
let req = helix::chat::GetChattersRequest {
first: batch_size.into(),
..helix::chat::GetChattersRequest::new(broadcaster_id.into(), moderator_id.into())
};
make_stream(req, token, self, std::collections::VecDeque::from)
}
Trait Implementations
sourceimpl<'a> Clone for GetChattersRequest<'a>
impl<'a> Clone for GetChattersRequest<'a>
sourcefn clone(&self) -> GetChattersRequest<'a>
fn clone(&self) -> GetChattersRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetChattersRequest<'a>
impl<'a> Debug for GetChattersRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetChattersRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetChattersRequest<'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 GetChattersRequest<'_>
impl Paginated for GetChattersRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<GetChattersRequest<'a>> for GetChattersRequest<'a>
impl<'a> PartialEq<GetChattersRequest<'a>> for GetChattersRequest<'a>
sourcefn eq(&self, other: &GetChattersRequest<'a>) -> bool
fn eq(&self, other: &GetChattersRequest<'a>) -> bool
sourceimpl Request for GetChattersRequest<'_>
impl Request for GetChattersRequest<'_>
sourceconst PATH: &'static str = "chat/chatters"
const PATH: &'static str = "chat/chatters"
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 GetChattersRequest<'_>
impl RequestGet for GetChattersRequest<'_>
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 GetChattersRequest<'a>
impl<'a> Serialize for GetChattersRequest<'a>
impl<'a> Eq for GetChattersRequest<'a>
impl<'a> StructuralEq for GetChattersRequest<'a>
impl<'a> StructuralPartialEq for GetChattersRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetChattersRequest<'a>
impl<'a> Send for GetChattersRequest<'a>
impl<'a> Sync for GetChattersRequest<'a>
impl<'a> Unpin for GetChattersRequest<'a>
impl<'a> UnwindSafe for GetChattersRequest<'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.