#[non_exhaustive]pub struct GetPredictionsRequest<'a> {
pub broadcaster_id: Cow<'a, UserIdRef>,
pub id: Collection<'a, PredictionId>,
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: Collection<'a, PredictionId>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§
Source§impl<'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.
Source§impl<'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<Collection<'a, PredictionId>>) -> Self
pub fn ids(self, ids: impl Into<Collection<'a, PredictionId>>) -> Self
IDs of a Predictions.
Trait Implementations§
Source§impl<'a> Clone for GetPredictionsRequest<'a>
impl<'a> Clone for GetPredictionsRequest<'a>
Source§fn clone(&self) -> GetPredictionsRequest<'a>
fn clone(&self) -> GetPredictionsRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for GetPredictionsRequest<'a>
impl<'a> Debug for GetPredictionsRequest<'a>
Source§impl<'de: 'a, 'a> Deserialize<'de> for GetPredictionsRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetPredictionsRequest<'a>
Source§fn 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>,
Source§impl Paginated for GetPredictionsRequest<'_>
impl Paginated for GetPredictionsRequest<'_>
Source§impl<'a> PartialEq for GetPredictionsRequest<'a>
impl<'a> PartialEq for GetPredictionsRequest<'a>
Source§fn eq(&self, other: &GetPredictionsRequest<'a>) -> bool
fn eq(&self, other: &GetPredictionsRequest<'a>) -> bool
self and other values to be equal, and is used by ==.Source§impl Request for GetPredictionsRequest<'_>
impl Request for GetPredictionsRequest<'_>
Source§const PATH: &'static str = "predictions"
const PATH: &'static str = "predictions"
channels for Get Channel InformationSource§const SCOPE: Validator
const SCOPE: Validator
twitch_oauth2 only.Source§type PaginationData = PaginationState<GetPredictionsRequest<'_>>
type PaginationData = PaginationState<GetPredictionsRequest<'_>>
Source§type Response = Vec<Prediction>
type Response = Vec<Prediction>
Source§const OPT_SCOPE: &'static [Scope] = _
const OPT_SCOPE: &'static [Scope] = _
twitch_oauth2 only.Source§fn get_uri(&self) -> Result<Uri, InvalidUri>
fn get_uri(&self) -> Result<Uri, InvalidUri>
Source§fn get_bare_uri() -> Result<Uri, InvalidUri>
fn get_bare_uri() -> Result<Uri, InvalidUri>
Source§impl RequestGet for GetPredictionsRequest<'_>
impl RequestGet for GetPredictionsRequest<'_>
Source§fn 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 client