> For the complete documentation index, see [llms.txt](https://canvacard.srgobi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://canvacard.srgobi.com/classes/fortniteshop.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
