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

Include an abilities attribute in the card object #38

Open
MichaelJAndy opened this issue May 24, 2019 · 1 comment
Open

Include an abilities attribute in the card object #38

MichaelJAndy opened this issue May 24, 2019 · 1 comment

Comments

@MichaelJAndy
Copy link

Currently if I want to know if a create card has lifelink, or haste for example I need to trawl through the card text attribute, but this is mostly unstructured data.

eg: https://api.magicthegathering.io/v1/cards?name=banehound

{
        "name": "Banehound",
        "manaCost": "{B}",
        "text": "Lifelink, haste"      
}

Please include a more structured card attribute for abilities, this will help working with the API.

{
        "name": "Banehound",
        "manaCost": "{B}",
        "text": "Lifelink, haste",
        "abilities": ["lifelink", "haste"]
}

Bonus points for having an abilities API itself with associated rulings and instructions.

@Reid-E
Copy link

Reid-E commented May 27, 2019

Using the String.split function with '\n' as the delimiter, some form of which is available in almost or actually every language that has an sdk for the api will produce the exact result you're looking for.

I see the merits of something like this, but I don't know if it's worth development priority given that it can be accomplished with a single line of code on the client-side.

Granted, when I implemented the database for my client-side project, I actually implemented this and it had database normalization benefits, and made implementing certain odd search features (like search by number of distinct effects) quite easy.

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

2 participants