mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-22 12:21:16 +00:00
Added Community channels
This commit is contained in:
parent
ac5ca75c72
commit
67f8fc3d94
1 changed files with 700 additions and 101 deletions
|
@ -43,6 +43,7 @@ externalDocs:
|
||||||
tags:
|
tags:
|
||||||
- name: User, authentication and admin
|
- name: User, authentication and admin
|
||||||
- name: Site
|
- name: Site
|
||||||
|
- name: Community
|
||||||
channels:
|
channels:
|
||||||
Login:
|
Login:
|
||||||
publish:
|
publish:
|
||||||
|
@ -561,7 +562,7 @@ channels:
|
||||||
publish:
|
publish:
|
||||||
summary: GetModLog (request)
|
summary: GetModLog (request)
|
||||||
description: |-
|
description: |-
|
||||||
Forthcoming...
|
Details of the site's *Modlog*: sticky and lockwed posts and so on.
|
||||||
|
|
||||||
#### HTTP API - operation and endpoint.
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
@ -571,7 +572,16 @@ channels:
|
||||||
- name: Site
|
- name: Site
|
||||||
message:
|
message:
|
||||||
$ref: '#/components/messages/getModLogRequest'
|
$ref: '#/components/messages/getModLogRequest'
|
||||||
# Could not get GetModLog response from server, hence no 'subscribe' option documented
|
subscribe:
|
||||||
|
summary: GetModLog (response)
|
||||||
|
description: Modlog request results
|
||||||
|
operationId: getModLogResponseMessage
|
||||||
|
tags:
|
||||||
|
- name: Site
|
||||||
|
message:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/messages/getModLogResponse'
|
||||||
|
- $ref: '#/components/messages/errorResponse'
|
||||||
CreateSite:
|
CreateSite:
|
||||||
publish:
|
publish:
|
||||||
summary: CreateSite (request)
|
summary: CreateSite (request)
|
||||||
|
@ -710,6 +720,175 @@ channels:
|
||||||
- $ref: '#/components/messages/saveSiteConfigResponse'
|
- $ref: '#/components/messages/saveSiteConfigResponse'
|
||||||
- $ref: '#/components/messages/errorResponse'
|
- $ref: '#/components/messages/errorResponse'
|
||||||
# SaveSiteConfig response not verified. Did not get response from server
|
# SaveSiteConfig response not verified. Did not get response from server
|
||||||
|
GetCommunity:
|
||||||
|
publish:
|
||||||
|
summary: GetCommunity (request)
|
||||||
|
description: |-
|
||||||
|
Request to get details of a specified community
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`GET /community`
|
||||||
|
operationId: getCommunityRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/getCommunityRequest'
|
||||||
|
subscribe:
|
||||||
|
summary: GetCommunity (response)
|
||||||
|
description: Return the details for a community
|
||||||
|
operationId: getCommunityResponseMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/messages/getCommunityResponse'
|
||||||
|
- $ref: '#/components/messages/errorResponse'
|
||||||
|
CreateCommunity:
|
||||||
|
publish:
|
||||||
|
summary: CreateCommunity (request)
|
||||||
|
description: |-
|
||||||
|
Request to create a new community
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`POST /community`
|
||||||
|
operationId: createCommunityRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/createCommunityRequest'
|
||||||
|
subscribe:
|
||||||
|
summary: CreateCommunity (response)
|
||||||
|
description: Return the details for a community
|
||||||
|
operationId: createCommunityResponseMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/messages/createCommunityResponse'
|
||||||
|
- $ref: '#/components/messages/errorResponse'
|
||||||
|
ListCommunities:
|
||||||
|
publish:
|
||||||
|
summary: ListCommunities (request)
|
||||||
|
description: |-
|
||||||
|
Request to list all communities on the Lemmy server
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`GET /community/list`
|
||||||
|
operationId: listCommunityRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/listCommunityRequest'
|
||||||
|
subscribe:
|
||||||
|
summary: ListCommunities (response)
|
||||||
|
description: Return the details for all communities
|
||||||
|
operationId: listCommunityResponseMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/messages/listCommunityResponse'
|
||||||
|
- $ref: '#/components/messages/errorResponse'
|
||||||
|
BanFromCommunity:
|
||||||
|
publish:
|
||||||
|
summary: BanFromCommunity (request)
|
||||||
|
description: |-
|
||||||
|
Request to ban a user (`user_id`) from a specified community.
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`POST /community/ban_user`
|
||||||
|
operationId: banFromCommunityRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/banFromCommunityRequest'
|
||||||
|
# Issues with Docker, hence subscribe not documented
|
||||||
|
AddModToCommunity:
|
||||||
|
publish:
|
||||||
|
summary: AddModToCommunity (request)
|
||||||
|
description: |-
|
||||||
|
Request to add another moderator (`user_id`) to the specified community (`community_id`).
|
||||||
|
|
||||||
|
The account making the request (`auth`) must be either an admin or a moderator of that community.
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`POST /community/mod`
|
||||||
|
operationId: addModToCommunityRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/addModToCommunityRequest'
|
||||||
|
# No response from server, hence subscribe not documented
|
||||||
|
TransferCommunity:
|
||||||
|
publish:
|
||||||
|
summary: TransferCommunity (Request)
|
||||||
|
description: |-
|
||||||
|
Request to transfer ownership of a community from one person (`auth`) to another (`user_id`).
|
||||||
|
|
||||||
|
The account making the request (`auth`) must be an admin user.
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`POST /community/transfer`
|
||||||
|
operationId: transferCommunityRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/transferCommunityRequest'
|
||||||
|
# Issues with Docker, hence subscribe not documented
|
||||||
|
CommunityJoin:
|
||||||
|
publish:
|
||||||
|
summary: CommunityJoin (request)
|
||||||
|
description: |-
|
||||||
|
Forthcoming...
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`POST /community/join`
|
||||||
|
operationId: communityJoinRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/communityJoinRequest'
|
||||||
|
subscribe:
|
||||||
|
summary: CommunityJoin (response)
|
||||||
|
description: Forthcoming...
|
||||||
|
operationId: CommunityJoinResponseMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/messages/communityJoinResponse'
|
||||||
|
- $ref: '#/components/messages/errorResponse'
|
||||||
|
ModJoin:
|
||||||
|
publish:
|
||||||
|
summary: ModJoin (request)
|
||||||
|
description: |-
|
||||||
|
Forthcoming...
|
||||||
|
|
||||||
|
#### HTTP API - operation and endpoint.
|
||||||
|
|
||||||
|
`POST /community/mod/join`
|
||||||
|
operationId: modJoinRequestMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
$ref: '#/components/messages/modJoinRequest'
|
||||||
|
subscribe:
|
||||||
|
summary: ModJoin (response)
|
||||||
|
description: Forthcoming...
|
||||||
|
operationId: modJoinResponseMessage
|
||||||
|
tags:
|
||||||
|
- name: Community
|
||||||
|
message:
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/messages/modJoinResponse'
|
||||||
|
- $ref: '#/components/messages/errorResponse'
|
||||||
components:
|
components:
|
||||||
messages:
|
messages:
|
||||||
errorResponse:
|
errorResponse:
|
||||||
|
@ -950,12 +1129,8 @@ components:
|
||||||
default: 'GetUserDetails'
|
default: 'GetUserDetails'
|
||||||
data:
|
data:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
user:
|
||||||
op:
|
$ref: '#/components/schemas/user_view'
|
||||||
type: string
|
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
posts:
|
posts:
|
||||||
$ref: '#/components/schemas/replies'
|
$ref: '#/components/schemas/replies'
|
||||||
comments:
|
comments:
|
||||||
|
@ -1077,7 +1252,6 @@ components:
|
||||||
properties:
|
properties:
|
||||||
private_messages:
|
private_messages:
|
||||||
type: array
|
type: array
|
||||||
uniqueItems: true
|
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/private_message_view'
|
$ref: '#/components/schemas/private_message_view'
|
||||||
op:
|
op:
|
||||||
|
@ -1287,9 +1461,7 @@ components:
|
||||||
user_id:
|
user_id:
|
||||||
$ref: '#/components/schemas/user_id'
|
$ref: '#/components/schemas/user_id'
|
||||||
added:
|
added:
|
||||||
description: Forthcoming...
|
$ref: '#/components/schemas/added'
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
auth:
|
auth:
|
||||||
$ref: '#/components/schemas/authStringSchema'
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
addAdminResponse:
|
addAdminResponse:
|
||||||
|
@ -1297,15 +1469,15 @@ components:
|
||||||
payload:
|
payload:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
admins:
|
|
||||||
$ref: '#/components/schemas/user'
|
|
||||||
op:
|
op:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^AddAdmin$'
|
pattern: '^AddAdmin$'
|
||||||
default: 'AddAdmin'
|
default: 'AddAdmin'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
admins:
|
||||||
|
$ref: '#/components/schemas/user_view'
|
||||||
banUserRequest:
|
banUserRequest:
|
||||||
name: Request to ban a user
|
name: Request to ban a user
|
||||||
payload:
|
payload:
|
||||||
|
@ -1321,25 +1493,13 @@ components:
|
||||||
user_id:
|
user_id:
|
||||||
$ref: '#/components/schemas/user_id'
|
$ref: '#/components/schemas/user_id'
|
||||||
ban:
|
ban:
|
||||||
description: |-
|
$ref: '#/components/schemas/ban'
|
||||||
- If set to *true*, ban the user
|
|
||||||
- If set to *false*, do not ban them (use in combination with `remove_data` to restore comments, posts, and communities that were previously removed with `banUser`)
|
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
remove_data:
|
remove_data:
|
||||||
description: |-
|
$ref: '#/components/schemas/remove_data'
|
||||||
- If set to *true*, also delete their comments, posts, and communities
|
|
||||||
- If set *false*, *restore* their comments, posts, and communities
|
|
||||||
type: boolean
|
|
||||||
example: false
|
|
||||||
reason:
|
reason:
|
||||||
description: Forthcoming...
|
$ref: '#/components/schemas/reason'
|
||||||
type: string
|
|
||||||
example: 'Breach of terms and conditions'
|
|
||||||
expires:
|
expires:
|
||||||
description: Forthcoming...
|
$ref: '#/components/schemas/expires'
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
auth:
|
auth:
|
||||||
$ref: '#/components/schemas/authStringSchema'
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
banUserResponse:
|
banUserResponse:
|
||||||
|
@ -1347,19 +1507,12 @@ components:
|
||||||
payload:
|
payload:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
user:
|
|
||||||
$ref: '#/components/schemas/user'
|
|
||||||
banned:
|
|
||||||
description: Forthcoming...
|
|
||||||
type: boolean
|
|
||||||
example: true
|
|
||||||
op:
|
op:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^BanUser$'
|
pattern: '^BanUser$'
|
||||||
default: 'BanUser'
|
default: 'BanUser'
|
||||||
|
data:
|
||||||
|
$ref: '#/components/schemas/ban_view'
|
||||||
userJoinRequest:
|
userJoinRequest:
|
||||||
name: Request to join (something?)
|
name: Request to join (something?)
|
||||||
payload:
|
payload:
|
||||||
|
@ -1456,9 +1609,7 @@ components:
|
||||||
id:
|
id:
|
||||||
$ref: '#/components/schemas/category_id'
|
$ref: '#/components/schemas/category_id'
|
||||||
name:
|
name:
|
||||||
description: The category name
|
$ref: '#/components/schemas/category_name'
|
||||||
type: string
|
|
||||||
example: 'Politics'
|
|
||||||
op:
|
op:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^ListCategories$'
|
pattern: '^ListCategories$'
|
||||||
|
@ -1498,6 +1649,10 @@ components:
|
||||||
payload:
|
payload:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^Search$'
|
||||||
|
default: 'Search'
|
||||||
data:
|
data:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1516,15 +1671,11 @@ components:
|
||||||
items:
|
items:
|
||||||
properties:
|
properties:
|
||||||
user:
|
user:
|
||||||
$ref: '#/components/schemas/user'
|
$ref: '#/components/schemas/user_view'
|
||||||
comments:
|
comments:
|
||||||
$ref: '#/components/schemas/comments'
|
$ref: '#/components/schemas/comments'
|
||||||
op:
|
|
||||||
type: string
|
|
||||||
pattern: '^Search$'
|
|
||||||
default: 'Search'
|
|
||||||
getModLogRequest:
|
getModLogRequest:
|
||||||
name: Forthcoming...
|
name: Request the site's Modlog
|
||||||
payload:
|
payload:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1543,6 +1694,101 @@ components:
|
||||||
$ref: '#/components/schemas/page'
|
$ref: '#/components/schemas/page'
|
||||||
limit:
|
limit:
|
||||||
$ref: '#/components/schemas/limit'
|
$ref: '#/components/schemas/limit'
|
||||||
|
getModLogResponse:
|
||||||
|
name: Modlog request results
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^GetModLog$'
|
||||||
|
default: 'GetModLog'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
removed_posts:
|
||||||
|
type: array
|
||||||
|
locked_posts:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
mod_lock_post:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: number
|
||||||
|
example: 1
|
||||||
|
mod_user_id:
|
||||||
|
$ref: '#/components/schemas/user_id'
|
||||||
|
post_id:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: number
|
||||||
|
example: 223
|
||||||
|
locked:
|
||||||
|
description: Set to *true* if the post is locked
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
when_:
|
||||||
|
description: 'The date this post was locked (in [ISO8601 format](https://www.w3.org/TR/NOTE-datetime))'
|
||||||
|
type: string
|
||||||
|
example: '2021-01-26T14:15:21.922339'
|
||||||
|
moderator:
|
||||||
|
$ref: '#/components/schemas/creator'
|
||||||
|
post:
|
||||||
|
$ref: '#/components/schemas/post'
|
||||||
|
community:
|
||||||
|
$ref: '#/components/schemas/community'
|
||||||
|
stickied_posts:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
mod_sticky_post:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: number
|
||||||
|
example: 1
|
||||||
|
mod_user_id:
|
||||||
|
$ref: '#/components/schemas/user_id'
|
||||||
|
post_id:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: number
|
||||||
|
example: 223
|
||||||
|
stickied:
|
||||||
|
description: |-
|
||||||
|
Set to *true* if the post is 'sticky'
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
when_:
|
||||||
|
description: 'The date this post was made sticky (in [ISO8601 format](https://www.w3.org/TR/NOTE-datetime))'
|
||||||
|
type: string
|
||||||
|
example: '2021-01-26T14:16:03.899093'
|
||||||
|
moderator:
|
||||||
|
$ref: '#/components/schemas/creator'
|
||||||
|
post:
|
||||||
|
$ref: '#/components/schemas/post'
|
||||||
|
community:
|
||||||
|
$ref: '#/components/schemas/community'
|
||||||
|
removed_comments:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: array
|
||||||
|
removed_communities:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: array
|
||||||
|
banned_from_community:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: array
|
||||||
|
banned:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: array
|
||||||
|
added_to_community:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: array
|
||||||
|
added:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: array
|
||||||
createSiteRequest:
|
createSiteRequest:
|
||||||
name: Create Lemmy site on a server
|
name: Create Lemmy site on a server
|
||||||
payload:
|
payload:
|
||||||
|
@ -1620,7 +1866,6 @@ components:
|
||||||
$ref: '#/components/schemas/online'
|
$ref: '#/components/schemas/online'
|
||||||
admins:
|
admins:
|
||||||
type: array
|
type: array
|
||||||
uniqueItems: true
|
|
||||||
items:
|
items:
|
||||||
properties:
|
properties:
|
||||||
counts:
|
counts:
|
||||||
|
@ -1713,7 +1958,7 @@ components:
|
||||||
op:
|
op:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^GetSiteConfig$'
|
pattern: '^GetSiteConfig$'
|
||||||
default: '^GetSiteConfig$'
|
default: 'GetSiteConfig'
|
||||||
data:
|
data:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1727,7 +1972,7 @@ components:
|
||||||
op:
|
op:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^GetSiteConfig$'
|
pattern: '^GetSiteConfig$'
|
||||||
default: '^GetSiteConfig$'
|
default: 'GetSiteConfig'
|
||||||
data:
|
data:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1741,7 +1986,7 @@ components:
|
||||||
op:
|
op:
|
||||||
type: string
|
type: string
|
||||||
pattern: '^SaveSiteConfig$'
|
pattern: '^SaveSiteConfig$'
|
||||||
default: '^SaveSiteConfig$'
|
default: 'SaveSiteConfig'
|
||||||
data:
|
data:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1763,6 +2008,258 @@ components:
|
||||||
properties:
|
properties:
|
||||||
config_hjson:
|
config_hjson:
|
||||||
$ref: '#/components/schemas/config_hjson'
|
$ref: '#/components/schemas/config_hjson'
|
||||||
|
getCommunityRequest:
|
||||||
|
name: Request to get details of a commmunity
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^GetCommunity$'
|
||||||
|
default: 'GetCommunity'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
$ref: '#/components/schemas/community_id'
|
||||||
|
name:
|
||||||
|
$ref: '#/components/schemas/community_name'
|
||||||
|
auth:
|
||||||
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
|
getCommunityResponse:
|
||||||
|
name: Returns the details for a community
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^GetCommunity$'
|
||||||
|
default: 'GetCommunity'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community_view:
|
||||||
|
$ref: '#/components/schemas/community_view'
|
||||||
|
online:
|
||||||
|
type: number
|
||||||
|
moderators:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
moderator:
|
||||||
|
$ref: '#/components/schemas/creator'
|
||||||
|
community:
|
||||||
|
$ref: '#/components/schemas/community'
|
||||||
|
createCommunityRequest:
|
||||||
|
name: Request to get details of a commmunity
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^CreateCommunity$'
|
||||||
|
default: 'CreateCommunity'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
$ref: '#/components/schemas/community_name'
|
||||||
|
title:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: string
|
||||||
|
icon:
|
||||||
|
$ref: '#/components/schemas/icon'
|
||||||
|
banner:
|
||||||
|
$ref: '#/components/schemas/banner'
|
||||||
|
category_id:
|
||||||
|
$ref: '#/components/schemas/category_id'
|
||||||
|
nsfw:
|
||||||
|
$ref: '#/components/schemas/nsfw'
|
||||||
|
auth:
|
||||||
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
|
createCommunityResponse:
|
||||||
|
name: Response to the request to create a community
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^CreateCommunity$'
|
||||||
|
default: 'CreateCommunity'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community_view:
|
||||||
|
$ref: '#/components/schemas/community_view'
|
||||||
|
listCommunityRequest:
|
||||||
|
name: Request to get list of commmunities on the Lemmy server
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^ListCommunities$'
|
||||||
|
default: 'ListCommunities'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
type_:
|
||||||
|
$ref: '#/components/schemas/type_'
|
||||||
|
sort:
|
||||||
|
$ref: '#/components/schemas/sort'
|
||||||
|
page:
|
||||||
|
$ref: '#/components/schemas/page'
|
||||||
|
limit:
|
||||||
|
$ref: '#/components/schemas/limit'
|
||||||
|
auth:
|
||||||
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
|
listCommunityResponse:
|
||||||
|
name: Response to the request to create a community
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^ListCommunities$'
|
||||||
|
default: 'ListCommunities'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
communities:
|
||||||
|
type: array
|
||||||
|
$ref: '#/components/schemas/community_view'
|
||||||
|
banFromCommunityRequest:
|
||||||
|
name: Request to ban a user from a specified community.
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^BanFromCommunity$'
|
||||||
|
default: 'BanFromCommunity'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community_id:
|
||||||
|
$ref: '#/components/schemas/community_id'
|
||||||
|
user_id:
|
||||||
|
$ref: '#/components/schemas/user_id'
|
||||||
|
ban:
|
||||||
|
$ref: '#/components/schemas/ban'
|
||||||
|
remove_data:
|
||||||
|
$ref: '#/components/schemas/remove_data'
|
||||||
|
reason:
|
||||||
|
$ref: '#/components/schemas/reason'
|
||||||
|
expires:
|
||||||
|
$ref: '#/components/schemas/expires'
|
||||||
|
auth:
|
||||||
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
|
banFromCommunityResponse:
|
||||||
|
name: Response to the request to ban a user from a community
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^BanFromCommunity$'
|
||||||
|
default: 'BanFromCommunity'
|
||||||
|
data:
|
||||||
|
$ref: '#/components/schemas/ban_view'
|
||||||
|
addModToCommunityRequest:
|
||||||
|
name: Request to add a moderator to a community
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^AddModToCommunity$'
|
||||||
|
default: 'AddModToCommunity'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community_id:
|
||||||
|
$ref: '#/components/schemas/community_id'
|
||||||
|
user_id:
|
||||||
|
$ref: '#/components/schemas/user_id'
|
||||||
|
added:
|
||||||
|
$ref: '#/components/schemas/added'
|
||||||
|
auth:
|
||||||
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
|
transferCommunityRequest:
|
||||||
|
name: Request to transfer ownership of a community from one person to another
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^TransferCommunity$'
|
||||||
|
default: 'TransferCommunity'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community_id:
|
||||||
|
$ref: '#/components/schemas/community_id'
|
||||||
|
user_id:
|
||||||
|
$ref: '#/components/schemas/user_id'
|
||||||
|
auth:
|
||||||
|
$ref: '#/components/schemas/authStringSchema'
|
||||||
|
communityJoinRequest:
|
||||||
|
name: Forthcoming...
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^CommunityJoin$'
|
||||||
|
default: 'CommunityJoin'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community_id:
|
||||||
|
$ref: '#/components/schemas/community_id'
|
||||||
|
communityJoinResponse:
|
||||||
|
name: Forthcoming...
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^CommunityJoin$'
|
||||||
|
default: 'CommunityJoin'
|
||||||
|
data:
|
||||||
|
properties:
|
||||||
|
joined:
|
||||||
|
$ref: '#/components/schemas/joined'
|
||||||
|
modJoinRequest:
|
||||||
|
name: Forthcoming...
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^ModJoin$'
|
||||||
|
default: 'ModJoin'
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community_id:
|
||||||
|
$ref: '#/components/schemas/community_id'
|
||||||
|
modJoinResponse:
|
||||||
|
name: Forthcoming...
|
||||||
|
payload:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
op:
|
||||||
|
type: string
|
||||||
|
pattern: '^ModJoin$'
|
||||||
|
default: 'ModJoin'
|
||||||
|
data:
|
||||||
|
properties:
|
||||||
|
joined:
|
||||||
|
$ref: '#/components/schemas/joined'
|
||||||
schemas:
|
schemas:
|
||||||
'actor_id':
|
'actor_id':
|
||||||
type: string
|
type: string
|
||||||
|
@ -1771,6 +2268,10 @@ components:
|
||||||
- **User profile** - Site URL/u/username
|
- **User profile** - Site URL/u/username
|
||||||
- **Community home page** - Site URL/c/commmunity name
|
- **Community home page** - Site URL/c/commmunity name
|
||||||
example: 'https:\/\/enterprise.lemmy.ml\/u\/griddle'
|
example: 'https:\/\/enterprise.lemmy.ml\/u\/griddle'
|
||||||
|
'added':
|
||||||
|
description: Forthcoming...
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
'admin':
|
'admin':
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Set to *true* if this person is the Lemmy server administrator'
|
description: 'Set to *true* if this person is the Lemmy server administrator'
|
||||||
|
@ -1793,6 +2294,21 @@ components:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
description: Forthcoming...
|
description: Forthcoming...
|
||||||
|
'ban':
|
||||||
|
description: |-
|
||||||
|
- If set to *true*, ban the user
|
||||||
|
- If set to *false*, do not ban them (use in combination with `remove_data` to restore comments and posts that were previously removed as part of a banning process)
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
'ban_view':
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
$ref: '#/components/schemas/user_view'
|
||||||
|
banned:
|
||||||
|
description: Forthcoming...
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
'banned':
|
'banned':
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Set to *true* if this account (username) has been banned from posting on the Lemmy server'
|
description: 'Set to *true* if this account (username) has been banned from posting on the Lemmy server'
|
||||||
|
@ -1815,6 +2331,10 @@ components:
|
||||||
description: |-
|
description: |-
|
||||||
Matches the dropdown list in a community's *Category* setting. 1 = the topmost element, 2 = the second element, and so on.
|
Matches the dropdown list in a community's *Category* setting. 1 = the topmost element, 2 = the second element, and so on.
|
||||||
example: 15
|
example: 15
|
||||||
|
'category_name':
|
||||||
|
description: The category name
|
||||||
|
type: string
|
||||||
|
example: 'Politics'
|
||||||
'comment':
|
'comment':
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1852,6 +2372,10 @@ components:
|
||||||
$ref: '#/components/schemas/deleted'
|
$ref: '#/components/schemas/deleted'
|
||||||
published:
|
published:
|
||||||
$ref: '#/components/schemas/published'
|
$ref: '#/components/schemas/published'
|
||||||
|
'comment_count':
|
||||||
|
description: Total number of comments on the site or community
|
||||||
|
type: number
|
||||||
|
example: 231
|
||||||
'comments':
|
'comments':
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -1869,7 +2393,7 @@ components:
|
||||||
subscribed:
|
subscribed:
|
||||||
$ref: '#/components/schemas/subscribed'
|
$ref: '#/components/schemas/subscribed'
|
||||||
my_vote:
|
my_vote:
|
||||||
$ref: '#/components/schemas/subscribed'
|
$ref: '#/components/schemas/my_vote'
|
||||||
counts:
|
counts:
|
||||||
$ref: '#/components/schemas/counts'
|
$ref: '#/components/schemas/counts'
|
||||||
saved:
|
saved:
|
||||||
|
@ -1900,9 +2424,7 @@ components:
|
||||||
creator_id:
|
creator_id:
|
||||||
$ref: '#/components/schemas/creator_id'
|
$ref: '#/components/schemas/creator_id'
|
||||||
id:
|
id:
|
||||||
description: Forthcoming...
|
$ref: '#/components/schemas/community_id'
|
||||||
type: number
|
|
||||||
example: 239
|
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -1923,11 +2445,55 @@ components:
|
||||||
'community_id':
|
'community_id':
|
||||||
type: integer
|
type: integer
|
||||||
format: int32 # Or int64? It's stated as both in different parts of the API docs
|
format: int32 # Or int64? It's stated as both in different parts of the API docs
|
||||||
description: The id number for a community
|
description: 'The id number for a community. The main/frontpage `community_id` is 0'
|
||||||
|
example: 2
|
||||||
'community_name':
|
'community_name':
|
||||||
description: The name of a community
|
description: The name of a community
|
||||||
type: string
|
type: string
|
||||||
Example: 'The Default Community'
|
Example: 'main'
|
||||||
|
'community_view':
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
subscribed:
|
||||||
|
$ref: '#/components/schemas/subscribed'
|
||||||
|
counts:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
published:
|
||||||
|
$ref: '#/components/schemas/published'
|
||||||
|
community_id:
|
||||||
|
$ref: '#/components/schemas/community_id'
|
||||||
|
users_active_day:
|
||||||
|
$ref: '#/components/schemas/users_active_day'
|
||||||
|
id:
|
||||||
|
description: 'Forthcoming...'
|
||||||
|
type: number
|
||||||
|
example: 1
|
||||||
|
users_active_half_year:
|
||||||
|
$ref: '#/components/schemas/users_active_half_year'
|
||||||
|
comments:
|
||||||
|
$ref: '#/components/schemas/comment_count'
|
||||||
|
users_active_month:
|
||||||
|
$ref: '#/components/schemas/users_active_month'
|
||||||
|
subscribers:
|
||||||
|
description: The total number of community subscribers (members)
|
||||||
|
type: number
|
||||||
|
example: 41
|
||||||
|
posts:
|
||||||
|
$ref: '#/components/schemas/posts'
|
||||||
|
users_active_week:
|
||||||
|
$ref: '#/components/schemas/users_active_week'
|
||||||
|
community:
|
||||||
|
$ref: '#/components/schemas/community'
|
||||||
|
creator:
|
||||||
|
$ref: '#/components/schemas/creator'
|
||||||
|
category:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
$ref: '#/components/schemas/category_name'
|
||||||
|
id:
|
||||||
|
$ref: '#/components/schemas/category_id'
|
||||||
'config_hjson':
|
'config_hjson':
|
||||||
description: The configuration data for a Lemmy server (in JSON format)
|
description: The configuration data for a Lemmy server (in JSON format)
|
||||||
type: string
|
type: string
|
||||||
|
@ -2052,6 +2618,10 @@ components:
|
||||||
**(Required)** Set to *true* if downvoting is allowed on this site
|
**(Required)** Set to *true* if downvoting is allowed on this site
|
||||||
type: boolean
|
type: boolean
|
||||||
example: false
|
example: false
|
||||||
|
'expires':
|
||||||
|
description: Forthcoming...
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
'federated_instances':
|
'federated_instances':
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -2074,6 +2644,10 @@ components:
|
||||||
description: Forthcoming...
|
description: Forthcoming...
|
||||||
type: string
|
type: string
|
||||||
example: 'ds9.lemmy.ml'
|
example: 'ds9.lemmy.ml'
|
||||||
|
'joined':
|
||||||
|
description: '*true* if join request was successful'
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
'lang':
|
'lang':
|
||||||
description: |-
|
description: |-
|
||||||
The language to display Lemmy's interface in
|
The language to display Lemmy's interface in
|
||||||
|
@ -2246,6 +2820,10 @@ components:
|
||||||
type: string
|
type: string
|
||||||
description: 'The title of the post'
|
description: 'The title of the post'
|
||||||
example: 'Pot. Kettle. Black.'
|
example: 'Pot. Kettle. Black.'
|
||||||
|
'posts':
|
||||||
|
description: Total number of posts on the site or community
|
||||||
|
type: number
|
||||||
|
example: 115
|
||||||
'preferred_username':
|
'preferred_username':
|
||||||
type: string
|
type: string
|
||||||
description: 'If set, this is the name shown instead of, or as well as, *username* in some contexts (also known as **Display name**)'
|
description: 'If set, this is the name shown instead of, or as well as, *username* in some contexts (also known as **Display name**)'
|
||||||
|
@ -2299,10 +2877,20 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Set to *true* if this post, comment or message has been read
|
description: Set to *true* if this post, comment or message has been read
|
||||||
example: false
|
example: false
|
||||||
|
'reason':
|
||||||
|
description: Why was this user banned?
|
||||||
|
type: string
|
||||||
|
example: 'Breach of terms and conditions'
|
||||||
'recipient':
|
'recipient':
|
||||||
description: Forthcoming...
|
description: Forthcoming...
|
||||||
type: number
|
type: number
|
||||||
example: 77
|
example: 77
|
||||||
|
'remove_data':
|
||||||
|
description: |-
|
||||||
|
- If set to *true*, also delete that user's comments and posts
|
||||||
|
- If set *false*, *restore* that user's comments and posts
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
'removed':
|
'removed':
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Forthcoming...What is the difference between deletion and removal?
|
description: Forthcoming...What is the difference between deletion and removal?
|
||||||
|
@ -2399,17 +2987,11 @@ components:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
users_active_week:
|
users_active_week:
|
||||||
description: Forthcoming...
|
$ref: '#/components/schemas/users_active_week'
|
||||||
type: number
|
|
||||||
example: 5
|
|
||||||
posts:
|
posts:
|
||||||
description: Total number of posts on the site
|
$ref: '#/components/schemas/posts'
|
||||||
type: number
|
|
||||||
example: 115
|
|
||||||
comments:
|
comments:
|
||||||
description: Total number of comments on the site
|
$ref: '#/components/schemas/comment_count'
|
||||||
type: number
|
|
||||||
example: 231
|
|
||||||
communities:
|
communities:
|
||||||
description: Total number of communities on the site
|
description: Total number of communities on the site
|
||||||
type: number
|
type: number
|
||||||
|
@ -2427,17 +3009,11 @@ components:
|
||||||
type: number
|
type: number
|
||||||
example: 1
|
example: 1
|
||||||
users_active_day:
|
users_active_day:
|
||||||
desciption: Number of 'active' users in the previous 24 hours
|
$ref: '#/components/schemas/users_active_day'
|
||||||
type: number
|
|
||||||
example: 2
|
|
||||||
users_active_month:
|
users_active_month:
|
||||||
desciption: Number of 'active' users in the previous 28 days
|
$ref: '#/components/schemas/users_active_month'
|
||||||
type: number
|
|
||||||
example: 10
|
|
||||||
users_active_half_year:
|
users_active_half_year:
|
||||||
desciption: Number of 'active' users in the previous six months
|
$ref: '#/components/schemas/users_active_half_year'
|
||||||
type: number
|
|
||||||
example: 10
|
|
||||||
'site_description':
|
'site_description':
|
||||||
description: |-
|
description: |-
|
||||||
A brief overview of the site's purpose
|
A brief overview of the site's purpose
|
||||||
|
@ -2589,6 +3165,29 @@ components:
|
||||||
type: string
|
type: string
|
||||||
description: 'The last time this user profile was updated (in [ISO8601 format](https://www.w3.org/TR/NOTE-datetime))'
|
description: 'The last time this user profile was updated (in [ISO8601 format](https://www.w3.org/TR/NOTE-datetime))'
|
||||||
example: '2021-01-21T16:26:16.285610'
|
example: '2021-01-21T16:26:16.285610'
|
||||||
|
'user_view':
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
counts:
|
||||||
|
$ref: '#/components/schemas/counts'
|
||||||
|
user:
|
||||||
|
$ref: '#/components/schemas/user'
|
||||||
|
'users_active_day':
|
||||||
|
desciption: Number of 'active' users in the previous 24 hours
|
||||||
|
type: number
|
||||||
|
example: 2
|
||||||
|
'users_active_half_year':
|
||||||
|
desciption: Number of 'active' users in the previous six months
|
||||||
|
type: number
|
||||||
|
example: 10
|
||||||
|
'users_active_month':
|
||||||
|
desciption: Number of 'active' users in the previous 28 days
|
||||||
|
type: number
|
||||||
|
example: 10
|
||||||
|
'users_active_week':
|
||||||
|
description: Number of 'active' users in the previous seven days
|
||||||
|
type: number
|
||||||
|
example: 5
|
||||||
'version':
|
'version':
|
||||||
description: The version of the software running the Lemmy server
|
description: The version of the software running the Lemmy server
|
||||||
type: string
|
type: string
|
||||||
|
|
Loading…
Reference in a new issue