Pokémon TCG SDK - Rust
This is the Pokémon TCG SDK Rust implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.
Usage
Configuration
[]
= "0.3.0"
Using an API Key
// This method fails for the same reasons a reqwest::ClientBuilder would fail (TLS, system config)
// or if your API key contains invalid characters for a header.
let client = with_api_key?;
Cards
Get a single card by ID
let client = default;
let card = client.get_card.await;
match card
Filter cards via the q parameter
let client = default;
let cards = client.search_cards.await;
match cards
// You can also construct a SearchCardsRequest with more parameters
let search_request = SearchCardsRequest
Automatically page through card data
let client = default;
let cards = client.get_all_cards.await;
match cards
Sets
Get a single set by ID
let client = default;
let set = client.get_set.await;
match set
Filter sets via the q parameter
let client = default;
let sets = client.search_sets.await;
match sets
// You can also construct a SearchSetsRequest with more parameters
let search_request = SearchSetsRequest
Automatically page through set data
let client = default;
let sets = client.get_all_sets.await;
match sets
Supertypes
let client = default;
let types = client.get_supertypes.await;
match types
Subtypes
let client = default;
let types = client.get_subtypes.await;
match types
Types
let client = default;
let types = client.get_types.await;
match types
Rarities
let client = default;
let types = client.get_rarities.await;
match types