Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sealed Product Price List #928

Open
JBeezy-Code opened this issue Apr 1, 2022 · 3 comments
Open

Sealed Product Price List #928

JBeezy-Code opened this issue Apr 1, 2022 · 3 comments
Labels
Enhancement New feature or request v5.2.X Will be addressed in MTGJSON v5.2.X

Comments

@JBeezy-Code
Copy link

Could be beneficial to collect pricing data for sealed products.

SUGGESTION:
Collect SealedProduct pricing data by UUID.
Connect Sealed Product UUID to AllPrices file.

EXAMPLE:

|identifiers| |name| |purchaseUrls| |releaseDate| |uuid|
{'tcgplayerProductId': '202297'} Theros Beyond Death Booster Box Case {'tcgplayer': 'https://mtgjson.com/links/f3e0d... 2020-01-24 489b3869-a6ca-5549-912b-d2b7bb023438

UUID currently not found in AllPrices file since it only collects single card info

@ZeldaZach ZeldaZach added Enhancement New feature or request v5.2.X Will be addressed in MTGJSON v5.2.X labels Jan 27, 2023
@ZeldaZach
Copy link
Member

@axxroytovu Is this something we can potentially pull in? I'd be interested in it

@axxroytovu
Copy link
Contributor

I started looking into it and then stopped having free time.

The low hanging fruit is CardKingdom. The same source we use to get the names and links also exposes the current prices. Someone just needs to do the legwork to load it into the AllPrices builder.

I haven't started looking at TCGPlayer or CardMarket.

@dan-kez
Copy link

dan-kez commented Aug 29, 2023

I'm new to this project but wanted to take a stab at this to see if I could contribute an improvement here.

I started taking a look to see how I might go about implementing this. I was considering to rerun update_sealed_product as it fetches all associated data in the sealed_url to your point.

Does this need to follow the same loading pattern as AllPrices where the script leverages some pre-cached data (AllPrintings.json) to grab associated UUIDs?

Based on my limited understanding of the code base I would likely want to emulate this sealed data fetch pattern but in a new function which follows a similar pattern to generate_today_price_dict and generic_generate_today_price_dict which would return an object which extends MtgjsonSealedProductObject but put pricing meta data.

Possibly something like:

class MtgjsonSealedProductPricesObject(MtgjsonSealedProductObject):
    source: str
    provider: str
    date: str
    currency: str
    buy_normal: Optional[float]
    sell_normal: Optional[float]

Depending on if you want to integrate this into build_prices the call to construct this data could go there or in a new function which could be a separate build argument.

It's also possibly I'm missing a much simpler approach or some other reason to join against the "set.json" entities. From what I gather the UUIDs seem deterministic and leveraging that cached asset wouldn't reduce network calls the API endpoint for sealed pricing contains all other meta data we're interested in (at least for cardkingdom).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request v5.2.X Will be addressed in MTGJSON v5.2.X
Projects
None yet
Development

No branches or pull requests

4 participants