[−][src]Struct mtgapi_client::api::card::card_api::AllCardsRequest
Request Object to be used to execute requests to the API
Methods
impl AllCardsRequest
[src]
pub async fn next_page<'_>(
&'_ mut self
) -> Result<ApiResponse<Vec<CardDetail>>, Error>
[src]
&'_ mut self
) -> Result<ApiResponse<Vec<CardDetail>>, Error>
Executes the call to the API. Repeated calls to this method will return the different pages of the cards API
let sdk = MtgClient::new(60); let mut get_cards_request = sdk.cards().all(); let mut cards = Vec::new(); loop { let response = get_cards_request.next_page().await?; if response.content.is_empty() {break} cards.extend(response.content); }
Errors
If this function can't connect to the API or does not manage to read the response, it will return an error.
pub fn order_by(&mut self, field: CardResponseField)
[src]
Sets the ordering of the cards
pub fn set_page(&mut self, page: u32)
[src]
Sets the page for the following API calls
pub fn set_page_size(&mut self, size: u32)
[src]
Sets the page size for the following API calls
Auto Trait Implementations
impl !RefUnwindSafe for AllCardsRequest
impl !Send for AllCardsRequest
impl !Sync for AllCardsRequest
impl Unpin for AllCardsRequest
impl !UnwindSafe for AllCardsRequest
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,