fetch-mkm-card

A node client for fetching Magic: The Gathering card information with the MKM API

Usage no npm install needed!

<script type="module">
  import fetchMkmCard from 'https://cdn.skypack.dev/fetch-mkm-card';
</script>

README

fetch-mkm-card

A node client for fetching Magic: The Gathering card information with the MKM API.

👑 Usage

const { fetchMkmCard } = require("fetch-mkm-card");

fetchMkmCard.init({
  appToken: "XXXXXXXXXXXXXXXX",
  appSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  accessToken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  accessTokenSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
});

const card = fetchMkmCard("Rhox").then((res) => res.json());

🧙‍♂️ Test

Run the test yarn script. Enter your Magic Cardmarket API credentials as a single node process arg, seperated by comma. Order should be: app token, app secret, access token, access token secret

yarn test XXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

📜 License

MIT