pub async fn search_cards(
        &self,
        request: SearchCardsRequest,
    ) -> Result<Vec<Card>, ClientError> {
        let cards = self
            .http_client
            .get(format!("{}/cards", self.base_url))
            .query(&[
                ("q", request.query),
                ("page", request.page.map(|p| p.to_string())),
                ("pageSize", request.page_size.map(|p| p.to_string())),
                ("orderBy", request.order_by),
            ])
            .send()
            .await?
            .json::<ApiResult<Vec<Card>>>()
            .await?;

        Client::parse_response(cards)
    }
/// Search for one or many cards given a search query.
///
/// https://docs.pokemontcg.io/api-reference/cards/search-cards
Search for one or many cards given a search query.
Search for one or many cards given a search query .
pub async fn search_cards(
        &self,
        request: SearchCardsRequest,
    ) -> Result<Vec<Card>, ClientError> {
        let cards = self
            .http_client
            .get(format!("{}/cards", self.base_url))
            .query(&[
                ("q", request.query),
                ("page", request.page.map(|p| p.to_string())),
                ("pageSize", request.page_size.map(|p| p.to_string())),
                ("orderBy", request.order_by),
            ])
            .send()
            .await?
            .json::<ApiResult<Vec<Card>>>()
            .await?;
        Client::parse_response(cards)
    }
pub async fn search_cards ( & self , request : SearchCardsRequest , ) -> Result < Vec < Card > , ClientError > { let cards = self . http_client . get ( format ! ( " " self base_url ) ) . query ( & [ ( " " , request . query ) , ( " " , request . page . map ( | p | p . to_string ( ) ) ) , ( " " , request . page_size . map ( | p | p . to_string ( ) ) ) , ( " " , request . order_by ) , ] ) . send ( ) . await ? . json :: < ApiResult < Vec < Card > > > ( ) . await ? ; Client :: parse_response ( cards ) }
Search for one or many cards given a search query.
Search for one or many cards given a search query .
&self
request
SearchCardsRequest
&self
request
SearchCardsRequest