Comments (3)
Hmmm good question. I read the documentation and the pipe character is the correct way to specify an "or" operation. The error you are seeing is coming directly from the API, even when the pipe is URI encoded:
https://api.magicthegathering.io/v1/cards?set=VOW&cmc=2%7C3
I would suggest reaching to someone on the Discord server. If you can find an API url that works, I can make sure it is supported by the Javascript SDK.
from mtg-sdk-javascript.
The only thing I can figure out is that cmc is designated as a number in the MTG.io docs, which means the API would reject an OR string. I can work around it by filtering by cmc in the UI, but I don't like loading the extra data and then filtering so much of it out if you want to fetch 1-drop Crimson Vow cards.
from mtg-sdk-javascript.
I think that's a good hypothesis. String fields work fine:
https://api.magicthegathering.io/v1/cards?name=Virtuous|Vicious
from mtg-sdk-javascript.
Related Issues (15)
- Can't search for cards by mana cost HOT 4
- Return more than 100 results? HOT 1
- Issue in react-native app HOT 2
- use of sdk ambiguous in documentation
- Error on load mtgsdk HOT 1
- Add ES6 module support HOT 3
- Add support for supertypes, subtypes and types HOT 1
- How to Contribute? HOT 6
- mtg.card.where overwrites the page property with 0 HOT 1
- Search query for card names with "Aether" always return an empty result. HOT 4
- TransformError: Couldn't find preset "es2015" HOT 4
- broken test on master branch: card > find > returns card HOT 1
- Helper function for getting a card's static abilities HOT 3
- Babel doesn't seem to play well with Angular HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtg-sdk-javascript.