0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2024-12-22 05:02:58 -05:00

Update readme

This commit is contained in:
dragongoose 2023-07-03 15:28:44 -04:00
parent 12116d7c9b
commit 45f77b7a3b
No known key found for this signature in database
GPG key ID: 50DB99B921579009

View file

@ -12,7 +12,7 @@ Every endpoint can return a 500 status code, and it follows this schema:
```json ```json
{ {
status: "error", status: "error",
message: "Error message..." data: "Error message..."
} }
``` ```
@ -25,7 +25,7 @@ Gets a specific twitch streamer
###### 200 ###### 200
The request was successful, returns data of type [StreamerData](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/types/scraping/Streamer.ts) The request was successful, returns data of type [Streamer](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/extractor/structs/parsed.go)
*Example:* *Example:*
```json ```json
@ -35,6 +35,7 @@ The request was successful, returns data of type [StreamerData](https://codeberg
"username": "filian", "username": "filian",
"about": "Welcome to my Vtuber alpha! 3D streaming and variety games! Join the discord! n_n", "about": "Welcome to my Vtuber alpha! 3D streaming and variety games! Join the discord! n_n",
"pfp": "https://safetwitch.dragongoose.us/proxy/img/aHR0cHM6Ly9zdGF0aWMtY2RuLmp0dm53Lm5ldC9qdHZfdXNlcl9waWN0dXJlcy9mNzVkNDEwMy1hMjY1LTRlMjEtODhiNS00NDc0NWZjMWJmNDQtcHJvZmlsZV9pbWFnZS0zMDB4MzAwLnBuZw", "pfp": "https://safetwitch.dragongoose.us/proxy/img/aHR0cHM6Ly9zdGF0aWMtY2RuLmp0dm53Lm5ldC9qdHZfdXNlcl9waWN0dXJlcy9mNzVkNDEwMy1hMjY1LTRlMjEtODhiNS00NDc0NWZjMWJmNDQtcHJvZmlsZV9pbWFnZS0zMDB4MzAwLnBuZw",
"banner": "https://safetwitch.dragongoose.us/proxy/img/aHR0cHM6Ly9zdGF0aWMtY2RuLmp0dm53Lm5ldC9qdHZfdXNlcl9waWN0dXJlcy9kMjY2OTZlMC1hYjJhLTRlZjEtYTI3Ni0wZmZjZWM5NmM3NzYtcHJvZmlsZV9iYW5uZXItNDgwLnBuZw==",
"followers": 579463, "followers": 579463,
"socials": [ "socials": [
{ {
@ -70,7 +71,7 @@ Gets the discover page of twitch, a list of categories
##### 200 ##### 200
The request was successful, returns a [Category[]](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/types/scraping/Category.ts) The request was successful, returns a [CategoryData[]](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/extractor/structs/parsed.go)
*Example:* *Example:*
```json ```json
@ -101,7 +102,7 @@ Gets a specific twitch category
##### 200 ##### 200
The server found the category, returns data of type [CategoryData[]](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/types/scraping/CategoryData.ts) The server found the category, returns data of type [CategoryPreview[]](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/extractor/structs/parsed.go)
*Example:* *Example:*
```json ```json
@ -154,7 +155,7 @@ streamerName query is optional, if given it will only provide the badges for tha
##### 200 ##### 200
Server retrieved the badges, returns type [Badge[]](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/types/scraping/Streamer.ts) Server retrieved the badges, returns type [Badge[]](hhttps://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/extractor/structs/parsed.go)
*Example:* *Example:*
```json ```json
@ -180,7 +181,7 @@ Server retrieved the badges, returns type [Badge[]](https://codeberg.org/dragong
### /api/search?query=SEARCHQUERY ### /api/search?query=SEARCHQUERY
**GET** - SEARCHQUERY is any string **GET** - SEARCHQUERY is any string
Searches for categories, streamers, tags, and live streamers. Returns data of type [SearchResult]() Searches for categories, streamers, tags, and live streamers. Returns data of type [SearchResult](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/extractor/structs/parsed.go)
@ -268,24 +269,6 @@ The server found the search data, returns:
} }
``` ```
### /api/emotes/:streamerName
**GET**
Gets all of the emotes for a streamer
#### Resposnes
##### 200
Returns the found Emotes
*Example:*
```json
{
"name": "fillyTailChase",
"urls": {
"1": "..."
}
},
...
```
## Proxying Endpoints ## Proxying Endpoints
### /proxy/img/:base64Url ### /proxy/img/:base64Url
@ -323,7 +306,7 @@ The streamer is not live
```json ```json
{ {
"status": "error", "status": "error",
"message": "Streamer is not live" "data": "Streamer is not live"
} }
``` ```