Giter Club home page Giter Club logo

Comments (5)

Sembiance avatar Sembiance commented on May 25, 2024

Hello

So the /card/ prefix on mtgimage does not directly map to the 'imageName' field.

The 'imageName' field is only used for the '/set/XXX/imageName.jpg' prefix

The /card/ prefix only has the very latest printing of a card (as there is only 1 card per card name) and thus the extra art cards (which is what the number suffixes are used for) don't make sense in this case.

Does this explanation make sense?

I should probably update the MTGJSON docs to clarify this.

from mtgjson3.

daghack avatar daghack commented on May 25, 2024

Got it - I thought it might be something along these lines.

This makes perfect sense in context of AllSets.json, where the cards are inherently organized by set. That being said, wouldn't it make more sense to modify the field in AllCards.json to reflect the most recent printing of the card?

[AllCards.json] is lighter weight and is meant to provide a quick and easy way to get basic card data.

Given that "basic card data" does not seem to currently contain sets where a card was included, it is currently non-trivial to fetch the card image from the information provided in AllCards.json. As far as I can tell, for any given card, it's not possible to determine which set I'd need to look under with the /set/[set name]/[image name].jpg prefix.

from mtgjson3.

Sembiance avatar Sembiance commented on May 25, 2024

Ahh yes, excellent point about AllCards.json. I will be updating the field in this file so it works with /card/ and I'll update the docs to mention which prefix to use depending on file.

from mtgjson3.

daghack avatar daghack commented on May 25, 2024

Marvelous! 👍

from mtgjson3.

Sembiance avatar Sembiance commented on May 25, 2024

Just updated the site, fixed! Every imageName field for all cards in AllCards.json correctly works with the /card/ prefix now. Also updated the docs. Thanks :)

from mtgjson3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.