Struct twitch_api::helix::predictions::GetPredictionsRequest
source · [−]#[non_exhaustive]pub struct GetPredictionsRequest<'a> {
pub broadcaster_id: Cow<'a, UserIdRef>,
pub id: Cow<'a, [&'a PredictionIdRef]>,
pub after: Option<Cow<'a, CursorRef>>,
pub first: Option<usize>,
}
helix
only.Expand description
Query Parameters for Get predictions
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 broadcaster running Predictions. Provided broadcaster_id must match the user_id in the user OAuth token.
id: Cow<'a, [&'a PredictionIdRef]>
ID of a Prediction. Filters results to one or more specific Predictions. Not providing one or more IDs will return the full list of Predictions for the authenticated channel.
Maximum: 100
after: Option<Cow<'a, CursorRef>>
Cursor for forward pagination
first: Option<usize>
Maximum number of objects to return. Maximum: 20. Default: 20.
Implementations
sourceimpl<'a> GetPredictionsRequest<'a>
impl<'a> GetPredictionsRequest<'a>
sourcepub fn builder() -> GetPredictionsRequestBuilder<'a, ((), (), (), ())>
pub fn builder() -> GetPredictionsRequestBuilder<'a, ((), (), (), ())>
Create a builder for building GetPredictionsRequest
.
On the builder, call .broadcaster_id(...)
, .id(...)
(optional), .after(...)
(optional), .first(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetPredictionsRequest
.
sourceimpl<'a> GetPredictionsRequest<'a>
impl<'a> GetPredictionsRequest<'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 information about predictions for this broadcasters channel.
sourcepub fn ids(self, ids: impl Into<Cow<'a, [&'a PredictionIdRef]>>) -> Self
pub fn ids(self, ids: impl Into<Cow<'a, [&'a PredictionIdRef]>>) -> Self
IDs of a Predictions.
Trait Implementations
sourceimpl<'a> Clone for GetPredictionsRequest<'a>
impl<'a> Clone for GetPredictionsRequest<'a>
sourcefn clone(&self) -> GetPredictionsRequest<'a>
fn clone(&self) -> GetPredictionsRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetPredictionsRequest<'a>
impl<'a> Debug for GetPredictionsRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetPredictionsRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetPredictionsRequest<'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 GetPredictionsRequest<'_>
impl Paginated for GetPredictionsRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<GetPredictionsRequest<'a>> for GetPredictionsRequest<'a>
impl<'a> PartialEq<GetPredictionsRequest<'a>> for GetPredictionsRequest<'a>
sourcefn eq(&self, other: &GetPredictionsRequest<'a>) -> bool
fn eq(&self, other: &GetPredictionsRequest<'a>) -> bool
sourceimpl Request for GetPredictionsRequest<'_>
impl Request for GetPredictionsRequest<'_>
type Response = Vec<Prediction, Global>
type Response = Vec<Prediction, Global>
sourceconst PATH: &'static str = "predictions"
const PATH: &'static str = "predictions"
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 GetPredictionsRequest<'_>
impl RequestGet for GetPredictionsRequest<'_>
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 GetPredictionsRequest<'a>
impl<'a> Serialize for GetPredictionsRequest<'a>
impl<'a> Eq for GetPredictionsRequest<'a>
impl<'a> StructuralEq for GetPredictionsRequest<'a>
impl<'a> StructuralPartialEq for GetPredictionsRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetPredictionsRequest<'a>
impl<'a> Send for GetPredictionsRequest<'a>
impl<'a> Sync for GetPredictionsRequest<'a>
impl<'a> Unpin for GetPredictionsRequest<'a>
impl<'a> UnwindSafe for GetPredictionsRequest<'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.