async function drawCards({
deck_id = undefined,
pile = undefined,
location = undefined,
count = undefined,
cards = undefined
} = {}) {
let endpoint_path = (deck_id || "new") + "/";
if (pile) endpoint_path += `pile/${pile}/`;
endpoint_path += "draw/";
if (location) endpoint_path += `${location}/`;
const endpoint = getEndpoint(endpoint_path, { count, cards });
return (await fetch(endpoint)).json();
}