Struct twitch_api::helix::videos::GetVideosRequest
source · [−]#[non_exhaustive]pub struct GetVideosRequest<'a> {
pub id: Cow<'a, [&'a VideoIdRef]>,
pub user_id: Option<Cow<'a, UserIdRef>>,
pub game_id: Option<Cow<'a, CategoryIdRef>>,
pub after: Option<Cow<'a, CursorRef>>,
pub before: Option<Cow<'a, CursorRef>>,
pub first: Option<usize>,
pub language: Option<Cow<'a, str>>,
pub period: Option<VideoPeriod>,
pub sort: Option<Sort>,
pub type_: Option<VideoTypeFilter>,
}
helix
only.Expand description
Query Parameters for Get Videos
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.id: Cow<'a, [&'a VideoIdRef]>
ID of the video being queried. Limit: 100. If this is specified, you cannot use any of the optional query parameters below.
user_id: Option<Cow<'a, UserIdRef>>
ID of the user who owns the video.
game_id: Option<Cow<'a, CategoryIdRef>>
ID of the game the video is of.
after: Option<Cow<'a, CursorRef>>
Cursor for forward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
before: Option<Cow<'a, CursorRef>>
Cursor for backward pagination: tells the server where to start fetching the next set of results, in a multi-page response. The cursor value specified here is from the pagination response field of a prior query.
first: Option<usize>
Number of values to be returned when getting videos by user or game ID. Limit: 100. Default: 20.
language: Option<Cow<'a, str>>
Language of the video being queried. Limit: 1.
period: Option<VideoPeriod>
Period during which the video was created. Valid values: “all”, “day”, “week”, “month”. Default: “all”.
sort: Option<Sort>
Sort order of the videos. Valid values: “time”, “trending”, “views”. Default: “time”.
type_: Option<VideoTypeFilter>
Type of video. Valid values: “all”, “upload”, “archive”, “highlight”. Default: “all”.
Implementations
sourceimpl<'a> GetVideosRequest<'a>
impl<'a> GetVideosRequest<'a>
sourcepub fn builder(
) -> GetVideosRequestBuilder<'a, ((), (), (), (), (), (), (), (), (), ())>
pub fn builder(
) -> GetVideosRequestBuilder<'a, ((), (), (), (), (), (), (), (), (), ())>
Create a builder for building GetVideosRequest
.
On the builder, call .id(...)
(optional), .user_id(...)
(optional), .game_id(...)
(optional), .after(...)
(optional), .before(...)
(optional), .first(...)
(optional), .language(...)
(optional), .period(...)
(optional), .sort(...)
(optional), .type_(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetVideosRequest
.
sourceimpl<'a> GetVideosRequest<'a>
impl<'a> GetVideosRequest<'a>
sourcepub fn ids(ids: impl Into<Cow<'a, [&'a VideoIdRef]>>) -> Self
pub fn ids(ids: impl Into<Cow<'a, [&'a VideoIdRef]>>) -> Self
IDs of the videos being queried.
sourcepub fn user_id(user_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
pub fn user_id(user_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
ID of the user who owns the video.
sourcepub fn game_id(game_id: impl IntoCow<'a, CategoryIdRef> + 'a) -> Self
pub fn game_id(game_id: impl IntoCow<'a, CategoryIdRef> + 'a) -> Self
ID of the game the video is of.
Trait Implementations
sourceimpl<'a> Clone for GetVideosRequest<'a>
impl<'a> Clone for GetVideosRequest<'a>
sourcefn clone(&self) -> GetVideosRequest<'a>
fn clone(&self) -> GetVideosRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetVideosRequest<'a>
impl<'a> Debug for GetVideosRequest<'a>
sourceimpl<'a> Default for GetVideosRequest<'a>
impl<'a> Default for GetVideosRequest<'a>
sourcefn default() -> GetVideosRequest<'a>
fn default() -> GetVideosRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetVideosRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetVideosRequest<'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 GetVideosRequest<'_>
impl Paginated for GetVideosRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<GetVideosRequest<'a>> for GetVideosRequest<'a>
impl<'a> PartialEq<GetVideosRequest<'a>> for GetVideosRequest<'a>
sourcefn eq(&self, other: &GetVideosRequest<'a>) -> bool
fn eq(&self, other: &GetVideosRequest<'a>) -> bool
sourceimpl Request for GetVideosRequest<'_>
impl Request for GetVideosRequest<'_>
sourceconst PATH: &'static str = "videos"
const PATH: &'static str = "videos"
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 GetVideosRequest<'_>
impl RequestGet for GetVideosRequest<'_>
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 GetVideosRequest<'a>
impl<'a> Serialize for GetVideosRequest<'a>
impl<'a> Eq for GetVideosRequest<'a>
impl<'a> StructuralEq for GetVideosRequest<'a>
impl<'a> StructuralPartialEq for GetVideosRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetVideosRequest<'a>
impl<'a> Send for GetVideosRequest<'a>
impl<'a> Sync for GetVideosRequest<'a>
impl<'a> Unpin for GetVideosRequest<'a>
impl<'a> UnwindSafe for GetVideosRequest<'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.