diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 57b81b6..d982616 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -13,8 +13,7 @@ export default defineConfig({ title: 'Meower Docs', themeConfig: { editLink: { - pattern: - 'https://github.com/meower-media-co/api-client/edit/main/docs/:path', + pattern: 'https://github.com/meower-media/docs/edit/main/docs/:path', }, nav: [ { text: 'Home', link: '/' }, @@ -39,7 +38,7 @@ export default defineConfig({ socialLinks: [ { icon: 'github', - link: 'https://github.com/meower-media-co', + link: 'https://github.com/meower-media', }, ], }, diff --git a/docs/api/features.md b/docs/api/features.md new file mode 100644 index 0000000..a367498 --- /dev/null +++ b/docs/api/features.md @@ -0,0 +1,30 @@ +# All Known features + +This includes every feature that is explicitly added by the current API. + +- Sending, editing, and deleting: + - posts + - chats + +- User accounts + - Logging in + - Signing up +- Post/user reporting +- [Chats](./objects/chat.md): + - Chat creation + - Chat member management + - Chat message pinning +- Multifactor Authentication. +- Home page +- Quotes (used a bio typically) +- Post reactions +- Post replies +- Profile pictures +- Searching users +- Searching posts +- Blocking users +- Direct Messaging Users +- Typing indicators +- Inbox messages +- Searching Posts and Users +- Uploading (images, videos, etc) diff --git a/docs/api/objects/emoji.md b/docs/api/objects/emoji.md new file mode 100644 index 0000000..1ca2762 --- /dev/null +++ b/docs/api/objects/emoji.md @@ -0,0 +1,25 @@ +# Emoji + +### Structure + + + +| Field | Type | Description | +| - | - | - | +| _id | string | The emoji's UUID4. | +| animated | boolean | Whether the emoji is animated. | +| chat_id | UUID4 | The chat's UUID4. | +| name | string | The emoji's name. | + + + +### Examples + +```json +{ + "_id": "CNqjEMFlMYlS66VjDQ3u8z07", + "animated": false, + "chat_id": "ee754b92-da8a-483a-9601-bf44b9bff531", + "name": "ban" +} +``` diff --git a/docs/api/objects/extended-timestamp.md b/docs/api/objects/extended-timestamp.md deleted file mode 100644 index 6fec4d8..0000000 --- a/docs/api/objects/extended-timestamp.md +++ /dev/null @@ -1,44 +0,0 @@ -# Extended Timestamp - -:::info - -The Extended Timestamp object is only used within the `t` field on -[Post objects](./post). It should not appear anywhere else. - -::: - -:::warning - -Every field apart from `e` in the extended timestamp object is based on the -server's current timezone. This can cause weird behavior if the server's -timezone changes (e.g. daylight savings). - -::: - -### Structure - - -| Field | Type | Description | -| - | - | - | -| d | string | Day | -| mo | string | Month | -| y | string | Year | -| h | string | Hour | -| mi | string | Minute | -| s | string | Second | -| e | integer | Unix seconds | - - -### Example - -```json -{ - "d": "13", - "mo": "06", - "y": "2022", - "h": "05", - "mi": "12", - "s": "32", - "e": 1655097173 -} -``` diff --git a/docs/api/objects/post.md b/docs/api/objects/post.md index 0e42e6b..90970fb 100644 --- a/docs/api/objects/post.md +++ b/docs/api/objects/post.md @@ -2,21 +2,25 @@ ### Structure - -| Field | Type | Description | Optional | -| - | - | - | - | -| _id | UUID4 | The post's UUID4. | | -| post_id | UUID4 | The post's UUID4. | | -| post_origin | string/UUID4 | Where the post was created. Can be `"home"`, `"inbox"`, `"livechat"`, or a chat's UUID4. | | -| type | integer | The post's type. | | -| t | [Extended Timestamp](./extended-timestamp) object | The post's creation timestamp. | | -| u | string | The username of the post author. | | -| p | string | The content of the post. | | -| unfiltered_p | string | The non-filtered content of the post. | ✓ | -| pinned | boolean | Whether the post is pinned. | | -| isDeleted | boolean | Whether the post is deleted. | | -| mod_deleted | boolean | Whether the post was deleted by a moderator. | ✓ | -| deleted_at | integer | The post's deletion timestamp in Unix seconds. | ✓ | + +| Field | Type | Description | Optional | +| ------------ | ------------------------------------------------- | ---------------------------------------------------------------------------------------- | -------- | +| _id | UUID4 | The post's UUID4. | | +| attachments | Unknown[] | The uploaded attachments attached to the post. | | +| author | [Post Users](./user.md#post-users) | A peek at the authors info. | | +| emojis | [emoji](./emoji.md)[] | The custom emojies used within the post. | | +| isDeleted | boolean | Whether the post is deleted. | | +| p | string | The content of the post. | | +| pinned | boolean | Whether the post is pinned. | | +| post_id | UUID4 | The post's UUID4. | | +| post_origin | string/UUID4 | Where the post was created. Can be `"home"`, `"inbox"`, `"livechat"`, or a chat's UUID4. | | +| reply_to | [post](./post.md)[] | The replied to posts. Sub posts cannot have replies. | | +| stickers | Unknown[] | The custom stickers in the post. | | +| type | integer | The post's type. | | +| t.e | number | The post's creation timestamp. (unix) | | +| u | string | The username of the post author. | | +| mod_deleted | boolean | Whether the post was deleted by a moderator. | ✓ | +| deleted_at | integer | The post's deletion timestamp in Unix seconds. | ✓ | ### Examples @@ -25,26 +29,74 @@ ```json { - "_id": "5c93e560-fddd-4146-98bc-edeb263d648f", - "post_id": "5c93e560-fddd-4146-98bc-edeb263d648f", + "_id": "8cacf340-182c-4cbe-98e4-807781ca5e22", + "attachments": [], + "author": { + "_id": "ShowierData9978", + "avatar": "gl4zm8aGO2U3MOUANDNMpnSA", + "avatar_color": "007ffd", + "flags": 0, + "pfp_data": 21, + "uuid": "4f4d986b-63ef-4f7d-9b8b-87368c6e0280" + }, + "emojis": [ + { + "_id": "CNqjEMFlMYlS66VjDQ3u8z07", + "animated": false, + "chat_id": "ee754b92-da8a-483a-9601-bf44b9bff531", + "name": "ban" + } + ], + "isDeleted": false, + "p": "Documentation Post <:CNqjEMFlMYlS66VjDQ3u8z07>", + "pinned": false, + "post_id": "8cacf340-182c-4cbe-98e4-807781ca5e22", "post_origin": "home", - "type": 1, + "reactions": [ + { + "count": 1, + "emoji": "😃", + "user_reacted": false + } + ], + "reply_to": [ + { + "_id": "d9c07f76-ca61-424c-ae7a-43f1a5f23ade", + "attachments": [], + "author": { + "_id": "Eris", + "avatar": "Gi1WvwNobL0X6RpZB7pnAMNw", + "avatar_color": "8f75cc", + "flags": 4, + "pfp_data": 23, + "uuid": "d4006f3b-d054-4fd3-a4b1-82b29257cd91" + }, + "emojis": [], + "isDeleted": false, + "p": "https://tenor.com/view/boom-roasted-the-office-michael-scott-gif-9210948", + "pinned": false, + "post_id": "d9c07f76-ca61-424c-ae7a-43f1a5f23ade", + "post_origin": "home", + "reactions": [], + "reply_to": [], + "stickers": [], + "t": { + "e": 1723786557 + }, + "type": 1, + "u": "Eris" + } + ], + "stickers": [], "t": { - "d": "30", - "mo": "01", - "y": "2024", - "h": "06", - "mi": "44", - "s": "53", - "e": 1706597093 + "e": 1723786594 }, - "u": "eri", - "p": "It’s gonna be great:tm:", - "isDeleted": false + "type": 1, + "u": "ShowierData9978" } ``` -#### Livechat +#### Livechat (outdated) ```json { @@ -67,7 +119,7 @@ } ``` -#### DM / Group Chat +#### DM / Group Chat (outdated) ```json { @@ -90,7 +142,7 @@ } ``` -#### Inbox (Notification to @zed) +#### Inbox (Notification to @zed) (outdated) ```json { @@ -113,7 +165,7 @@ } ``` -#### Inbox (Announcement) +#### Inbox (Announcement) (outdated) ```json { diff --git a/docs/api/objects/user.md b/docs/api/objects/user.md index 86d4b4e..79cadf1 100644 --- a/docs/api/objects/user.md +++ b/docs/api/objects/user.md @@ -101,3 +101,16 @@ this can be consisely written as `(permissions & (1 << permission)) != 0`. "last_seen": 1706574821 } ``` + +#### Post Users + +```json +{ + "_id": "ShowierData9978", + "avatar": "gl4zm8aGO2U3MOUANDNMpnSA", + "avatar_color": "007ffd", + "flags": 0, + "pfp_data": 21, + "uuid": "4f4d986b-63ef-4f7d-9b8b-87368c6e0280" +} +``` diff --git a/docs/api/rest-api/rest-api.md b/docs/api/rest-api/rest-api.md index 7ece188..15c4821 100644 --- a/docs/api/rest-api/rest-api.md +++ b/docs/api/rest-api/rest-api.md @@ -1,8 +1,7 @@ # Rest API This section describes the Rest API found at based on -its behavior and source code found at -. +its behavior and source code found at . The Meower API uses JSON both for recieving and responding to requests.