Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Update documentation and update links #15

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '/' },
Expand All @@ -39,7 +38,7 @@ export default defineConfig({
socialLinks: [
{
icon: 'github',
link: 'https://github.com/meower-media-co',
link: 'https://github.com/meower-media',
},
],
},
Expand Down
30 changes: 30 additions & 0 deletions docs/api/features.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of this file? Shouldn't this documentation be for the Meower API, not the features Meower has?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No other place to put it in the docs. Its could be considered a semi index for where stuff is as it gets documented

Copy link
Contributor

@mybearworld mybearworld Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of it in the first place, though? How does it make the documentation better? People reading the Meower docs probably already know which features Meower has

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the client requirements where the only place it existed before. So it needs to be here instead. This is especially needed for new client devs that cant read python/golang

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it needs to be here instead. This is especially needed for new client devs that cant read python/golang

Meower Svelte and others exist. People can see the features Meower has from there. Specific implementation details (i.e. API endpoints) is what the docs would be for

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but that still requires reading source code. It's slightly better to have them listed out somewhere

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Listing the API endpoints is the entire point of the docs, doesn't need its own file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no reason for this, especially if you're not adding it to the sidebar. the api reference (/api/rest) should be sufficient once the openapi schema is updated to have actual descriptions and names for the endpoints

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once the openapi schema is updated to have actual descriptions and names for the endpoints

Is this planned? That would leave the REST-API section pretty much useless

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this planned? That would leave the REST-API section pretty much useless

yes. we'd like to eventually improve the autogenerated documentation, but there're limitations w/what we can have them display which would probably keep the handwritten docs around

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was very overwhelming tbf

Original file line number Diff line number Diff line change
@@ -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)
25 changes: 25 additions & 0 deletions docs/api/objects/emoji.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Emoji

### Structure

<!-- deno-fmt-ignore-start -->

| 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. |

<!-- deno-fmt-ignore-end -->
Comment on lines +5 to +14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- deno-fmt-ignore-start -->
| 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. |
<!-- deno-fmt-ignore-end -->
<!-- deno-fmt-ignore-start -->
| 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. |
<!-- deno-fmt-ignore-end -->

please be consistent w/formatting the ignore blocks


### Examples

```json
{
"_id": "CNqjEMFlMYlS66VjDQ3u8z07",
"animated": false,
"chat_id": "ee754b92-da8a-483a-9601-bf44b9bff531",
"name": "ban"
}
```
44 changes: 0 additions & 44 deletions docs/api/objects/extended-timestamp.md

This file was deleted.

116 changes: 84 additions & 32 deletions docs/api/objects/post.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change table formatting to match the other existing files and remove the comment about uploads being down

Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

### Structure

<!-- deno-fmt-ignore-start -->
| 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. | ✓ |
<!-- deno-fmt-ignore-start --> <!-- Uploads was down -->
| Field | Type | Description | Optional |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be formatted the way all the other tables are?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's unreadable and uneditable otherwise

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How? Also, that's what the rest of the tables do, it should really be consistent

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to format it with a vscode ext so I could actually edit it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(tried to do it with 1 other but the ext failed to format that one)

Copy link
Contributor

@mybearworld mybearworld Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't see what you mean

"Formatted"
image

Current
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh wraps lines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meaning it looks worse with line wrapping because it adds an extra line inbetween lines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even without word wrapping (but especially with word wrapping which is pretty much necessary for md files), the current is way easier to read and has more information on screen

"Formatted"
image

"Current"
image

| ------------ | ------------------------------------------------- | ---------------------------------------------------------------------------------------- | -------- |
| _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. | ✓ |
<!-- deno-fmt-ignore-end -->

### Examples
Expand All @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this and the other instances of things being marked as outdated, could you please actually update the examples


```json
{
Expand All @@ -67,7 +119,7 @@
}
```

#### DM / Group Chat
#### DM / Group Chat (outdated)

```json
{
Expand All @@ -90,7 +142,7 @@
}
```

#### Inbox (Notification to @zed)
#### Inbox (Notification to @zed) (outdated)

```json
{
Expand All @@ -113,7 +165,7 @@
}
```

#### Inbox (Announcement)
#### Inbox (Announcement) (outdated)

```json
{
Expand Down
13 changes: 13 additions & 0 deletions docs/api/objects/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```
3 changes: 1 addition & 2 deletions docs/api/rest-api/rest-api.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Rest API

This section describes the Rest API found at <https://api.meower.org> based on
its behavior and source code found at
<https://github.com/meower-media-co/Meower-Server>.
its behavior and source code found at <https://github.com/meower-media/server>.

The Meower API uses JSON both for recieving and responding to requests.

Expand Down
Loading