From 5db4cba7405651f6046a86be84e607f9cfc0a394 Mon Sep 17 00:00:00 2001 From: karashiiro <49822414+karashiiro@users.noreply.github.com> Date: Fri, 28 May 2021 02:06:50 -0700 Subject: [PATCH] Add example to createCard() doc --- create-card.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/create-card.js b/create-card.js index 14fb5c7..503453c 100644 --- a/create-card.js +++ b/create-card.js @@ -249,6 +249,18 @@ class CardCreator { /** * Creates a character card for a character. * @param {number | string} charaId The Lodestone ID of the character to generate a card for. + * @example + * const fs = require("fs"); + * + * const card = new CardCreator(); + * const lodestoneId = "13821878"; + * + * await card.ensureInit(); + * const png = await card.createCard(lodestoneId); + * + * fs.writeFile("./test.png", png, err => { + * if (err) console.error(err); + * }); * @returns {Promise} A promise representating the construction of the card's image data. */ async createCard(charaId) {