Reformatting of wiki:
* Adding endpoint docs and correcting some typesetting mistakes * Change qs params to match documentation * Splitting up articles to geneate the sidebar links properly' * Bad baseurl issue fixed in previous patch
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
# Structures
|
||||
---
|
||||
title: Structures
|
||||
anchor: structures
|
||||
weight: 30
|
||||
---
|
||||
|
||||
This section details what kind of data structures are returned by the json-api.
|
||||
|
||||
@@ -16,82 +20,4 @@ This section details what kind of data structures are returned by the json-api.
|
||||
|
||||
* String
|
||||
|
||||
## Channels
|
||||
|
||||
Channels are made up of the following components
|
||||
|
||||
Name | Type
|
||||
:------:|:--------:
|
||||
id | `u64`
|
||||
name | `String`
|
||||
kind | `i32`
|
||||
|
||||
|
||||
Channels have two valid types or (more semantically) `kind` values:
|
||||
|
||||
* Voice Channel = 1
|
||||
|
||||
* Text Channel = 2
|
||||
|
||||
## Users
|
||||
|
||||
### Personal User
|
||||
|
||||
If you need to get your own user data, with `/users/me` then the data received on success has the following fields:
|
||||
|
||||
Name | Type
|
||||
:------:|:-----:
|
||||
id | `u64`
|
||||
secret | `String`
|
||||
joindate| `i64`
|
||||
status | `i32`
|
||||
permissions| `u64`
|
||||
|
||||
### JWT
|
||||
|
||||
This data is retrieved after a sucessful `/login` hit.
|
||||
|
||||
Name | Type
|
||||
:-----:|:------:
|
||||
jwt | `String`
|
||||
|
||||
### Full Public User
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `u64`
|
||||
name | `String`
|
||||
joindate| `i64`
|
||||
status | `i32`
|
||||
permissions| `u64`
|
||||
|
||||
For users _without_ the `USER_FETCH` permission the only two fields with actual data is `id` and `name`. The other fields will be set to 0.
|
||||
|
||||
## Messages
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `u64`
|
||||
time | `i64`
|
||||
content | `String`
|
||||
type | `String`
|
||||
author_id | `u64`
|
||||
channel_id | `u64`
|
||||
|
||||
|
||||
Acceptable values
|
||||
|
||||
## Invites
|
||||
|
||||
When requesting a code from `/invite/create` successful data contains:
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `i64`
|
||||
uses | `null|i64`
|
||||
expires| `bool`
|
||||
|
||||
Most clients should format this code for usage as `https://domain.net:port/join?code=<id>`. The other data is merely for tracking the server's end.
|
||||
|
||||
|
||||
|
||||
|
||||
23
docs/content/structures/channels.md
Normal file
23
docs/content/structures/channels.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: Channels
|
||||
anchor: channels
|
||||
weight: 35
|
||||
---
|
||||
|
||||
|
||||
Channels are made up of the following components
|
||||
|
||||
Name | Type
|
||||
:------:|:--------:
|
||||
id | `u64`
|
||||
name | `String`
|
||||
kind | `i32`
|
||||
description| `String`
|
||||
|
||||
|
||||
Channels have two valid types or (more semantically) `kind` values:
|
||||
|
||||
* Voice Channel = 1
|
||||
|
||||
* Text Channel = 2
|
||||
|
||||
31
docs/content/structures/messages.md
Normal file
31
docs/content/structures/messages.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: Messages
|
||||
anchor: messages
|
||||
weight: 40
|
||||
---
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `u64`
|
||||
time | `i64`
|
||||
content | `String`
|
||||
type | `String`
|
||||
author_id | `u64`
|
||||
channel_id | `u64`
|
||||
|
||||
|
||||
Acceptable values
|
||||
|
||||
## Invites
|
||||
|
||||
When requesting a code from `/invite/create` successful data contains:
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `i64`
|
||||
uses | `null|i64`
|
||||
expires| `bool`
|
||||
|
||||
Most clients should format this code for usage as `https://domain.net:port/join?code=<id>`. The other data is merely for tracking the server's end.
|
||||
|
||||
|
||||
38
docs/content/structures/users.md
Normal file
38
docs/content/structures/users.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Users
|
||||
anchor: users
|
||||
weight: 50
|
||||
---
|
||||
|
||||
### Personal User
|
||||
|
||||
If you need to get your own user data, with `/users/me` then the data received on success has the following fields:
|
||||
|
||||
Name | Type
|
||||
:------:|:-----:
|
||||
id | `u64`
|
||||
secret | `String`
|
||||
joindate| `i64`
|
||||
status | `i32`
|
||||
permissions| `u64`
|
||||
|
||||
### JWT
|
||||
|
||||
This data is retrieved after a sucessful `/login` hit.
|
||||
|
||||
Name | Type
|
||||
:-----:|:------:
|
||||
jwt | `String`
|
||||
|
||||
### Full Public User
|
||||
|
||||
Name | Type
|
||||
:-----:|:-----:
|
||||
id | `u64`
|
||||
name | `String`
|
||||
joindate| `i64`
|
||||
status | `i32`
|
||||
permissions| `u64`
|
||||
|
||||
For users _without_ the `USER_FETCH` permission the only two fields with actual data is `id` and `name`. The other fields will be set to 0.
|
||||
|
||||
Reference in New Issue
Block a user