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

Missing Identifier for Double Face Cards #49

Open
tbreitenfeldt opened this issue Aug 8, 2021 · 0 comments
Open

Missing Identifier for Double Face Cards #49

tbreitenfeldt opened this issue Aug 8, 2021 · 0 comments

Comments

@tbreitenfeldt
Copy link

Hi,

I came back to working on a project that I had set down for quite some time in python, and discovered that my code for handling double face cards was broken. I am using the Python SDK. After debugging the issue, I came to realize that the issue was that the way that double face cards are handled in the API is very different now.
As seen in this simple GET request for getting the card
Thing in The Ice
which has a back side of
Awoken Horror

https://api.magicthegathering.io/v1/cards?name=Thing+in+the+Ice

this response has the name of the back of the card is appended to the end of the name property with a delimiter of //.

Thing in the Ice // Awoken Horror

This is strange behavior, especially since the old behavior that I remember, associated double face cards with one another by using a property called names, which first the name of the front of the card, followed by the names of all other associated cards. I have noticed this behavior in all double face cards and cards which have related cards, AKA. all cards that used to have more than one name in the names property.
This is seen in the docs which have not been changed

https://docs.magicthegathering.io/

names
Only used for split, flip and dual cards. Will contain all the names on this card, front or back

This names property is no longer present. If you examine the response more closely, you can see that the card
Awoken Horror
the transformation of
Thing in the Ice
has the exact same name as
Thing in the Ice.
this makes it impossible to tell the difference between the front of a double face card and the back. Unless I am missing something, a rather fundimental aspect of the API is not working as expected.

Why did such a fundimental change to the API occur without letting users know. It broke my project, and I am sure it broke others. I did some digging on the Mtgio API Discord channel, and found a similar post

https://discord.com/channels/224178957103136779/224179359848726529/824121768822308894

This post outlines the same issue I am having. Also mentioned here is a replacement property for names

I was told that names in mtgjson was changed to otherFaceIds, but there's no mention of that in the docs for mtgio and that's > not being returned by api calls either.

I can confirm that I am not seeing a property called otherFaceIds being returned either.

Is there some new way of determining the difference between the front and back of a card? If so, this should be updated in the docs. Such a fundamental change to a publicly used API should probably be avoided so that such a change doesn't break all the client's code. A fundamental change in the response like this should probably be in a version 2 of the API.
If this is a bug that for some reason has not been addressed yet, can we see about addressing this issue as soon as possible?

Thanks,

Timothy Breitenfeldt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant