feat: docs part 1

This commit is contained in:
2025-09-01 01:57:37 +02:00
parent 307b697ac9
commit a4f940b990
3 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
---
title: API Documentation
description: Documented API endpoints for hackclub.tv
---
hctv is meant to be one of the most hackable streaming platforms out there. to that end, we have a (currently limited) public API that you can use to interact with the platform.
since this is beta software, the API is subject to change. additionally, many endpoints are yet not implemented. please send a message in #hctv on the Hack Club Slack if you have any requests.
## Base url
base url for all endpoints is `https://hctv.srizan.dev/api`.
## Authentication
most endpoints require authentication. this will be pointed out in the documentation.
for now, it is done via a cookie called `auth_session` (as per lucia auth). this will change in the future as bot accounts are planned.
you'll need your user account to authenticate. as a recommendation, open an incognito window, log in to hctv, and copy the `auth_session` cookie from there.

View File

@@ -0,0 +1,5 @@
{
"title": "API",
"description": "Documented API endpoints for hackclub.tv",
"root": true
}

View File

@@ -0,0 +1,16 @@
---
title: RTMP
description: RTMP related endpoint group
---
## GET `/rtmp/hls/:path`
gets HLS segments, the backbone of hctv livestreaming. **authentication required**.
not really sure why you would need this? but check the browser console when playing a stream for an insight on how it's used.
## POST `/rtmp/streamKey`
regenerates your stream key. **authentication required**.
body parameters (json):
- `channel`: string - the channel name you want to regenerate the key for. must be one of your channels.
response (json):
- `key`: string - the new stream key