GetClipsRequest

Struct GetClipsRequest 

Source
pub struct GetClipsRequest<A>
where A: AuthToken,
{ /* private fields */ }
Expand description

Request builder for the Get Clips endpoint

Implementations§

Source§

impl<A> GetClipsRequest<A>
where A: AuthToken,

Source

pub fn set_auth(&mut self, auth: A) -> &mut Self

Set the authorization token to be used with this request

Source

pub fn set_broadcaster_id<S: Into<BroadcasterId>>(&mut self, id: S) -> &mut Self

Set the broadcaster_id request

Will replace current query type if already called set_game_id or add_clip_id

Source

pub fn set_game_id<S: Into<GameId>>(&mut self, id: S) -> &mut Self

Set the game_id request

Will replace current query type if already called set_broadcaster_id or add_clip_id

Source

pub fn add_clip_id<S: Into<ClipId>>(&mut self, id: S) -> &mut Self

Add a clip_id to search for

Will replace current query type if already called set_broadcaster_id or set_game_id

Source

pub fn set_clip_ids<S>(&mut self, set: Vec<S>) -> &mut Self
where S: Into<ClipId>,

Replace the currect query with a specific set of game_ids

Will replace current query type if already called set_broadcaster_id or set_game_id

Source

pub fn clear_clip_ids(&mut self) -> &mut Self

Clear the current query if it is of the type clip_id

Source

pub fn set_count<C: Into<Count>>(&mut self, count: C) -> &mut Self

Sets the max amount of items to be returned from this request

Without being set this value is 20

Source

pub fn reset_count(&mut self) -> &mut Self

Resets the amount of items to be returned from this request to its default of 20

Source

pub fn set_period<S, T>(&mut self, started_at: S, ended_at: T) -> &mut Self
where S: Into<StartedAt>, T: Into<EndedAt>,

Set a time window filter, times are RFC3339

Source

pub fn set_started_at<S>(&mut self, started_at: S) -> &mut Self
where S: Into<StartedAt>,

Set the start of the date/time window filter, if set_ended_at not called then the window ends a week from this value

Source

pub fn set_ended_at<S: Into<EndedAt>>(&mut self, ended_at: S) -> &mut Self

Set the end of the date/time window filter, if set_started_at not called before this then it does nothing as and end may not be set without a start

Source

pub fn before<P: Into<Pagination>>(&mut self, before: P) -> &mut Self

Set the backwards pagination cursor for this request, use with Pagination from previous response

Source

pub fn after<P: Into<Pagination>>(&mut self, after: P) -> &mut Self

Set the forwards pagination cursor for this request, use with Pagination from previous response

Trait Implementations§

Source§

impl<A> Debug for GetClipsRequest<A>
where A: AuthToken + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A> Request for GetClipsRequest<A>
where A: AuthToken + Sync,

Source§

const ENDPOINT: &'static str = "https://api.twitch.tv/helix/clips"

Endpoint where the request is made
Source§

const METHOD: Method = reqwest::Method::GET

The method that this request will use
Source§

type Headers = A

The type that represents the headers sent with this request
Source§

type Parameters = GetClipsRequest<A>

The type that represents the query parameters sent with this request
Source§

type Body = ()

The type that represents the body of this request
Source§

type Response = GetClipsResponse

The type returned by a sucessful request, must be DeserializeOwned and have at least a static lifetime (owned).
Source§

type ErrorCodes = CommonResponseCodes

The type that encapsulates the error codes that this endpoint can return, must have at least a static lifetime (owned).
Source§

fn builder() -> Self

Get a builder for this method
Source§

fn headers(&self) -> &Self::Headers

Get the Headers struct for this Request Read more
Source§

fn parameters(&self) -> &Self::Parameters

Get the Parameters struct for this Request Read more
Source§

fn body(&self) -> &Self::Body

Get the Body struct for this Request Read more
Source§

fn ready(&self) -> Result<(), RequestError<Self::ErrorCodes>>

Must return Ok(()) if and only if this request is ready to have Self::make_request called on it. Read more
Source§

fn make_request<'life0, 'async_trait, C>( &'life0 self, client: C, ) -> Pin<Box<dyn Future<Output = Result<Self::Response, RequestError<Self::ErrorCodes>>> + Send + 'async_trait>>
where C: Borrow<Client> + Send + 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait,

Make the request represented by this object. Only makes request if Self::ready returns Ok(()).
Source§

impl<A> Serialize for GetClipsRequest<A>
where A: AuthToken,

Source§

fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<A> ParametersExt for GetClipsRequest<A>
where A: AuthToken,

Auto Trait Implementations§

§

impl<A> Freeze for GetClipsRequest<A>
where A: Freeze,

§

impl<A> RefUnwindSafe for GetClipsRequest<A>
where A: RefUnwindSafe,

§

impl<A> Send for GetClipsRequest<A>
where A: Send,

§

impl<A> Sync for GetClipsRequest<A>
where A: Sync,

§

impl<A> Unpin for GetClipsRequest<A>
where A: Unpin,

§

impl<A> UnwindSafe for GetClipsRequest<A>
where A: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Parameters for T
where T: ParametersExt,

Source§

fn write_parameters(&self, req: RequestBuilder) -> RequestBuilder

Write parameters to request builder and return request builder
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,