Created
January 13, 2019 08:40
-
-
Save IamCarbonMan/444ec11b1c19fcd30bd63bc2d0fb1803 to your computer and use it in GitHub Desktop.
use scryfall's API to create your very own Tower of Power
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scryfall = require('scryfall-client') | |
scry = new scryfall() | |
Promise.all([ | |
scry.get('cards/search', {q:'c=w -t:land -o:search usd<0.5 order:edhrec'}).then(res => res.slice(0, 50)), | |
scry.get('cards/search', {q:'c=u -t:land -o:search usd<0.5 order:edhrec'}).then(res => res.slice(0, 50)), | |
scry.get('cards/search', {q:'c=b -t:land -o:search usd<0.5 order:edhrec'}).then(res => res.slice(0, 50)), | |
scry.get('cards/search', {q:'c=r -t:land -o:search usd<0.5 order:edhrec'}).then(res => res.slice(0, 50)), | |
scry.get('cards/search', {q:'c=g -t:land -o:search usd<0.5 order:edhrec'}).then(res => res.slice(0, 50)), | |
scry.get('cards/search', {q:'c=m -t:land -o:search usd<0.5 order:edhrec'}).then(res => res.slice(0, 70)), | |
scry.get('cards/search', {q:'c=c -t:land -o:"{T}: Add" -o:search usd<0.5 order:edhrec'}).then(res => res.slice(0, 30)), | |
]).then(res => console.log([].concat.apply([], res).map(card => card.name).join('\n'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment