# EmbedStyle model

How a link's preview looks where it's pasted: a built-in style, or an account's own, with its picture, colour, time, author and motion.

## Fields

| Field | Type | Present | Notes |
|---|---|---|---|
| `id` | `integer` |  |  |
| `key` | `enum \| null` |  | A built-in's key; null for your own. One of `hematite`, `minimal`, `detailed`, `gamer`, `photo-mode`, `quiet`. |
| `name` | `string \| null` |  | A built-in's name, or a saved style's; null for your account's own, which has none. |
| `about` | `string \| null` |  | What a built-in shows, in a line; null for your own. |
| `basedOn` | `enum \| null` |  | The built-in your own style starts from, whose words it says; null for a built-in. One of `hematite`, `minimal`, `detailed`, `gamer`, `photo-mode`, `quiet`. |
| `version` | `integer` |  | Counts its saves: 1 when made, one more each time it changes. |
| `author` | `enum` |  | Who the card names over its title, in Discord through oEmbed: `Uploader` (the uploader, or a folder's owner) or `None`. Hiding yourself as an image's uploader, or hiding your page, names nobody whatever the style says. One of `Uploader`, `None`. |
| `picture` | `enum` |  | How the card shows its picture: `Large` under the words, `Small` beside them (square), `Alone` (Discord shows only the picture; elsewhere the large card), `None`. An image marked NSFW or shielded shows none whatever the style says. One of `Large`, `Small`, `Alone`, `None`. |
| `cropToCard` | `boolean` |  | With a large picture: cropped to 1.91 : 1, the shape X, Facebook, LinkedIn and WhatsApp draw, round its busiest part. |
| `colour` | `enum` |  | The colour of Discord's bar, the only platform that shows one: `Hematite` (the accent's ice steel), `Picture` (the picture's own, made light enough to read on Discord's grey) or `Custom` (`colourHex`). One of `Hematite`, `Picture`, `Custom`. |
| `colourHex` | `string \| null` |  | The bar's colour with `Custom`: `#` and six hex digits, lowercase. Kept while another colour is chosen. |
| `showTime` | `boolean` |  | When it was uploaded, under the card in each reader's own time (Discord). |
| `motion` | `boolean` |  | An animated GIF or WebP moves in the card; off, it's its first frame. |
| `title` | `string \| null` |  | Its own title, a template (concept 11 §3); null says the built-in's. Said only on a plan that gives own words. |
| `description` | `string \| null` |  | Its own description, a template; null says the built-in's. |
| `site` | `enum` |  | The site line: `Hematite`, `Domain` (the domain your links go to) or `Custom` (`siteText`). One of `Hematite`, `Domain`, `Custom`. |
| `siteText` | `string \| null` |  | Its own site name, a template; kept while another site line is chosen. |

## Returned by

The endpoints whose `data` holds an EmbedStyle as it is, and where.

- [`GET /users/:userId/embed-styles`](https://hematite.gg/docs/developers/reference/users#get-users-userid-embed-styles), in `data[]`
- [`POST /users/:userId/embed-styles`](https://hematite.gg/docs/developers/reference/users#post-users-userid-embed-styles), in `data`
- [`PATCH /users/:userId/embed-styles/:styleId`](https://hematite.gg/docs/developers/reference/users#patch-users-userid-embed-styles-styleid), in `data`

## Inside other models

- [`UserUploadSettings`](https://hematite.gg/docs/developers/models/user-upload-settings), as `embedStyle`

## Example

```json
{
  "id": 1,
  "key": "hematite",
  "name": "Ranked",
  "about": "string",
  "basedOn": "hematite",
  "version": 0,
  "author": "Uploader",
  "picture": "Large",
  "cropToCard": false,
  "colour": "Hematite",
  "colourHex": "string",
  "showTime": false,
  "motion": false,
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "site": "Hematite",
  "siteText": "string"
}
```
