📄 Initial API docs without svelte components (working)

This commit is contained in:
pheralb
2025-08-29 13:44:14 +01:00
parent 9a9d0440e6
commit 191b1955f4
+1 -32
View File
@@ -3,11 +3,6 @@ title: API Reference
description: The API reference is a detailed documentation of all the endpoints available in the SVGL API. description: The API reference is a detailed documentation of all the endpoints available in the SVGL API.
--- ---
<script>
import Endpoint from '../components/endpoints.svelte';
import Alert from '../ui/alert/alert-component.svelte';
</script>
## Introduction ## Introduction
SVGL API is a RESTFul API that allows you to get all the information of the SVGs that are in the repository. SVGL API is a RESTFul API that allows you to get all the information of the SVGs that are in the repository.
@@ -16,9 +11,7 @@ SVGL API is a RESTFul API that allows you to get all the information of the SVGs
The API is currently open to everyone and does not require any authentication. However, to prevent abusive use of the API, there is a limit to the number of requests. The API is currently open to everyone and does not require any authentication. However, to prevent abusive use of the API, there is a limit to the number of requests.
<Alert type="info"> Don't use the API for create the same product as SVGL. The API is intended to be used for extensions, plugins, or other tools that can help the community.
Don't use the API for create the same product as SVGL. The API is intended to be used for extensions, plugins, or other tools that can help the community.
</Alert>
## Base URL ## Base URL
@@ -64,8 +57,6 @@ export interface iSVG {
## Endpoints ## Endpoints
<Endpoint title="Get all SVGs" method="GET" description="Returns all the SVGs in the repository.">
```bash ```bash
https://api.svgl.app https://api.svgl.app
``` ```
@@ -86,10 +77,6 @@ https://api.svgl.app
] ]
``` ```
</Endpoint>
<Endpoint title="Get a limited number of SVGs" method="GET" description="Returns a limited number of SVGs in the repository. Start from the first SVG.">
```bash ```bash
https://api.svgl.app?limit=10 https://api.svgl.app?limit=10
``` ```
@@ -110,10 +97,6 @@ https://api.svgl.app?limit=10
] ]
``` ```
</Endpoint>
<Endpoint title="Filter SVGs by category" method="GET" description="Returns all the SVGs in the repository that match the category.">
```bash ```bash
https://api.svgl.app/category/software https://api.svgl.app/category/software
``` ```
@@ -136,10 +119,6 @@ https://api.svgl.app/category/software
The list of categories is available [here](https://github.com/pheralb/svgl/blob/main/src/types/categories.ts) (except for the _all_ category). The list of categories is available [here](https://github.com/pheralb/svgl/blob/main/src/types/categories.ts) (except for the _all_ category).
</Endpoint>
<Endpoint title="Get the SVG code for a logo" method="GET" description="Returns the SVG code directly.">
```bash ```bash
https://api.svgl.app/svg/adobe.svg https://api.svgl.app/svg/adobe.svg
``` ```
@@ -171,10 +150,6 @@ https://api.svgl.app/svg/adobe.svg
</svg> </svg>
``` ```
</Endpoint>
<Endpoint title="Get only categories" method="GET" description="Returns only categories with the number of SVGs in each category.">
```bash ```bash
https://api.svgl.app/categories https://api.svgl.app/categories
``` ```
@@ -196,10 +171,6 @@ https://api.svgl.app/categories
] ]
``` ```
</Endpoint>
<Endpoint title="Search SVGs by name" method="GET" description="Returns all the SVGs in the repository that match the name.">
```bash ```bash
https://api.svgl.app?search=axiom https://api.svgl.app?search=axiom
``` ```
@@ -221,5 +192,3 @@ https://api.svgl.app?search=axiom
} }
] ]
``` ```
</Endpoint>