Struct twitch_api::helix::points::GetCustomRewardRequest
source · [−]#[non_exhaustive]pub struct GetCustomRewardRequest<'a> {
pub broadcaster_id: Cow<'a, UserIdRef>,
pub id: Cow<'a, [&'a RewardIdRef]>,
pub only_manageable_rewards: Option<bool>,
}
Available on crate feature
helix
only.Expand description
Query Parameters for Get Custom Reward
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.broadcaster_id: Cow<'a, UserIdRef>
Provided broadcaster_id must match the user_id in the auth token
id: Cow<'a, [&'a RewardIdRef]>
When used, this parameter filters the results and only returns reward objects for the Custom Rewards with matching ID. Maximum: 50
only_manageable_rewards: Option<bool>
When set to true, only returns custom rewards that the calling client_id can manage. Defaults false.
Implementations
sourceimpl<'a> GetCustomRewardRequest<'a>
impl<'a> GetCustomRewardRequest<'a>
sourcepub fn builder() -> GetCustomRewardRequestBuilder<'a, ((), (), ())>
pub fn builder() -> GetCustomRewardRequestBuilder<'a, ((), (), ())>
Create a builder for building GetCustomRewardRequest
.
On the builder, call .broadcaster_id(...)
, .id(...)
(optional), .only_manageable_rewards(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetCustomRewardRequest
.
sourceimpl<'a> GetCustomRewardRequest<'a>
impl<'a> GetCustomRewardRequest<'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
Rewards on this broadcasters channel
sourcepub fn ids(self, id: impl Into<Cow<'a, [&'a RewardIdRef]>>) -> Self
pub fn ids(self, id: impl Into<Cow<'a, [&'a RewardIdRef]>>) -> Self
Get rewards with these ids
sourcepub fn only_manageable_rewards(self, only_manageable_rewards: bool) -> Self
pub fn only_manageable_rewards(self, only_manageable_rewards: bool) -> Self
Only return rewards that this application/client id can edit
Trait Implementations
sourceimpl<'a> Clone for GetCustomRewardRequest<'a>
impl<'a> Clone for GetCustomRewardRequest<'a>
sourcefn clone(&self) -> GetCustomRewardRequest<'a>
fn clone(&self) -> GetCustomRewardRequest<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for GetCustomRewardRequest<'a>
impl<'a> Debug for GetCustomRewardRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetCustomRewardRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetCustomRewardRequest<'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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a> PartialEq<GetCustomRewardRequest<'a>> for GetCustomRewardRequest<'a>
impl<'a> PartialEq<GetCustomRewardRequest<'a>> for GetCustomRewardRequest<'a>
sourcefn eq(&self, other: &GetCustomRewardRequest<'a>) -> bool
fn eq(&self, other: &GetCustomRewardRequest<'a>) -> bool
sourceimpl Request for GetCustomRewardRequest<'_>
impl Request for GetCustomRewardRequest<'_>
type Response = Vec<CustomReward, Global>
type Response = Vec<CustomReward, Global>
Response type. twitch’s response will deserialize to this.
sourceconst PATH: &'static str = "channel_points/custom_rewards"
const PATH: &'static str = "channel_points/custom_rewards"
The path to the endpoint relative to the helix root. eg.
channels
for Get Channel Informationsourceconst SCOPE: &'static [Scope] = _
const SCOPE: &'static [Scope] = _
Available on crate feature
twitch_oauth2
only.Scopes needed by this endpoint
sourceconst OPT_SCOPE: &'static [Scope] = _
const OPT_SCOPE: &'static [Scope] = _
Available on crate feature
twitch_oauth2
only.Optional scopes needed by this endpoint
sourcefn query(&self) -> Result<String, SerializeError>
fn query(&self) -> Result<String, SerializeError>
Defines layout of the url parameters.
sourcefn get_uri(&self) -> Result<Uri, InvalidUri>
fn get_uri(&self) -> Result<Uri, InvalidUri>
Returns full URI for the request, including query parameters.
sourcefn get_bare_uri() -> Result<Uri, InvalidUri>
fn get_bare_uri() -> Result<Uri, InvalidUri>
Returns bare URI for the request, NOT including query parameters.
sourceimpl RequestGet for GetCustomRewardRequest<'_>
impl RequestGet for GetCustomRewardRequest<'_>
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>
Create a
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,
Parse response. Read more
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,
Parse a response string into the response.
sourceimpl<'a> Serialize for GetCustomRewardRequest<'a>
impl<'a> Serialize for GetCustomRewardRequest<'a>
impl<'a> Eq for GetCustomRewardRequest<'a>
impl<'a> StructuralEq for GetCustomRewardRequest<'a>
impl<'a> StructuralPartialEq for GetCustomRewardRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetCustomRewardRequest<'a>
impl<'a> Send for GetCustomRewardRequest<'a>
impl<'a> Sync for GetCustomRewardRequest<'a>
impl<'a> Unpin for GetCustomRewardRequest<'a>
impl<'a> UnwindSafe for GetCustomRewardRequest<'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
Mutably borrows from an owned value. Read more
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
Compare self to
key
and return true
if they are equal.