Struct arnak::CollectionQueryParams

source ·
pub struct CollectionQueryParams { /* private fields */ }
Expand description

All optional query parameters for making a request to the collection endpoint.

By default if all status options are excluded then they are all returned. If any are set to true then any excluded will not be returned.

Implementations§

source§

impl CollectionQueryParams

source

pub fn new() -> Self

Constructs a collection query with parameters set to None.

source

pub fn item_type(self, item_type: GameType) -> Self

Sets the item_type field, so that only that type of item will be returned.

source

pub fn exclude_item_type(self, exclude_item_type: GameType) -> Self

Set the exclude_item_type field, so that that type of item will be excluded from. the results.

source

pub fn include_owned(self, include_owned: bool) -> Self

Sets the include_owned field. If true the result will include items that the user owns. Unless all status fields are kept at None, then they are all included.

source

pub fn include_previously_owned(self, include_previously_owned: bool) -> Self

Sets the include_previously_owned field. If true the result will include items that the user owns. Unless all status fields are kept at None, then they are all included.

source

pub fn include_for_trade(self, include_for_trade: bool) -> Self

Sets the include_for_trade field. If true the result will include items that the user wants to trade away. Unless all status fields are kept at None, then they are all included.

source

pub fn include_want_in_trade(self, include_want_in_trade: bool) -> Self

Sets the include_want_in_trade field. If true the result will include items that the user wants to receive in a trade. Unless all status fields are kept at None, then they are all included.

source

pub fn include_want_to_play(self, include_want_to_play: bool) -> Self

Sets the include_want_to_play field. If true the result will include items that the user wants to play. Unless all status fields are kept at None, then they are all included.

source

pub fn include_want_to_buy(self, include_want_to_buy: bool) -> Self

Sets the include_want_to_buy field. If true the result will include items that the user wants to buy. Unless all status fields are kept at None, then they are all included.

source

pub fn include_preordered(self, include_preordered: bool) -> Self

Sets the include_preordered field. If true the result will include items that the user wants to buy. Unless all status fields are kept at None, then they are all included.

source

pub fn include_wishlist(self, include_wishlist: bool) -> Self

Sets the include_wishlist field. If true the result will include the items that the user has on their wishlist. Unless all status fields are kept at None, then they are all included.

source

pub fn wishlist_priority(self, wishlist_priority: WishlistPriority) -> Self

Sets the wishlist_priority field. If set then only results with that wishlist priority will be returned.

source

pub fn modified_since(self, modified_since: NaiveDate) -> Self

Sets the modified_since field. If set then only results that have been modified since that datetime will be returned.

source

pub fn include_stats(self, include_stats: bool) -> Self

Sets the include_stats field. If false the stats are omitted. Since the default behaviour is inconsistent. Keeping this at None will be treated as true at build time.

source

pub fn include_rated_by_user(self, include_rated_by_user: bool) -> Self

Sets the include_rated_by_user field. If set then only results that the user has rated will be returned.

source

pub fn include_played_by_user(self, include_played_by_user: bool) -> Self

Sets the include_played_by_user field. If set then only results that the user has marked as having played will be returned.

source

pub fn include_commented(self, include_commented: bool) -> Self

Sets the include_commented field. If set then only results that the user has commented on will be returned.

source

pub fn has_parts(self, has_parts: bool) -> Self

Sets the has_parts field. If set then only results that the user has commented on the Has Parts field.

source

pub fn want_parts(self, want_parts: bool) -> Self

Sets the want_parts field. If set then only results that the user has commented on the Want Parts field.

source

pub fn min_rating(self, min_rating: f32) -> Self

Sets the min_rating field. If set then only results that the user has rated equal or greater than that value will be returned.

source

pub fn max_rating(self, max_rating: f32) -> Self

Sets the max_rating field. If set then only results that the user has rated equal or less than that value will be returned.

source

pub fn min_bgg_rating(self, min_bgg_rating: f32) -> Self

Sets the min_bgg_rating field. If set then only results that have a “Geek rating” equal or greater than that value will be returned.

source

pub fn max_bgg_rating(self, max_bgg_rating: f32) -> Self

Sets the max_bgg_rating field. If set then only results that have a “Geek rating” equal or less than that value will be returned.

source

pub fn min_plays(self, min_plays: u64) -> Self

Sets the max_plays field. If set then only results that have this many recorded plays by the user or more will be returned.

source

pub fn max_plays(self, max_plays: u64) -> Self

Sets the max_plays field. If set then only results that have this many recorded plays by the user or less will be returned.

source

pub fn show_private(self, show_private: bool) -> Self

Sets the show_private field. If set then private information about the collection will be returned. Only works if the user is logged in and requesting their own collection.

source

pub fn collection_id(self, collection_id: u64) -> Self

Sets the collection_id field. If set then results will be filtered to get the item with the specific collection ID.

Trait Implementations§

source§

impl Clone for CollectionQueryParams

source§

fn clone(&self) -> CollectionQueryParams

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CollectionQueryParams

source§

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

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

impl Default for CollectionQueryParams

source§

fn default() -> CollectionQueryParams

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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, 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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<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