mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
📝 Update api docs
This commit is contained in:
parent
7fd044f804
commit
8b85200aa4
@ -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.">
|
||||
|
Loading…
Reference in New Issue
Block a user