<!-- toc -->
- [Data types](#data-types)
+ * [Lemmy types](#lemmy-types)
+ * [Lower-level types](#lower-level-types)
- [Basic usage](#basic-usage)
* [WebSocket](#websocket)
+ [Testing with Websocat](#testing-with-websocat)
## Data types
+### Lemmy types
+
+The fields for objects like Users, Comments, Communities, and Posts, are in the [lemmy_db](https://github.com/LemmyNet/lemmy/tree/main/lemmy_db/src) folder, with the suffix `_view`. The main types are:
+
+- [CommentView](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/comment_view.rs)
+- [CommunityView](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/community_view.rs)
+- [PostView](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/post_view.rs)
+- [UserView](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/user_view.rs)
+- [PrivateMessageView](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/private_message_view.rs)
+- [UserMentionView](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/user_mention_view.rs)
+- [SiteView](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/site_view.rs)
+- [Category](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/category.rs)
+- [Moderator Views](https://github.com/LemmyNet/lemmy/blob/main/lemmy_db/src/moderator_views.rs)
+
+The requests and responses, although copied below, are most up to date in [lemmy_structs](https://github.com/LemmyNet/lemmy/tree/main/lemmy_structs/src).
+
+### Lower-level types
+
- `i16`, `i32` and `i64` are respectively [16-bit](https://en.wikipedia.org/wiki/16-bit), [32-bit](https://en.wikipedia.org/wiki/32-bit) and [64-bit](https://en.wikipedia.org/wiki/64-bit_computing) integers.
- <code>Option<***SomeType***></code> designates an option which may be omitted in requests and not be present in responses. It will be of type ***SomeType***.
- <code>Vec<***SomeType***></code> is a list which contains objects of type ***SomeType***.
- `chrono::NaiveDateTime` is a timestamp string in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Timestamps will be UTC.
-- Other data types are listed [here](../src/db).
## Basic usage