Struct twitch_api::helix::schedule::GetChannelStreamScheduleRequest
source · [−]#[non_exhaustive]pub struct GetChannelStreamScheduleRequest<'a> {
pub broadcaster_id: Cow<'a, UserIdRef>,
pub id: Option<Cow<'a, StreamSegmentIdRef>>,
pub start_time: Option<Cow<'a, TimestampRef>>,
pub utc_offset: Option<Cow<'a, str>>,
pub after: Option<Cow<'a, CursorRef>>,
pub first: Option<usize>,
}
helix
only.Expand description
Query Parameters for Get Channel Stream Schedule
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>
User ID of the broadcaster who owns the channel streaming schedule. Provided broadcaster_id must match the user_id in the user OAuth token.
id: Option<Cow<'a, StreamSegmentIdRef>>
The ID of the stream segment to return. Maximum: 100.
start_time: Option<Cow<'a, TimestampRef>>
A timestamp in RFC3339 format to start returning stream segments from. If not specified, the current date and time is used.
utc_offset: Option<Cow<'a, str>>
A timezone offset for the requester specified in minutes. This is recommended to ensure stream segments are returned for the correct week. For example, a timezone that is +4 hours from GMT would be “240.” If not specified, “0” is used for GMT.
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.
first: Option<usize>
Maximum number of stream segments to return. Maximum: 25. Default: 20.
Implementations
sourceimpl<'a> GetChannelStreamScheduleRequest<'a>
impl<'a> GetChannelStreamScheduleRequest<'a>
sourcepub fn builder(
) -> GetChannelStreamScheduleRequestBuilder<'a, ((), (), (), (), (), ())>
pub fn builder(
) -> GetChannelStreamScheduleRequestBuilder<'a, ((), (), (), (), (), ())>
Create a builder for building GetChannelStreamScheduleRequest
.
On the builder, call .broadcaster_id(...)
, .id(...)
(optional), .start_time(...)
(optional), .utc_offset(...)
(optional), .after(...)
(optional), .first(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetChannelStreamScheduleRequest
.
sourceimpl<'a> GetChannelStreamScheduleRequest<'a>
impl<'a> GetChannelStreamScheduleRequest<'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 a broadcasters schedule
Examples found in repository?
560 561 562 563 564 565 566 567 568 569 570 571 572 573
pub fn get_channel_schedule<'b: 'a, T>(
&'a self,
broadcaster_id: impl types::IntoCow<'b, types::UserIdRef> + 'b,
token: &'a T,
) -> std::pin::Pin<
Box<dyn futures::Stream<Item = Result<helix::schedule::Segment, ClientError<'a, C>>> + 'a>,
>
where
T: TwitchToken + Send + Sync + ?Sized,
{
let req = helix::schedule::GetChannelStreamScheduleRequest::broadcaster_id(broadcaster_id);
make_stream(req, token, self, |broadcasts| broadcasts.segments.into())
}
sourcepub fn id(self, id: impl IntoCow<'a, StreamSegmentIdRef> + 'a) -> Self
pub fn id(self, id: impl IntoCow<'a, StreamSegmentIdRef> + 'a) -> Self
Set the id for the request.
sourcepub fn start_time(self, start_time: impl IntoCow<'a, TimestampRef> + 'a) -> Self
pub fn start_time(self, start_time: impl IntoCow<'a, TimestampRef> + 'a) -> Self
Set the start_time for the request.
sourcepub fn utc_offset(self, utc_offset: impl Into<Cow<'a, str>>) -> Self
pub fn utc_offset(self, utc_offset: impl Into<Cow<'a, str>>) -> Self
Set the utc_offset for the request.
Trait Implementations
sourceimpl<'a> Clone for GetChannelStreamScheduleRequest<'a>
impl<'a> Clone for GetChannelStreamScheduleRequest<'a>
sourcefn clone(&self) -> GetChannelStreamScheduleRequest<'a>
fn clone(&self) -> GetChannelStreamScheduleRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetChannelStreamScheduleRequest<'a>
impl<'a> Debug for GetChannelStreamScheduleRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetChannelStreamScheduleRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetChannelStreamScheduleRequest<'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 GetChannelStreamScheduleRequest<'_>
impl Paginated for GetChannelStreamScheduleRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<GetChannelStreamScheduleRequest<'a>> for GetChannelStreamScheduleRequest<'a>
impl<'a> PartialEq<GetChannelStreamScheduleRequest<'a>> for GetChannelStreamScheduleRequest<'a>
sourcefn eq(&self, other: &GetChannelStreamScheduleRequest<'a>) -> bool
fn eq(&self, other: &GetChannelStreamScheduleRequest<'a>) -> bool
sourceimpl Request for GetChannelStreamScheduleRequest<'_>
impl Request for GetChannelStreamScheduleRequest<'_>
type Response = ScheduledBroadcasts
type Response = ScheduledBroadcasts
sourceconst PATH: &'static str = "schedule"
const PATH: &'static str = "schedule"
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 GetChannelStreamScheduleRequest<'_>
impl RequestGet for GetChannelStreamScheduleRequest<'_>
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 GetChannelStreamScheduleRequest<'a>
impl<'a> Serialize for GetChannelStreamScheduleRequest<'a>
impl<'a> Eq for GetChannelStreamScheduleRequest<'a>
impl<'a> StructuralEq for GetChannelStreamScheduleRequest<'a>
impl<'a> StructuralPartialEq for GetChannelStreamScheduleRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetChannelStreamScheduleRequest<'a>
impl<'a> Send for GetChannelStreamScheduleRequest<'a>
impl<'a> Sync for GetChannelStreamScheduleRequest<'a>
impl<'a> Unpin for GetChannelStreamScheduleRequest<'a>
impl<'a> UnwindSafe for GetChannelStreamScheduleRequest<'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.