AlanOC91 / YGOPRODeck

Yu-Gi-Oh! Card Database and Deck Share Site
79 stars 4 forks source link

Increase specificity on monster types #462

Open wcossio123 opened 1 year ago

wcossio123 commented 1 year ago

Hi! Thanks for all the amazing work put into this API. I'm trying to build a search engine using this API, and it would be immensely helpful if the monster typings were 1to1 with what's on the actual card, especially for extra deck monsters. For instance, based on the current Monster types, certain queries aren't feasible. For example, if I want to query for only XYZ monsters with no effects, I'm currently unable to do that. It would be helpful if there were more exact typings, like XYZ Effect Monster and XYZ Monster (example would be Gem Knight Pearl).

wcossio123 commented 1 year ago

A way to accommodate this might be to include a separate structure for the monster type line to identify monster card supertypes. This would be useful when performing our own in-house queries on the ygo pro api data. maybe something like:

{
  …
  “superTypes”: [“XYZ”, “Effect”],
  …
}
AlanOC91 commented 1 year ago

We do have a has_effect parameter which essentially covers this but to be honest we probably need to do some manual checks on the last ~300 or so cards to ensure this parameter is correct.

https://db.ygoprodeck.com/api/v7/cardinfo.php?type=XYZ%20Monster&has_effect=0

wcossio123 commented 1 year ago

Oh nice! That's useful. Is that something that could be exposed as a property on the response? If not, I think I can make this parameter meet my needs :)