
* 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
148 lines
2.0 KiB
Markdown
148 lines
2.0 KiB
Markdown
---
|
|
title: Members
|
|
anchor: members-ep
|
|
weight: 14
|
|
---
|
|
|
|
### `POST /members/me/nickname`
|
|
|
|
* Required permissions:
|
|
|
|
* CHANGE_NICK
|
|
|
|
* Required query string parameters:
|
|
|
|
* id: u64
|
|
* jwt: String
|
|
* name: String
|
|
* New nickname to change to(if allowed)
|
|
|
|
* Returns
|
|
* None
|
|
|
|
### `GET /members/me`
|
|
|
|
* Required query string parameters:
|
|
|
|
* id: u64
|
|
* jwt: String
|
|
|
|
* Returns:
|
|
|
|
* Member
|
|
* Contains all public data about your account on the server
|
|
|
|
Example
|
|
```
|
|
> GET /members/me?id=123&jwt=...
|
|
|
|
< {
|
|
< "name": "nickname-here",
|
|
< "id": 123,
|
|
< "joindate": <unix-timestamp>,
|
|
< "permissions": <64-bit-mask>
|
|
< }
|
|
```
|
|
|
|
### `GET /members/online`
|
|
|
|
* Required query string parameters:
|
|
|
|
* id: u64
|
|
* jwt: String
|
|
* limit: Optional<u64>
|
|
* Internal default: 100
|
|
|
|
* Returns
|
|
* members: Array<Members>
|
|
* Each member contains: [`name`, `id`, `joindate`, `permissions`]
|
|
|
|
* count: u64
|
|
|
|
|
|
Example
|
|
```
|
|
> GET /members/online?id=123&jwt=...
|
|
|
|
< { "members": [...] }
|
|
```
|
|
|
|
## Messages
|
|
|
|
### `POST /message/send`
|
|
|
|
* Required permissions:
|
|
* SEND_MESSAGES
|
|
|
|
* Required query string parameters:
|
|
* id: u64
|
|
* jwt: String
|
|
|
|
* channel_id: u64
|
|
* type: String
|
|
|
|
Valid values:
|
|
|
|
* text
|
|
* jpeg
|
|
* png
|
|
* webm
|
|
* mp4
|
|
|
|
* Required body:
|
|
* Content itself should always go in the body
|
|
* Empty bodies result in an HTTP 400 response
|
|
|
|
* Returns:
|
|
* None
|
|
|
|
### `GET /message/get_range`
|
|
|
|
* Required query string parameters:
|
|
* id: u64
|
|
* jwt: string
|
|
|
|
* channel_id: u64
|
|
* start_time: i64
|
|
* Unix timestamp (seconds)
|
|
* end_time: i64
|
|
* Unix timestamp (seconds)
|
|
|
|
* limit: Optional<u64>
|
|
* Maximum = 1000
|
|
|
|
* Returns
|
|
* messages: Array<Message>
|
|
|
|
|
|
Example
|
|
```
|
|
> GET /message/get_range?id=123&jwt=...
|
|
|
|
< { "mesages": [...] }
|
|
```
|
|
|
|
|
|
### `GET /message/from_id`
|
|
|
|
* Required query string parameters:
|
|
* id: u64
|
|
* jwt: string
|
|
|
|
* channel_id: u64
|
|
* start: u64
|
|
* limit: Optional<u64>
|
|
* Maximum = 1000
|
|
|
|
* Returns
|
|
* messages: Array<Message>
|
|
|
|
Example
|
|
```
|
|
> GET /message/from_id?id=123&jwt=...
|
|
|
|
< { "mesages": [...] }
|
|
```
|
|
|
|
|