pub struct GetUsersRequest<A>where
A: AuthToken,{ /* private fields */ }
Expand description
Request to the Get Users
endpoint
See module level documentation for usage
Implementations§
Source§impl<A: AuthToken> GetUsersRequest<A>
impl<A: AuthToken> GetUsersRequest<A>
Sourcepub fn set_auth(&mut self, auth: A) -> &mut Self
pub fn set_auth(&mut self, auth: A) -> &mut Self
Set the authorization token to use
Consumes the token, so should be cloned if you plan to re-use TODO offer reference counted storage for fewer allocations.
Sourcepub fn add_id<S: Into<UserId>>(&mut self, id: S) -> &mut Self
pub fn add_id<S: Into<UserId>>(&mut self, id: S) -> &mut Self
Add the id to the set of ids to be sent. May not have more than 100 ids and logins
Sourcepub fn set_ids<C, S>(&mut self, ids: C) -> &mut Self
pub fn set_ids<C, S>(&mut self, ids: C) -> &mut Self
Replace the set of ids to be sent
let mut req = GetUsersRequest::builder();
req.set_ids(vec!["477906794"]);
// ...
Sourcepub fn add_login<S: Into<UserName>>(&mut self, login: S) -> &mut Self
pub fn add_login<S: Into<UserName>>(&mut self, login: S) -> &mut Self
Add the login to the set of logins to be sent. May not have more than 100 ids and logins
Sourcepub fn clear_logins(&mut self) -> &mut Self
pub fn clear_logins(&mut self) -> &mut Self
Clear the set of ids to be sent
Sourcepub fn set_logins<C, S>(&mut self, logins: C) -> &mut Self
pub fn set_logins<C, S>(&mut self, logins: C) -> &mut Self
Replace the set of logins to be sent
let mut req = GetUsersRequest::builder();
req.set_ids(vec!["TheHoodlum12", "Denims"]);
// ...
Trait Implementations§
Source§impl<A> Debug for GetUsersRequest<A>
impl<A> Debug for GetUsersRequest<A>
Source§impl<A> Request for GetUsersRequest<A>
impl<A> Request for GetUsersRequest<A>
Source§const ENDPOINT: &'static str = "https://api.twitch.tv/helix/users"
const ENDPOINT: &'static str = "https://api.twitch.tv/helix/users"
Endpoint where the request is made
Source§type Parameters = GetUsersRequest<A>
type Parameters = GetUsersRequest<A>
The type that represents the query parameters sent with this request
Source§type Response = GetUsersResponse
type Response = GetUsersResponse
The type returned by a sucessful request, must be
DeserializeOwned
and have at least a static lifetime (owned).Source§type ErrorCodes = CommonResponseCodes
type ErrorCodes = CommonResponseCodes
The type that encapsulates the error codes that this endpoint can return,
must have at least a static lifetime (owned).
Source§fn parameters(&self) -> &Self::Parameters
fn parameters(&self) -> &Self::Parameters
Get the Parameters struct for this Request Read more
Source§fn ready(&self) -> Result<(), RequestError<Self::ErrorCodes>>
fn ready(&self) -> Result<(), RequestError<Self::ErrorCodes>>
Must return
Ok(())
if and only if this request is ready to have
Self::make_request
called on it. Read moreSource§fn make_request<'life0, 'async_trait, C>(
&'life0 self,
client: C,
) -> Pin<Box<dyn Future<Output = Result<Self::Response, RequestError<Self::ErrorCodes>>> + Send + 'async_trait>>
fn make_request<'life0, 'async_trait, C>( &'life0 self, client: C, ) -> Pin<Box<dyn Future<Output = Result<Self::Response, RequestError<Self::ErrorCodes>>> + Send + 'async_trait>>
Make the request represented by this object. Only makes request if
Self::ready
returns
Ok(())
.Auto Trait Implementations§
impl<A> Freeze for GetUsersRequest<A>where
A: Freeze,
impl<A> RefUnwindSafe for GetUsersRequest<A>where
A: RefUnwindSafe,
impl<A> Send for GetUsersRequest<A>where
A: Send,
impl<A> Sync for GetUsersRequest<A>where
A: Sync,
impl<A> Unpin for GetUsersRequest<A>where
A: Unpin,
impl<A> UnwindSafe for GetUsersRequest<A>where
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Parameters for Twhere
T: ParametersExt,
impl<T> Parameters for Twhere
T: ParametersExt,
Source§fn write_parameters(&self, req: RequestBuilder) -> RequestBuilder
fn write_parameters(&self, req: RequestBuilder) -> RequestBuilder
Write parameters to request builder and return request builder