Struct twitch_api::helix::clips::get_clips::GetClipsRequest
source · [−]#[non_exhaustive]pub struct GetClipsRequest<'a> {
pub broadcaster_id: Option<Cow<'a, UserIdRef>>,
pub game_id: Option<Cow<'a, CategoryIdRef>>,
pub id: Cow<'a, [&'a ClipIdRef]>,
pub after: Option<Cow<'a, CursorRef>>,
pub before: Option<Cow<'a, CursorRef>>,
pub ended_at: Option<Cow<'a, TimestampRef>>,
pub first: Option<usize>,
pub started_at: Option<Cow<'a, TimestampRef>>,
}
helix
only.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: Option<Cow<'a, UserIdRef>>
ID of the broadcaster for whom clips are returned. The number of clips returned is determined by the first query-string parameter (default: 20). Results are ordered by view count.
game_id: Option<Cow<'a, CategoryIdRef>>
ID of the game for which clips are returned. The number of clips returned is determined by the first query-string parameter (default: 20). Results are ordered by view count.
id: Cow<'a, [&'a ClipIdRef]>
ID of the clip being queried. Limit: 100.
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. This applies only to queries specifying broadcaster_id or game_id. 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. This applies only to queries specifying broadcaster_id or game_id. The cursor value specified here is from the pagination response field of a prior query.
ended_at: Option<Cow<'a, TimestampRef>>
Ending date/time for returned clips, in RFC3339 format. (Note that the seconds value is ignored.) If this is specified, started_at also must be specified; otherwise, the time period is ignored.
first: Option<usize>
Maximum number of objects to return. Maximum: 100. Default: 20.
started_at: Option<Cow<'a, TimestampRef>>
Starting date/time for returned clips, in RFC3339 format. (Note that the seconds value is ignored.) If this is specified, ended_at also should be specified; otherwise, the ended_at date/time will be 1 week after the started_at value.
Implementations
sourceimpl<'a> GetClipsRequest<'a>
impl<'a> GetClipsRequest<'a>
sourcepub fn builder() -> GetClipsRequestBuilder<'a, ((), (), (), (), (), (), (), ())>
pub fn builder() -> GetClipsRequestBuilder<'a, ((), (), (), (), (), (), (), ())>
Create a builder for building GetClipsRequest
.
On the builder, call .broadcaster_id(...)
(optional), .game_id(...)
(optional), .id(...)
(optional), .after(...)
(optional), .before(...)
(optional), .ended_at(...)
(optional), .first(...)
(optional), .started_at(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetClipsRequest
.
sourceimpl<'a> GetClipsRequest<'a>
impl<'a> GetClipsRequest<'a>
sourcepub fn empty() -> Self
pub fn empty() -> Self
Examples found in repository?
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
pub fn broadcaster_id(broadcaster_id: impl types::IntoCow<'a, types::UserIdRef> + 'a) -> Self {
Self {
broadcaster_id: Some(broadcaster_id.to_cow()),
..Self::empty()
}
}
/// Game for which clips are returned.
pub fn game_id(game_id: impl types::IntoCow<'a, types::CategoryIdRef> + 'a) -> Self {
Self {
game_id: Some(game_id.to_cow()),
..Self::empty()
}
}
/// IDs of clips being queried
pub fn clip_ids(clip_ids: impl Into<Cow<'a, [&'a types::ClipIdRef]>>) -> Self {
Self {
id: clip_ids.into(),
..Self::empty()
}
}
sourcepub fn broadcaster_id(broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
pub fn broadcaster_id(broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
Broadcaster for whom clips are returned.
sourcepub fn game_id(game_id: impl IntoCow<'a, CategoryIdRef> + 'a) -> Self
pub fn game_id(game_id: impl IntoCow<'a, CategoryIdRef> + 'a) -> Self
Game for which clips are returned.
sourcepub fn clip_ids(clip_ids: impl Into<Cow<'a, [&'a ClipIdRef]>>) -> Self
pub fn clip_ids(clip_ids: impl Into<Cow<'a, [&'a ClipIdRef]>>) -> Self
IDs of clips being queried
sourcepub fn started_at(
&mut self,
started_at: impl IntoCow<'a, TimestampRef> + 'a
) -> &mut Self
pub fn started_at(
&mut self,
started_at: impl IntoCow<'a, TimestampRef> + 'a
) -> &mut Self
Ending date/time for the returned clips
sourcepub fn ended_at(
&mut self,
ended_at: impl IntoCow<'a, TimestampRef> + 'a
) -> &mut Self
pub fn ended_at(
&mut self,
ended_at: impl IntoCow<'a, TimestampRef> + 'a
) -> &mut Self
Ending date/time for the returned clips
Trait Implementations
sourceimpl<'a> Clone for GetClipsRequest<'a>
impl<'a> Clone for GetClipsRequest<'a>
sourcefn clone(&self) -> GetClipsRequest<'a>
fn clone(&self) -> GetClipsRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetClipsRequest<'a>
impl<'a> Debug for GetClipsRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetClipsRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetClipsRequest<'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 GetClipsRequest<'_>
impl Paginated for GetClipsRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<GetClipsRequest<'a>> for GetClipsRequest<'a>
impl<'a> PartialEq<GetClipsRequest<'a>> for GetClipsRequest<'a>
sourcefn eq(&self, other: &GetClipsRequest<'a>) -> bool
fn eq(&self, other: &GetClipsRequest<'a>) -> bool
sourceimpl Request for GetClipsRequest<'_>
impl Request for GetClipsRequest<'_>
sourceconst PATH: &'static str = "clips"
const PATH: &'static str = "clips"
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 GetClipsRequest<'_>
impl RequestGet for GetClipsRequest<'_>
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 GetClipsRequest<'a>
impl<'a> Serialize for GetClipsRequest<'a>
impl<'a> Eq for GetClipsRequest<'a>
impl<'a> StructuralEq for GetClipsRequest<'a>
impl<'a> StructuralPartialEq for GetClipsRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetClipsRequest<'a>
impl<'a> Send for GetClipsRequest<'a>
impl<'a> Sync for GetClipsRequest<'a>
impl<'a> Unpin for GetClipsRequest<'a>
impl<'a> UnwindSafe for GetClipsRequest<'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.