Add example to createCard() doc
This commit is contained in:
parent
277884a4e8
commit
5db4cba740
1 changed files with 12 additions and 0 deletions
|
@ -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<Buffer>} A promise representating the construction of the card's image data.
|
||||
*/
|
||||
async createCard(charaId) {
|
||||
|
|
Loading…
Reference in a new issue