# 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 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://canvacard.srgobi.com/classes/fortniteshop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
