mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-15 21:41:43 +00:00
Adding transfer community and site to API docs.
This commit is contained in:
parent
02de461878
commit
630513540e
1 changed files with 45 additions and 1 deletions
46
docs/api.md
vendored
46
docs/api.md
vendored
|
@ -28,7 +28,8 @@ A simple test command:
|
||||||
|
|
||||||
## API
|
## API
|
||||||
### List
|
### 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
|
### Sort Types
|
||||||
These go wherever there is a `sort` field.
|
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
|
### Community
|
||||||
#### Get Community
|
#### Get Community
|
||||||
##### Request
|
##### 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
|
### Post
|
||||||
#### Create Post
|
#### Create Post
|
||||||
##### Request
|
##### Request
|
||||||
|
|
Loading…
Reference in a new issue