mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-11 09:40:31 +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
|
## Typescript usage
|
||||||
|
|
||||||
- For SVGs:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
export interface svg {
|
|
||||||
id: number;
|
|
||||||
title: string;
|
|
||||||
category: string;
|
|
||||||
route:
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
dark: string;
|
|
||||||
light: string;
|
|
||||||
};
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- For categories:
|
- For categories:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
export interface category {
|
export interface Category {
|
||||||
category: string;
|
category: string;
|
||||||
total: number;
|
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
|
## Endpoints
|
||||||
|
|
||||||
<Endpoint title="Get all SVGs" method="GET" description="Returns all the SVGs in the repository.">
|
<Endpoint title="Get all SVGs" method="GET" description="Returns all the SVGs in the repository.">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user