summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-08-25 11:16:46 -0700
committerDessalines <tyhou13@gmx.com>2019-08-25 11:16:46 -0700
commit630513540e3d5e2005773644365f31569d1d3d85 (patch)
treeed07baa78a1bf7efcc23fcceb0aeefa290c7b2d5 /docs
parent02de46187884e3f382a7414743307b257b15c4a7 (diff)
Adding transfer community and site to API docs.
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md46
1 files changed, 45 insertions, 1 deletions
diff --git a/docs/api.md b/docs/api.md
index 90b931e6..dd5f6d60 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -28,7 +28,8 @@ A simple test command:
## API
### List
-`Login, Register, CreateCommunity, CreatePost, ListCommunities, ListCategories, GetPost, GetCommunity, CreateComment, EditComment, SaveComment, CreateCommentLike, GetPosts, CreatePostLike, EditPost, SavePost, EditCommunity, FollowCommunity, GetFollowedCommunities, GetUserDetails, GetReplies, GetModlog, BanFromCommunity, AddModToCommunity, CreateSite, EditSite, GetSite, AddAdmin, BanUser, Search, MarkAllAsRead, SaveUserSettings`
+`Login, Register, CreateCommunity, CreatePost, ListCommunities, ListCategories, GetPost, GetCommunity, CreateComment, EditComment, SaveComment, CreateCommentLike, GetPosts, CreatePostLike, EditPost, SavePost, EditCommunity, FollowCommunity, GetFollowedCommunities, GetUserDetails, GetReplies, GetModlog, BanFromCommunity, AddModToCommunity, CreateSite, EditSite, GetSite, AddAdmin, BanUser, Search, MarkAllAsRead, SaveUserSettings, TransferCommunity,
+TransferSite`
### Sort Types
These go wherever there is a `sort` field.
@@ -334,6 +335,27 @@ Search types are `Both, Comments, Posts`.
}
```
+#### Transfer Site
+##### Request
+```rust
+{
+ op: "TransferSite",
+ data: {
+ user_id: i32,
+ auth: String
+ }
+}
+```
+##### Response
+```rust
+{
+ op: String,
+ site: Option<SiteView>,
+ admins: Vec<UserView>,
+ banned: Vec<UserView>,
+}
+```
+
### Community
#### Get Community
##### Request
@@ -512,6 +534,28 @@ Mods and admins can remove and lock a community, creators can delete it.
}
```
+#### Transfer Community
+##### Request
+```rust
+{
+ op: "TransferCommunity",
+ data: {
+ community_id: i32,
+ user_id: i32,
+ auth: String
+ }
+}
+```
+##### Response
+```rust
+{
+ op: String,
+ community: CommunityView,
+ moderators: Vec<CommunityModeratorView>,
+ admins: Vec<UserView>,
+}
+```
+
### Post
#### Create Post
##### Request