From 61b38f63edd8cecf67209ff181cb3c0ffc9141e2 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 25 Aug 2019 11:16:46 -0700 Subject: [PATCH] Adding transfer community and site to API docs. --- docs/api.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 90b931e61..dd5f6d60d 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, + admins: Vec, + banned: Vec, +} +``` + ### 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, + admins: Vec, +} +``` + ### Post #### Create Post ##### Request