Skip to main content

Crate tcglookup

Crate tcglookup 

Source
Expand description

§tcglookup

The official Rust SDK for the TCG Price Lookup API.

Live trading card prices across Pokemon, Magic: The Gathering, Yu-Gi-Oh!, Disney Lorcana, One Piece TCG, Star Wars: Unlimited, and Flesh and Blood.

Get a free API key at https://tcgpricelookup.com/tcg-api

§Quickstart

use tcglookup::{Client, CardSearchParams};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new("tlk_live_...");

    let results = client
        .cards()
        .search(CardSearchParams {
            q: Some("charizard".into()),
            game: Some("pokemon".into()),
            limit: Some(5),
            ..Default::default()
        })
        .await?;

    for card in results.data {
        println!("{} — {}", card.name, card.set.name);
    }
    Ok(())
}

Structs§

Card
A single trading card with its current prices.
CardGameRef
Embedded game reference on a card.
CardPrices
Raw and graded prices for a card.
CardSearchParams
Parameters for CardsResource::search.
CardSearchResponse
Paginated card search response.
CardSetRef
Embedded set reference on a card.
CardsResource
Cards endpoint group.
Client
Async client for the TCG Price Lookup REST API.
ClientBuilder
Builder for Client with custom configuration.
EbayAverages
Rolling-window averages from eBay sold listings.
GameListParams
Parameters for GamesResource::list.
GameListResponse
Paginated game list response.
GameSummary
One row in the games list.
GamesResource
Games endpoint group.
GradedGradePrices
Per-source price block for a single grade.
HistoryDay
One day of price observations.
HistoryParams
Parameters for CardsResource::history.
HistoryPriceRow
One observation within a day.
HistoryResponse
Daily price history.
RateLimitInfo
Rate-limit window state captured from the most recent response.
RawConditionPrices
Source-keyed prices for one raw condition.
SetListParams
Parameters for SetsResource::list.
SetListResponse
Paginated set list response.
SetSummary
One row in the sets list.
SetsResource
Sets endpoint group.
TcgPlayerPrices
Standard TCGPlayer market / low / mid / high points.

Enums§

Error
All errors the SDK can return.

Type Aliases§

Result
SDK result alias.