Struct mtgapi_client::api::card::card_api::AllCardsRequest [−][src]
pub struct AllCardsRequest { /* fields omitted */ }Request Object to be used to execute requests to the API
Methods
impl AllCardsRequest[src]
impl AllCardsRequestpub fn next_page(&mut self) -> Result<ApiResponse<Vec<CardDetail>>, Error>[src]
pub fn next_page(&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()?; 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]
pub fn order_by(&mut self, field: CardResponseField)Sets the ordering of the cards
pub fn set_page(&mut self, page: u32)[src]
pub fn set_page(&mut self, page: u32)Sets the page for the following API calls
pub fn set_page_size(&mut self, size: u32)[src]
pub fn set_page_size(&mut self, size: u32)Sets the page size for the following API calls
Auto Trait Implementations
impl Send for AllCardsRequest
impl Send for AllCardsRequestimpl Sync for AllCardsRequest
impl Sync for AllCardsRequest