Last active
October 13, 2016 18:01
-
-
Save lsmoura/960aadd29040a15023bfb0f078ff6878 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var downloadCard = function(card, callback) { | |
var downloaded = null; | |
tiptoe( | |
function() { | |
cardGrab.downloadFiles(card.multiverseid, this); | |
}, | |
function(data) { | |
downloaded = data; | |
parser.oracle(card.multiverseid, data.oracle, this.parallel()); | |
parser.printed(card.multiverseid, data.printed, this.parallel()); | |
}, | |
function(oracleData, printedData) { | |
Object.keys(oracleData).forEach(function(key) { | |
card[key] = oracleData[key]; | |
}); | |
Object.keys(printedData).forEach(function(key) { | |
card[key] = printedData[key]; | |
}); | |
this(); | |
}, | |
function(err) { | |
callback(err, card); | |
} | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment