function randomCard(format = "json", cb) {
    const ret = (cb) => {
        APIRequest("/cards/random", (resp) => {
            cb(resp);
        });
    };
    if (cb) {
        ret(cb);
    }
    else {
        return new Promise((resolve, reject) => ret(resolve));
    }
}
/**
 * Fetches a random card.
 * @param format The format to retrieve this card as. Defaults to json.
 * @param cb An optional callback to pass card data to.
 * @returns A promise, if no callback is specified. Otherwise nothing.
 */
Fetches a random card.
@param format The format to retrieve this card as. Defaults to json.
@param cb An optional callback to pass card data to.
@returns A promise, if no callback is specified. Otherwise nothing.
Fetches a random card . @param format The format to retrieve this card as . Defaults to json . @param cb An optional callback to pass card data to . @returns A promise if no callback is specified . Otherwise nothing .
function randomCard(format = "json", cb) {
    const ret = (cb) => {
        APIRequest("/cards/random", (resp) => {
            cb(resp);
        });
    };
    if (cb) {
        ret(cb);
    }
    else {
        return new Promise((resolve, reject) => ret(resolve));
    }
}
function randomCard ( format = "json" , cb ) { const ret = ( cb ) => { APIRequest ( "/cards/random" , ( resp ) => { cb ( resp ) ; } ) ; } ; if ( cb ) { ret ( cb ) ; } else { return new Promise ( ( resolve , reject ) => ret ( resolve ) ) ; } }
Fetches a random card.
Fetches a random card .