Struct twitch_api::helix::bits::GetBitsLeaderboardRequest
source · [−]#[non_exhaustive]pub struct GetBitsLeaderboardRequest<'a> {
pub count: Option<i32>,
pub period: Option<Cow<'a, str>>,
pub started_at: Option<Cow<'a, TimestampRef>>,
pub user_id: Option<Cow<'a, UserIdRef>>,
}
helix
only.Expand description
Query Parameters for Get Bits Leaderboard
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.count: Option<i32>
Number of results to be returned. Maximum: 100. Default: 10.
period: Option<Cow<'a, str>>
Time period over which data is aggregated (PST time zone). This parameter interacts with started_at. Valid values follow. Default: “all”.
- “day” – 00:00:00 on the day specified in started_at, through 00:00:00 on the following day.
- “week” – 00:00:00 on Monday of the week specified in started_at, through 00:00:00 on the following Monday.
- “month” – 00:00:00 on the first day of the month specified in started_at, through 00:00:00 on the first day of the following month.
- “year” – 00:00:00 on the first day of the year specified in started_at, through 00:00:00 on the first day of the following year.
- “all” – The lifetime of the broadcaster’s channel. If this is specified (or used by default), started_at is ignored.
started_at: Option<Cow<'a, TimestampRef>>
Timestamp for the period over which the returned data is aggregated. Must be in RFC 3339 format. If this is not provided, data is aggregated over the current period; e.g., the current day/week/month/year. This value is ignored if period is “all”.
user_id: Option<Cow<'a, UserIdRef>>
ID of the user whose results are returned; i.e., the person who paid for the Bits.
Implementations
sourceimpl<'a> GetBitsLeaderboardRequest<'a>
impl<'a> GetBitsLeaderboardRequest<'a>
sourcepub fn builder() -> GetBitsLeaderboardRequestBuilder<'a, ((), (), (), ())>
pub fn builder() -> GetBitsLeaderboardRequestBuilder<'a, ((), (), (), ())>
Create a builder for building GetBitsLeaderboardRequest
.
On the builder, call .count(...)
(optional), .period(...)
(optional), .started_at(...)
(optional), .user_id(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of GetBitsLeaderboardRequest
.
sourceimpl<'a> GetBitsLeaderboardRequest<'a>
impl<'a> GetBitsLeaderboardRequest<'a>
sourcepub fn count(self, count: i32) -> Self
pub fn count(self, count: i32) -> Self
Number of results to be returned. Maximum: 100. Default: 10.
sourcepub fn period(self, period: impl Into<Cow<'a, str>>) -> Self
pub fn period(self, period: impl Into<Cow<'a, str>>) -> Self
Get loaderboard for this period. Valid values: "day"
, "week"
, "month"
, "year"
, "all"
sourcepub fn started_at(self, started_at: impl IntoCow<'a, TimestampRef> + 'a) -> Self
pub fn started_at(self, started_at: impl IntoCow<'a, TimestampRef> + 'a) -> Self
Get leaderboard starting at this timestamp
sourcepub fn user_id(self, user_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
pub fn user_id(self, user_id: impl IntoCow<'a, UserIdRef> + 'a) -> Self
Get leaderboard where this user is included (if they are on the leaderboard)
sourcepub fn new() -> Self
pub fn new() -> Self
Returns an new GetBitsLeaderboardRequest
Trait Implementations
sourceimpl<'a> Clone for GetBitsLeaderboardRequest<'a>
impl<'a> Clone for GetBitsLeaderboardRequest<'a>
sourcefn clone(&self) -> GetBitsLeaderboardRequest<'a>
fn clone(&self) -> GetBitsLeaderboardRequest<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a> Debug for GetBitsLeaderboardRequest<'a>
impl<'a> Debug for GetBitsLeaderboardRequest<'a>
sourceimpl<'a> Default for GetBitsLeaderboardRequest<'a>
impl<'a> Default for GetBitsLeaderboardRequest<'a>
sourcefn default() -> GetBitsLeaderboardRequest<'a>
fn default() -> GetBitsLeaderboardRequest<'a>
sourceimpl<'de: 'a, 'a> Deserialize<'de> for GetBitsLeaderboardRequest<'a>
impl<'de: 'a, 'a> Deserialize<'de> for GetBitsLeaderboardRequest<'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<'a> PartialEq<GetBitsLeaderboardRequest<'a>> for GetBitsLeaderboardRequest<'a>
impl<'a> PartialEq<GetBitsLeaderboardRequest<'a>> for GetBitsLeaderboardRequest<'a>
sourcefn eq(&self, other: &GetBitsLeaderboardRequest<'a>) -> bool
fn eq(&self, other: &GetBitsLeaderboardRequest<'a>) -> bool
sourceimpl Request for GetBitsLeaderboardRequest<'_>
impl Request for GetBitsLeaderboardRequest<'_>
type Response = BitsLeaderboard
type Response = BitsLeaderboard
sourceconst PATH: &'static str = "bits/leaderboard"
const PATH: &'static str = "bits/leaderboard"
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 GetBitsLeaderboardRequest<'_>
impl RequestGet for GetBitsLeaderboardRequest<'_>
sourcefn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response: &str,
status: StatusCode
) -> Result<Response<Self, Self::Response>, HelixRequestGetError>where
Self: Sized,
fn parse_inner_response(
request: Option<Self>,
uri: &Uri,
response: &str,
status: StatusCode
) -> Result<Response<Self, Self::Response>, HelixRequestGetError>where
Self: Sized,
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 clientsourceimpl<'a> Serialize for GetBitsLeaderboardRequest<'a>
impl<'a> Serialize for GetBitsLeaderboardRequest<'a>
impl<'a> Eq for GetBitsLeaderboardRequest<'a>
impl<'a> StructuralEq for GetBitsLeaderboardRequest<'a>
impl<'a> StructuralPartialEq for GetBitsLeaderboardRequest<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for GetBitsLeaderboardRequest<'a>
impl<'a> Send for GetBitsLeaderboardRequest<'a>
impl<'a> Sync for GetBitsLeaderboardRequest<'a>
impl<'a> Unpin for GetBitsLeaderboardRequest<'a>
impl<'a> UnwindSafe for GetBitsLeaderboardRequest<'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.