# FortniteShop

### Classes

[FortniteShop](#FortniteShop)

### Functions

[setToken(value)](#setToken) ⇒ [`FortniteShop`](#FortniteShop)

Set the Fortnite API token

[setText(value)](#setText) ⇒ [`FortniteShop`](#FortniteShop)

Set the text for the Fortnite Shop card

[build(\[font\])](#build) ⇒ `Promise.<Buffer>`

Build the Fortnite Shop card

### FortniteShop

**Kind**: global class<br>

#### new FortniteShop()

Fortnite Shop card creator

<details>

<summary>PREVIEW</summary>

\
![Fortnite Shop Card Preview](https://raw.githubusercontent.com/SrGobi/canvacard/refs/heads/test/fortnite_shop.png)

</details>

To obtain a Fortnite API token, visit [fortnite-api.com](https://fortnite-api.com/)

**Example**

```js
const shop = new canvacard.FortniteShop()
  .setToken("f4a26b940ef54a9a4238cef040bd08fa9001cd6c")
  .setText("footer", "ESP CUSTOMS X FORTNITE")

const FortniteShopImage = await shop.build("Luckiest Guy");
canvacard.write(FortniteShopImage, "./fortnite_shop.png");
```

### setToken(value) ⇒ [`FortniteShop`](#FortniteShop)

Set the Fortnite API token

**Kind**: global function\
**Returns**: [`FortniteShop`](#FortniteShop) - The current instance of FortniteShop\
**Throws**:

* `APIError` If the value is not a string

| Param | Type     | Description        |
| ----- | -------- | ------------------ |
| value | `string` | Fortnite API token |

### setText(value) ⇒ [`FortniteShop`](#FortniteShop)

Set the text for the Fortnite Shop card

**Kind**: global function\
**Returns**: [`FortniteShop`](#FortniteShop) - The current instance of FortniteShop\
**Throws**:

* `APIError` If the value is not a string

| Param | Type     | Description              |
| ----- | -------- | ------------------------ |
| value | `string` | Text to set for the card |

### build(\[font]) ⇒ `Promise.<Buffer>`

Build the Fortnite Shop card

**Kind**: global function\
**Returns**: `Promise.<Buffer>` - Card image in buffer format\
**Throws**:

* `APIError` If the token is not provided

| Param   | Type     | Default               | Description              |
| ------- | -------- | --------------------- | ------------------------ |
| \[font] | `string` | `"&quot;Arial&quot;"` | Font to use for the card |
