From 8b85200aa4eb539aef1687012cc6f8607bcae6ec Mon Sep 17 00:00:00 2001 From: pheralb Date: Thu, 25 Jan 2024 15:50:40 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20api=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/docs/api.md | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/docs/api.md b/src/docs/api.md index b63a5d3..028efdb 100644 --- a/src/docs/api.md +++ b/src/docs/api.md @@ -27,32 +27,33 @@ https://svgl.app/api/categories ## Typescript usage -- For SVGs: - -```ts -export interface svg { - id: number; - title: string; - category: string; - route: - | string - | { - dark: string; - light: string; - }; - url: string; -} -``` - - For categories: ```ts -export interface category { +export interface Category { category: string; total: number; } ``` +- For SVGs: + +```ts +type ThemeOptions = { + light: string; + dark: string; +}; + +export interface iSVG { + id: number; + title: string; + category: string | string[]; + route: string | ThemeOptions; + wordmark?: string | ThemeOptions; + url: string; +} +``` + ## Endpoints