#[non_exhaustive]pub struct GetFollowedStreamsRequest<'a> {
pub user_id: Cow<'a, UserIdRef>,
pub after: Option<Cow<'a, CursorRef>>,
pub before: Option<Cow<'a, CursorRef>>,
pub first: Option<usize>,
}
helix
only.Expand description
Query Parameters for Get Followed Streams
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.user_id: Cow<'a, UserIdRef>
Returns streams broadcast by one or more specified user IDs. You can specify up to 100 IDs.
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>
Maximum number of objects to return. Maximum: 100. Default: 20.
Implementations
sourceimpl<'a> GetFollowedStreamsRequest<'a>
impl<'a> GetFollowedStreamsRequest<'a>
sourcepub fn builder() -> GetFollowedStreamsRequestBuilder<'a, ((), (), (), ())>
pub fn builder() -> GetFollowedStreamsRequestBuilder<'a, ((), (), (), ())>
Create a builder for building GetFollowedStreamsRequest
.
On the builder, call .user_id(...)
, .after(...)
(optional), .before(...)
(optional), .first(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetFollowedStreamsRequest
.
sourceimpl<'a> GetFollowedStreamsRequest<'a>
impl<'a> GetFollowedStreamsRequest<'a>
sourcepub fn user_id(user_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
pub fn user_id(user_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
Get a users followed streams.
Requires token with scope user:read:follows
.
See also HelixClient::get_followed_streams
.
Examples found in repository?
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
pub fn get_followed_streams<T>(
&'a self,
token: &'a T,
) -> std::pin::Pin<
Box<dyn futures::Stream<Item = Result<helix::streams::Stream, ClientError<'a, C>>> + 'a>,
>
where
T: TwitchToken + Send + Sync + ?Sized,
{
use futures::StreamExt;
let user_id = match token
.user_id()
.ok_or_else(|| ClientRequestError::Custom("no user_id found on token".into()))
{
Ok(t) => t,
Err(e) => return futures::stream::once(async { Err(e) }).boxed(),
};
let req = helix::streams::GetFollowedStreamsRequest::user_id(user_id);
make_stream(req, token, self, std::collections::VecDeque::from)
}
Trait Implementations
sourceimpl<'a> Clone for GetFollowedStreamsRequest<'a>
impl<'a> Clone for GetFollowedStreamsRequest<'a>
sourcefn clone(&self) -> GetFollowedStreamsRequest<'a>
fn clone(&self) -> GetFollowedStreamsRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetFollowedStreamsRequest<'a>
impl<'a> Debug for GetFollowedStreamsRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetFollowedStreamsRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetFollowedStreamsRequest<'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 GetFollowedStreamsRequest<'_>
impl Paginated for GetFollowedStreamsRequest<'_>
sourcefn set_pagination(&mut self, cursor: Option<Cursor>)
fn set_pagination(&mut self, cursor: Option<Cursor>)
sourceimpl<'a> PartialEq<GetFollowedStreamsRequest<'a>> for GetFollowedStreamsRequest<'a>
impl<'a> PartialEq<GetFollowedStreamsRequest<'a>> for GetFollowedStreamsRequest<'a>
sourcefn eq(&self, other: &GetFollowedStreamsRequest<'a>) -> bool
fn eq(&self, other: &GetFollowedStreamsRequest<'a>) -> bool
sourceimpl Request for GetFollowedStreamsRequest<'_>
impl Request for GetFollowedStreamsRequest<'_>
sourceconst PATH: &'static str = "streams/followed"
const PATH: &'static str = "streams/followed"
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 GetFollowedStreamsRequest<'_>
impl RequestGet for GetFollowedStreamsRequest<'_>
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 GetFollowedStreamsRequest<'a>
impl<'a> Serialize for GetFollowedStreamsRequest<'a>
impl<'a> Eq for GetFollowedStreamsRequest<'a>
impl<'a> StructuralEq for GetFollowedStreamsRequest<'a>
impl<'a> StructuralPartialEq for GetFollowedStreamsRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetFollowedStreamsRequest<'a>
impl<'a> Send for GetFollowedStreamsRequest<'a>
impl<'a> Sync for GetFollowedStreamsRequest<'a>
impl<'a> Unpin for GetFollowedStreamsRequest<'a>
impl<'a> UnwindSafe for GetFollowedStreamsRequest<'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.