Basically a rewrite of previous docs but this one is super terse

This commit is contained in:
shockrah 2020-12-12 15:45:13 -08:00
parent 275869a6f7
commit ce79d33380

42
server-api/endpoints.md Normal file
View File

@ -0,0 +1,42 @@
# Documenting the currently tested / working endpoints
Mostly a dev reference for now since it's a lot more terse.
## Parameters
All parameters are to be passed in via json, other parameters are ignored
## Auth
Basically every endpoint except for `/join` and `/meta` require the folowing auth
data at a bare minimum.
* id: u64 -> User id | Public data
* secret: String -> sever generated token to be used for endpoint authentication
## Chat api
`/channels/list` NoPermsRequired
No parameters required
`/channels/create` RequiredPerm[CREATE_CHANNEL=64]
* @Required name: `String`
* @Required kind: `Signed 32-bit Integer`
* @Optional description: `String`
For voice channel `1`. For text channel `2`. All other options result in a HTTP 400.
`/channels/delete` RequiredPerm[DELETE_CHANNEL=128]
* @Required channel_id: `Unsigned 64-bit Integer`
`/message/send` RequiredPerm[SEND_MESSAGES=2]
* @Required channel `Unsigned 64-bit Integer`
* @Required content `String`