scryfall-rs icon indicating copy to clipboard operation
scryfall-rs copied to clipboard

Missing field `image_status`

Open xremming opened this issue 1 year ago • 6 comments

Awesome project, has already saved a lot of my time.

While using the library I noticed that the image_status field is missing from the card data.

image_status String A computer-readable indicator for the state of this card’s image, one of missing, placeholder, lowres, or highres_scan.

Somewhat relatedly I noticed that the CardFace.image_uris object uses a HashMap instead of the purpose built ImageUris struct.

xremming avatar May 24 '24 18:05 xremming

Hmmm this gave me an idea of a change I can make in order for CI to catch these kinds of missing fields 🤔

mendess avatar May 24 '24 18:05 mendess

Are you going to add the missing field? I noticed you forked

mendess avatar May 24 '24 18:05 mendess

Somewhat relatedly I noticed that the CardFace.image_uris object uses a HashMap instead of the purpose built ImageUris struct.

Either there was something stopping me from reusing the type or I just forgot about it 😅

mendess avatar May 24 '24 18:05 mendess

I can make a PR to add the missing field and fix the CardFace.image_uris type. Interested in seeing a CI solution to catch missing fields 👀, I have some ideas related to that too (it's not my first rodeo with the Scryfall API).

xremming avatar May 24 '24 18:05 xremming

I'm going to conditionally compile the types in tests to have the "deny_missing_fields" attribute. I already have a ci run that runs every month to check that I can still fetch every card in scryfall

mendess avatar May 24 '24 19:05 mendess

Created the PR (#44) and a continuation that changes a little how the SearchOptions struct works with an additional example (#45).

xremming avatar May 24 '24 20:05 xremming