mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-25 13:51:17 +00:00
Added asynchronous responses to Join requests
This commit is contained in:
parent
fffcb14632
commit
1a1ee6dc47
1 changed files with 22 additions and 3 deletions
|
@ -56,6 +56,11 @@ info:
|
|||
- **Messages** - A summary of the requests and responses (a duplication of the information in **Channels**)
|
||||
- **Schemas** - An alphabetical list of the most commonly accessed data structures in the API.
|
||||
|
||||
### The 'join' channels - CommunityJoin, ModJoin, PostJoin, UserJoin
|
||||
|
||||
Most API responses generate an immediate and direct (synchronous) response to to the preceding API request: one of an error or a success response.
|
||||
However, for the ‘join’ requests (**CommunityJoin**, **ModJoin**, **PostJoin** and **UserJoin**), you can also receive any of several ‘as it happens’ (asynchronous) responses.
|
||||
|
||||
### The HTTP API
|
||||
|
||||
Lemmy also has an [HTTP API](https://join.lemmy.ml/docs/en/contributing/http_api.html) which is almost identical to the WebSocket API; however, this WebSocket API is the primary source since it also details the specifics of HTTP API calls.
|
||||
|
@ -175,6 +180,8 @@ channels:
|
|||
- Use the `username` field to return details about a local user
|
||||
- Use the `person_id` field to return details about a federated user.
|
||||
|
||||
`community_id` restricts posts and comments in the response to this community.
|
||||
|
||||
#### HTTP API - operation and endpoint.
|
||||
|
||||
`GET /user`
|
||||
|
@ -532,9 +539,13 @@ channels:
|
|||
tags:
|
||||
- name: User, authentication and admin
|
||||
message:
|
||||
oneOf:
|
||||
anyOf:
|
||||
- $ref: "#/components/messages/userJoinResponse"
|
||||
- $ref: "#/components/messages/errorResponse"
|
||||
- $ref: "#/components/messages/createCommentLikeResponse"
|
||||
- $ref: "#/components/messages/createCommentResponse"
|
||||
- $ref: "#/components/messages/createPrivateMessageResponse"
|
||||
- $ref: "#/components/messages/deleteCommentResponse"
|
||||
GetReportCount:
|
||||
publish:
|
||||
summary: GetReportCount (request)
|
||||
|
@ -1051,9 +1062,13 @@ channels:
|
|||
tags:
|
||||
- name: Community
|
||||
message:
|
||||
oneOf:
|
||||
anyOf:
|
||||
- $ref: "#/components/messages/communityJoinResponse"
|
||||
- $ref: "#/components/messages/errorResponse"
|
||||
- $ref: "#/components/messages/createPostResponse"
|
||||
- $ref: "#/components/messages/editPostResponse"
|
||||
- $ref: "#/components/messages/deletePostResponse"
|
||||
- $ref: "#/components/messages/createPostLikeResponse"
|
||||
ModJoin:
|
||||
publish:
|
||||
summary: ModJoin (request)
|
||||
|
@ -1351,9 +1366,13 @@ channels:
|
|||
tags:
|
||||
- name: Post
|
||||
message:
|
||||
oneOf:
|
||||
anyOf:
|
||||
- $ref: "#/components/messages/postJoinResponse"
|
||||
- $ref: "#/components/messages/errorResponse"
|
||||
- $ref: "#/components/messages/createCommentResponse"
|
||||
- $ref: "#/components/messages/editCommentResponse"
|
||||
- $ref: "#/components/messages/deleteCommentResponse"
|
||||
- $ref: "#/components/messages/createPostLikeResponse"
|
||||
CreatePostReport:
|
||||
publish:
|
||||
summary: CreatePostReport (request)
|
||||
|
|
Loading…
Reference in a new issue