1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00
server/README.md

41 lines
1.0 KiB
Markdown
Raw Normal View History

2020-12-30 23:18:05 +01:00
# Discord-CDN
2020-12-30 14:21:52 +01:00
cdn for discord clone
2020-12-30 23:07:11 +01:00
## Endpoints:
2020-12-30 23:14:04 +01:00
### `/external`
2020-12-30 23:07:11 +01:00
#### POST
```
Content-Type: application/json
body:
{"url": URL} // "https://discord.com"
```
##### Returns:
Content-Type: application/json
```ts
{
"id": string, // "aHR0cHM6Ly9kaXNjb3JkLmNvbQ=="
"ogTitle": string, // "Discord | Your Place to Talk and Hang Out"
"ogDescription": string, // "Discord is the easiest way to talk over voice, video, and text. Talk, chat, hang out, and stay close with your friends and communities."
"cachedImage": string, // "/external/aHR0cHM6Ly9kaXNjb3JkLmNvbQ==/discord.png"
"ogUrl": string, // "https://discord.com/"
"ogType": string // "website"
}
```
2020-12-30 23:14:04 +01:00
### `/external/<id>/<filename>`
2020-12-30 23:07:11 +01:00
#### GET
2020-12-30 23:14:04 +01:00
```
url-params:
:id // aHR0cHM6Ly9kaXNjb3JkLmNvbQ==
:filename // discord.png
2020-12-30 23:17:45 +01:00
```
```
2020-12-30 23:14:04 +01:00
/external/aHR0cHM6Ly9kaXNjb3JkLmNvbQ==/discord.png
```
##### Returns:
```
Content-Type: image/<imageType(png,img,gif)>
Image
```