📝 Update api docs

This commit is contained in:
pheralb 2024-01-25 15:50:40 +00:00
parent 7fd044f804
commit 8b85200aa4

View File

@ -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
<Endpoint title="Get all SVGs" method="GET" description="Returns all the SVGs in the repository.">