From ba7b33ae62f1dbc4810fca25e291d62f86b86e12 Mon Sep 17 00:00:00 2001 From: shockrah Date: Thu, 4 Mar 2021 13:21:09 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Fixed=20broken=20links=20for=20mess?= =?UTF-8?q?ages=20endpoint=20description=20=E2=9D=97=20Should=20probably?= =?UTF-8?q?=20have=20a=20section=20for=20messages=20under=20structures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/content/endpoints/invites.md | 2 +- docs/content/endpoints/members.md | 76 -------------------------- docs/content/endpoints/mesages.md | 83 +++++++++++++++++++++++++++++ docs/content/structures/messages.md | 2 +- 4 files changed, 85 insertions(+), 78 deletions(-) create mode 100644 docs/content/endpoints/mesages.md diff --git a/docs/content/endpoints/invites.md b/docs/content/endpoints/invites.md index 5fc26b9..987d438 100644 --- a/docs/content/endpoints/invites.md +++ b/docs/content/endpoints/invites.md @@ -1,7 +1,7 @@ --- title: Invites anchor: invites-ep -weight: 15 +weight: 16 --- ### `POST /invite/create` diff --git a/docs/content/endpoints/members.md b/docs/content/endpoints/members.md index 3dc8c8d..199825e 100644 --- a/docs/content/endpoints/members.md +++ b/docs/content/endpoints/members.md @@ -67,81 +67,5 @@ Example < { "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 - * Maximum = 1000 - -* Returns - * messages: Array - - -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 - * Maximum = 1000 - -* Returns - * messages: Array - -Example -``` - > GET /message/from_id?id=123&jwt=... - - < { "mesages": [...] } -``` diff --git a/docs/content/endpoints/mesages.md b/docs/content/endpoints/mesages.md new file mode 100644 index 0000000..a80c123 --- /dev/null +++ b/docs/content/endpoints/mesages.md @@ -0,0 +1,83 @@ +--- +title: Messages +anchor: messages-ep +weight: 15 +--- + +## 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 + * Maximum = 1000 + +* Returns + * messages: Array + + +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 + * Maximum = 1000 + +* Returns + * messages: Array + +Example +``` + > GET /message/from_id?id=123&jwt=... + + < { "mesages": [...] } +``` + diff --git a/docs/content/structures/messages.md b/docs/content/structures/messages.md index 05a9ea5..6e04f7d 100644 --- a/docs/content/structures/messages.md +++ b/docs/content/structures/messages.md @@ -1,6 +1,6 @@ --- title: Messages -anchor: messages +anchor: messages-struct weight: 40 ---