Update 'README.md'
All checks were successful
ci/woodpecker/push/<no value> Pipeline was successful

This commit is contained in:
dragongoose 2023-07-20 18:39:26 +00:00
parent 91aba7de42
commit 76c343d63c

View file

@ -269,6 +269,94 @@ The server found the search data, returns:
}
```
### https://streamapi.whateveritworks.org/api/vods/1872917122
**GET** - vodID is any id of a vod
Gets metadata of a VOD, returns [Video](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/extractor/structs/parsed.go)
#### Responses
##### 200
The server found the VOD
*Example:*
```json
{
"status": "ok",
"data": {
"type": "vod",
"preview": "http://localhost:8080/proxy/img/aHR0cHM6Ly9zdGF0aWMtY2RuLmp0dm53Lm5ldC9jZl92b2RzL2QxbTdqZm9lOXpkYzFqL2JjODQyZGVhNmY2MWVlODM5MzNkX2ZpbGlhbl80MTY0NzEwMjg3M18xNjg5NDU4NzA2Ly90aHVtYi90aHVtYjAtOTB4NjAuanBn",
"game": {
"image": "http://localhost:8080/proxy/img/aHR0cHM6Ly9zdGF0aWMtY2RuLmp0dm53Lm5ldC90dHYtYm94YXJ0LzUwOTY1OC17d2lkdGh9eHtoZWlnaHR9LmpwZw==",
"id": "509658",
"name": "Just Chatting",
"displayName": "Just Chatting"
},
"duration": 17520,
"title": "🦂 YOU LAUGH, YOU LOSE today! Eating a Scorpion today. This is it. After 10 laughs it's guaranteed no matter what. Wait I hear something beh",
"publishedAt": "2023-07-15T22:05:11Z",
"views": 81357,
"streamer": {
"username": "filian",
"login": "filian",
"about": "Welcome to my Vtuber alpha! 3D streaming and variety games! Join the discord! n_n",
"pfp": "http://localhost:8080/proxy/img/aHR0cHM6Ly9zdGF0aWMtY2RuLmp0dm53Lm5ldC9qdHZfdXNlcl9waWN0dXJlcy9mNzVkNDEwMy1hMjY1LTRlMjEtODhiNS00NDc0NWZjMWJmNDQtcHJvZmlsZV9pbWFnZS0zMDB4MzAwLnBuZw==",
"banner": null,
"followers": 656278,
"socials": [
{
"type": "discord",
"name": "discord.gg/filian",
"url": "https://discord.gg/filian"
},
{
"type": "twitter",
"name": "twitter.com/filianIsLost",
"url": "https://twitter.com/filianIsLost"
}
],
"isLive": false,
"isPartner": true,
"colorHex": "8040E0",
"id": "198633200"
},
"id": "1872917122"
}
}
```
### https://streamapi.whateveritworks.org/api/vods/1872917122/10
**GET** - vodID is any id of a vod, offset is the seconds into the vod
Gets comments at that second of a song, returns [VodComment[]](https://codeberg.org/dragongoose/safetwitch-backend/src/branch/master/extractor/structs/parsed.go)
#### Responses
##### 200
The server found the VOD
*Example:*
```json
{
"status": "ok",
"data": [
{
"message": "Pog",
"messager": {
"name": "equiro",
"login": "equiro",
"pfp": "",
"colorHex": "#FF4500"
},
"offset": 6,
"cursor": "eyJpZCI6ImMwM2M0Mzg2LTRhMTUtNGVlMC05NGQ2LTMyYWExZTZjYjFhYSIsImhrIjoiYnJvYWRjYXN0OjQxNjQ3MTAyODczIiwic2siOiJBQUFBQmpwT0Z3QVhjaW5GZjk5a0FBIn0",
"badges": []
}...
]
}
```
## Proxying Endpoints
### https://streamapi.whateveritworks.org/proxy/img/base64Url
@ -328,21 +416,21 @@ Gets a segment from one of the quality's manifest file. This is the actual video
Returns the stream segment, HLS streaming.
### /proxy/vod/:vodID/video.m3u8
### https://streamapi.whateveritworks.org//proxy/vod/:vodID/video.m3u8
**GET**
Gets the master manifest for a VOD
### 200
Returns the manifest file
### /proxy/vod/sub/:encodedUrl/video.m3u8
### https://streamapi.whateveritworks.org//proxy/vod/sub/:encodedUrl/video.m3u8
**GET**
Gets the sub manifest for a VOD
encodedUrl is the url to the sub manifiest from twitch encoded in base64
### 200
Returns the manifest file
### /proxy/vod/sub/:encodedUrl/:segment
### https://streamapi.whateveritworks.org//proxy/vod/sub/:encodedUrl/:segment
**GET**
Gets the sub manifest for a VOD
encodedUrl is the url to the sub manifiest from twitch encoded in base64