ontehfritz / api.mtgdb.info

Project closing first of August 2015
http://www.mtgdb.info/
MIT License
36 stars 8 forks source link

Complex query without 'color' field #81

Closed alotau closed 10 years ago

alotau commented 10 years ago

Currently, if there is no 'color' field in a complex query, it looks like the api assumes that means "colorless". I think this is not intuitive. For example if a client wants all 'Creature' cards of convertedmanacost of 3 from set '10E', then I think the client would expect all creatures of convertedmanacost 3 from that set, not just the colorless ones.

ontehfritz commented 10 years ago

+1 will look into

ontehfritz commented 10 years ago

http://api.mtgdb.info/search/?q=convertedmanacost%20gt%203

Works!

http://api.mtgdb.info/search/?q=setid%20eq%2010E%20and%20convertedmanacost%20eq%203 Works http://api.mtgdb.info/search/?q=setid%20eq%2010E%20and%20convertedmanacost%20eq%203%20and%20type%20eq%20creature as per your example works!

@alotau give me the test case braw so I can fix it ;)

ontehfritz commented 10 years ago

also setid didn't work so I just fixed it ;)

alotau commented 10 years ago

I see what I did. I was using the "manacost" field instead of the "convertedmanacost" field and I was using "eq" instead of another comparator. In that case, I was coming up with empty results because there were no cards with a manacost exactly 3 that were blue.

Closing.

ontehfritz commented 10 years ago

:+1: