{
"openapi": "3.0.1",
"info": {
"title": "lotide API",
"version": "0.7.0-pre"
},
"components": {
"schemas": {
"PathUserID": {
"oneOf": [
{"type": "string", "enum": ["~me"]},
{"type": "integer"}
]
},
"SortType": {
"type": "string",
"enum": ["hot", "new"]
},
"LoginUserInfo": {
"type": "object",
"required": ["id", "username", "is_site_admin", "has_unread_notification"],
"properties": {
"id": {"type": "integer"},
"username": {"type": "string"},
"is_site_admin": {"type": "boolean"},
"has_unread_notification": {"type": "boolean"}
}
},
"MinimalCommentInfo": {
"type": "object",
"required": ["id"],
"properties": {
"id": {"type": "integer"},
"content_text": {"type": "string"},
"content_html": {"type": "string"}
}
},
"MinimalCommunityInfo": {
"type": "object",
"required": ["id", "username", "local", "host", "remote_url"],
"properties": {
"id": {"type": "integer"},
"name": {"type": "string"},
"local": {"type": "boolean"},
"host": {"type": "string"},
"remote_url": {"type": "string", "nullable": true}
}
},
"MinimalPostInfo": {
"type": "object",
"required": ["id", "title"],
"properties": {
"id": {"type": "integer"},
"title": {"type": "string"}
}
},
"NullableMinimalPostInfo": {
"type": "object",
"nullable": true,
"required": ["id", "title"],
"properties": {
"id": {"type": "integer"},
"title": {"type": "string"}
}
},
"MinimalUserInfo": {
"type": "object",
"required": ["id", "username", "local", "host", "remote_url"],
"properties": {
"id": {"type": "integer"},
"username": {"type": "string"},
"local": {"type": "boolean"},
"host": {"type": "string"},
"remote_url": {"type": "string", "nullable": true},
"avatar": {
"type": "object",
"required": ["url"],
"properties": {
"url": {"type": "string"}
}
}
}
},
"NullableMinimalUserInfo": {
"type": "object",
"nullable": true,
"required": ["id", "username", "local", "host", "remote_url"],
"properties": {
"id": {"type": "integer"},
"username": {"type": "string"},
"local": {"type": "boolean"},
"host": {"type": "string"},
"remote_url": {"type": "string", "nullable": true},
"avatar": {
"type": "object",
"required": ["url"],
"properties": {
"url": {"type": "string"}
}
}
}
},
"CommunityInfo": {
"allOf": [{"$ref": "#/components/schemas/MinimalCommunityInfo"}],
"type": "object",
"required": ["description"],
"properties": {
"description": {"type": "string"},
"you_are_moderator": {"type": "boolean"},
"your_follow": {
"type": "object",
"nullable": true,
"required": ["accepted"],
"properties": {
"accepted": {
"type": "boolean",
"description": "Whether your follow request has been accepted by the community."
}
}
}
}
},
"SomePostInfo": {
"type": "object",
"required": ["id", "title", "created", "community", "score"],
"properties": {
"id": {"type": "integer"},
"title": {"type": "string"},
"href": {"type": "string"},
"content_text": {
"type": "string",
"description": "Content in text form. Should be displayed if content_html is not present."
},
"content_html": {
"type": "string",
"description": "Content in HTML form."
},
"author": {
"$ref": "#/components/schemas/MinimalUserInfo"
},
"created": {"type": "string", "format": "date-time"},
"community": {
"type": "object",
"required": ["id", "name", "local", "host", "remote_url"],
"properties": {
"id": {"type": "integer"},
"name": {"type": "string"},
"local": {"type": "boolean"},
"host": {"type": "string"},
"remote_url": {"type": "string", "nullable": true}
}
},
"score": {"type": "integer"},
"your_vote": {"$ref": "#/components/schemas/YourVote"}
}
},
"PostListPost": {
"allOf": [
{"$ref": "#/components/schemas/SomePostInfo"},
{
"type": "object",
"required": ["replies_count_total"],
"properties": {
"replies_count_total": {"type": "integer"}
}
}
]
},
"PostCommentInfo": {
"type": "object",
"required": ["id", "content_text", "content_html", "author", "created", "deleted", "replies", "has_replies", "attachments", "local"],
"properties": {
"id": {"type": "integer"},
"content_text": {"type": "string", "nullable": true},
"content_html": {"type": "string", "nullable": true},
"attachments": {
"type": "array",
"items": {
"type": "object",
"required": ["url"],
"properties": {
"url": {"type": "string"}
}
}
},
"author": {
"$ref": "#/components/schemas/NullableMinimalUserInfo"
},
"created": {"type": "string", "format": "date-time"},
"deleted": {"type": "boolean"},
"local": {"type": "boolean"},
"replies": {
"type": "array",
"nullable": true,
"items": {"$ref": "#/components/schemas/PostCommentInfo"}
},
"has_replies": {"type": "boolean"},
"your_vote": {"$ref": "#/components/schemas/YourVote"}
}
},
"YourVote": {
"type": "object",
"nullable": true,
"description": "Will be null if you haven't voted, or an empty object if you have."
}
},
"securitySchemes": {
"bearer": {
"type": "http",
"description": "Token passed in Authorization header as Bearer",
"scheme": "bearer"
}
}
},
"paths": {
"/api/unstable/actors:lookup/{remoteID}": {
"get": {
"summary": "Look up a remote actor by WebFinger or ActivityPub ID",
"parameters": [
{
"name": "remoteID",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": ["id"],
"properties": {
"id": {"type": "integer"},
"type": {"type": "string", "enum": ["community", "user"]}
}
}
}
}
}
}
}
}
},
"/api/unstable/comments/{commentID}": {
"get": {
"summary": "Fetch a comment",
"parameters": [
{
"name": "commentID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "include_your",
"in": "query",
"required": false,
"schema": {"type": "boolean"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["id", "content_text", "content_html", "author", "created", "deleted", "replies", "has_replies", "parent", "post"],
"properties": {
"id": {"type": "integer"},
"content_text": {"type": "string", "nullable": true},
"content_html": {"type": "string", "nullable": true},
"author": {
"$ref": "#/components/schemas/NullableMinimalUserInfo"
},
"created": {"type": "string", "format": "date-time"},
"deleted": {"type": "boolean"},
"replies": {
"type": "array",
"nullable": true,
"items": {"$ref": "#/components/schemas/PostCommentInfo"}
},
"has_replies": {"type": "boolean"},
"your_vote": {"$ref": "#/components/schemas/YourVote"},
"parent": {
"type": "object",
"nullable": true,
"required": ["id"],
"properties": {
"id": {"type": "integer"}
}
},
"post": {"$ref": "#/components/schemas/NullableMinimalPostInfo"}
}
}
}
}
}
},
"security": [{"bearer": []}]
},
"delete": {
"summary": "Delete a comment",
"parameters": [
{
"name": "commentID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully deleted."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/comments/{commentID}/replies": {
"post": {
"summary": "Reply to a comment",
"parameters": [
{
"name": "commentID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content_text": {"type": "string"},
"content_markdown": {"type": "string"},
"attachment": {
"type": "string",
"description": "Must be a `local-media://` reference"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully created reply.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["id", "post"],
"properties": {
"id": {"type": "integer"},
"post": {
"type": "object",
"required": ["id"],
"properties": {
"id": {"type": "integer"}
}
}
}
}
}
}
}
}
}
},
"/api/unstable/comments/{commentID}/votes": {
"get": {
"summary": "List likers of a comment",
"parameters": [
{
"name": "commentID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "page",
"in": "query",
"required": true,
"schema": {"type": "string"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["items", "next_page"],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": ["user"],
"properties": {
"user": {"$ref": "#/components/schemas/MinimalUserInfo"}
}
}
},
"next_page": {
"type": "string",
"nullable": true
}
}
}
}
}
}
}
}
},
"/api/unstable/comments/{commentID}/your_vote": {
"put": {
"summary": "Like a comment",
"parameters": [
{
"name": "commentID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully liked."
}
},
"security": [{"bearer": []}]
},
"delete": {
"summary": "Retract a like of a comment",
"parameters": [
{
"name": "commentID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully unliked."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/communities": {
"get": {
"summary": "List communities",
"parameters": [
{
"name": "include_your",
"in": "query",
"required": false,
"schema": {"type": "boolean"},
"description": "If true, will include `you_are_moderator` and `your_follow` in list. Requires login."
},
{
"name": "search",
"in": "query",
"required": false,
"schema": {"type": "string"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CommunityInfo"
}
}
}
}
}
},
"security": [{"bearer": []}]
},
"post": {
"summary": "Create a community",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["name"],
"properties": {
"name": {"type": "string"}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["community"],
"properties": {
"community": {
"type": "object",
"required": ["id"],
"properties": {
"id": {"type": "integer"}
}
}
}
}
}
}
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/communities/{communityID}": {
"get": {
"summary": "Fetch community info",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "include_your",
"in": "query",
"required": false,
"schema": {"type": "boolean"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CommunityInfo"
}
}
}
}
},
"security": [{"bearer": []}]
},
"patch": {
"summary": "Edit community details",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {"type": "string"}
}
}
}
}
},
"responses": {
"204": {"description": "Successfully modified."}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/communities/{communityID}/follow": {
"post": {
"summary": "Follow a community",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"try_wait_for_accept": {
"type": "boolean",
"description": "If true, will wait before responding to give the remote server time to accept the follow"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully sent follow request.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["accepted"],
"properties": {
"accepted": {"type": "boolean"}
}
}
}
}
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/communities/{communityID}/moderators": {
"get": {
"summary": "List moderators of a community",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MinimalUserInfo"
}
}
}
}
}
}
}
},
"/api/unstable/communities/{communityID}/moderators/{userID}": {
"put": {
"summary": "Add a moderator to a community",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "userID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully added."
}
},
"security": [{"bearer": []}]
},
"delete": {
"summary": "Remove a moderator from a community",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "userID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully removed."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/communities/{communityID}/posts": {
"get": {
"summary": "List posts published to a community",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "sort",
"in": "query",
"required": false,
"schema": {"$ref": "#/components/schemas/SortType"}
},
{
"name": "include_your",
"in": "query",
"required": false,
"schema": {"type": "boolean"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {"$ref": "#/components/schemas/PostListPost"}
}
}
}
}
}
}
},
"/api/unstable/communities/{communityID}/posts/{postID}": {
"patch": {
"summary": "Modify a post's publishing state",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "postID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"approved": {"type": "boolean"}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully modified."
}
}
}
},
"/api/unstable/communities/{communityID}/unfollow": {
"post": {
"summary": "Unfollow a community",
"parameters": [
{
"name": "communityID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"202": {
"description": "Successfully unfollowed."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/forgot_password/keys": {
"post": {
"summary": "Request a password reset",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["email_address"],
"properties": {
"email_address": {"type": "string", "format": "email"}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully requested."
}
}
}
},
"/api/unstable/forgot_password/keys/{key}": {
"get": {
"summary": "Check validity of a password reset key",
"parameters": [
{
"name": "key",
"in": "path",
"required": true,
"schema": {"type": "string"}
}
],
"responses": {
"200": {
"description": "Key is valid."
},
"404": {
"description": "No such key, or is expired."
}
}
}
},
"/api/unstable/forgot_password/keys/{key}/reset": {
"post": {
"summary": "Reset a password using a password reset key",
"parameters": [
{
"name": "key",
"in": "path",
"required": true,
"schema": {"type": "string"}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["new_password"],
"properties": {
"new_password": {"type": "string", "format": "password"}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully reset."
}
}
}
},
"/api/unstable/instance": {
"get": {
"summary": "Fetch information about the instance",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["software"],
"properties": {
"software": {
"type": "object",
"required": ["name", "version"],
"properties": {
"name": {"type": "string", "example": "lotide"},
"version": {"type": "string", "example": "0.5.0-pre"}
}
}
}
}
}
}
}
}
},
"patch": {
"summary": "Modify instance settings",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {"type": "string"}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully modified."
}
}
}
},
"/api/unstable/logins": {
"post": {
"summary": "Log in to the service",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["username", "password"],
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully logged in.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["token", "user"],
"properties": {
"token": {"type": "string"},
"user": {
"$ref": "#/components/schemas/LoginUserInfo"
}
}
}
}
}
}
}
}
},
"/api/unstable/logins/~current": {
"get": {
"summary": "Fetch current login state",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"$ref": "#/components/schemas/LoginUserInfo"
}
}
}
}
}
}
},
"security": [{"bearer": []}]
},
"delete": {
"summary": "Log out",
"description": "Invalidates the current login session.",
"responses": {
"204": {
"description": "Successfully ended."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/media": {
"post": {
"summary": "Upload an image",
"description": "Uploads an image as hosted media. File content must be sent as the request body.",
"responses": {
"200": {
"description": "Successfully uploaded.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["id"],
"properties": {
"id": {"type": "string"}
}
}
}
}
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/misc/render_markdown": {
"post": {
"summary": "Preview Markdown rendering",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["content_markdown"],
"properties": {
"content_markdown": {"type": "string"}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["content_html"],
"properties": {
"content_html": {"type": "string"}
}
}
}
}
}
}
}
},
"/api/unstable/posts": {
"get": {
"summary": "List posts",
"parameters": [
{
"name": "include_your",
"in": "query",
"required": false,
"schema": {"type": "boolean"}
},
{
"name": "sort",
"in": "query",
"required": false,
"schema": {
"oneOf": [
{"$ref": "#/components/schemas/SortType"},
{"type": "string", "enum": ["relevant"]}
]
}
},
{
"name": "search",
"in": "query",
"required": false,
"schema": {"type": "string"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {"$ref": "#/components/schemas/PostListPost"}
}
}
}
}
}
},
"post": {
"summary": "Create a new post",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["community", "title"],
"properties": {
"community": {"type": "integer"},
"href": {
"type": "string",
"description": "URL target for the post. Can be set to a hosted media file by specifying `local-media://<id>`"
},
"content_markdown": {"type": "string"},
"content_text": {"type": "string"},
"title": {"type": "string"}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully created.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["id"],
"properties": {
"id": {"type": "integer"}
}
}
}
}
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/posts/{postID}": {
"get": {
"summary": "Fetch a post",
"parameters": [
{
"name": "postID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "include_your",
"in": "query",
"required": false,
"schema": {"type": "boolean"}
},
{
"name": "replies_sort",
"in": "query",
"required": false,
"schema": {"$ref": "#/components/schemas/SortType"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [{"$ref": "#/components/schemas/SomePostInfo"}],
"type": "object",
"required": ["approved", "local", "replies"],
"properties": {
"approved": {"type": "boolean"},
"local": {"type": "boolean"},
"replies": {
"type": "array",
"items": {"$ref": "#/components/schemas/PostCommentInfo"}
}
}
}
}
}
}
},
"security": [{"bearer": []}]
},
"delete": {
"summary": "Delete a post",
"parameters": [
{
"name": "postID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully deleted."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/posts/{postID}/replies": {
"post": {
"summary": "Reply to a post",
"parameters": [
{
"name": "postID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"content_text": {"type": "string"},
"content_markdown": {"type": "string"},
"attachment": {
"type": "string",
"description": "Must be a `local-media://` reference"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully created reply.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["id", "post"],
"properties": {
"id": {"type": "integer"}
}
}
}
}
}
}
}
},
"/api/unstable/posts/{postID}/votes": {
"get": {
"summary": "List likers of a post",
"parameters": [
{
"name": "postID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
},
{
"name": "page",
"in": "query",
"required": true,
"schema": {"type": "string"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["items", "next_page"],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": ["user"],
"properties": {
"user": {"$ref": "#/components/schemas/MinimalUserInfo"}
}
}
},
"next_page": {
"type": "string",
"nullable": true
}
}
}
}
}
}
}
}
},
"/api/unstable/posts/{postID}/your_vote": {
"put": {
"summary": "Like a post",
"parameters": [
{
"name": "postID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully liked."
}
},
"security": [{"bearer": []}]
},
"delete": {
"summary": "Retract a like of a post",
"parameters": [
{
"name": "postID",
"in": "path",
"required": true,
"schema": {"type": "integer"}
}
],
"responses": {
"204": {
"description": "Successfully unliked."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/users": {
"post": {
"summary": "Register a new account",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["username", "password"],
"properties": {
"username": {"type": "string"},
"password": {"type": "string"},
"email_address": {"type": "string", "format": "email"},
"login": {
"type": "boolean",
"description": "If true, will also create a login token for the new user"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["user"],
"properties": {
"user": {
"$ref": "#/components/schemas/LoginUserInfo"
},
"token": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/api/unstable/users/{userID}": {
"get": {
"summary": "Fetch information about a user",
"parameters": [
{
"name": "userID",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/PathUserID"}
},
{
"name": "include_your",
"in": "query",
"required": false,
"schema": {"type": "boolean"},
"description": "If true, will fetch your_note"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"allOf": [{"$ref": "#/components/schemas/MinimalUserInfo"}],
"type": "object",
"required": ["description"],
"properties": {
"description": {"type": "string"},
"your_note": {
"type": "string",
"nullable": true,
"description": "Private note about this user written by you"
}
}
}
}
}
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/users/{userID}/things": {
"get": {
"summary": "List content posted by a user",
"parameters": [
{
"name": "userID",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/PathUserID"}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": ["type", "id", "content_text", "content_html", "created", "post"],
"properties": {
"type": {"type": "string", "enum": ["comment"]},
"id": {"type": "integer"},
"content_text": {"type": "string", "nullable": true},
"content_html": {"type": "string", "nullable": true},
"created": {"type": "string", "format": "date-time"},
"post": {"$ref": "#/components/schemas/MinimalPostInfo"}
}
},
{
"type": "object",
"required": ["type", "id", "href", "title", "created", "community"],
"properties": {
"type": {"type": "string", "enum": ["post"]},
"id": {"type": "integer"},
"href": {"type": "string", "nullable": true},
"title": {"type": "string"},
"created": {"type": "string", "format": "date-time"},
"community": {"$ref": "#/components/schemas/MinimalCommunityInfo"}
}
}
]
}
}
}
}
}
}
}
},
"/api/unstable/users/{userID}/your_note": {
"put": {
"summary": "Edit your personal note for a user",
"parameters": [
{
"name": "userID",
"in": "path",
"required": true,
"schema": {"$ref": "#/components/schemas/PathUserID"}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["content_text"],
"properties": {
"content_text": {"type": "string"}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully set."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/users/~me": {
"patch": {
"summary": "Edit your account settings",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"description": {"type": "string"},
"email_address": {"type": "string", "format": "email"},
"password": {"type": "string", "format": "password"},
"avatar": {"type": "string", "description": "User profile image. Must be a `local-media://` link"}
}
}
}
}
},
"responses": {
"204": {
"description": "Successfully modified."
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/users/~me/following:posts": {
"get": {
"summary": "Fetch posts from all the communities you follow",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"allOf": [{"$ref": "#/components/schemas/PostListPost"}],
"type": "object",
"required": ["your_vote"],
"properties": {
"your_vote": {"$ref": "#/components/schemas/YourVote"}
}
}
}
}
}
}
},
"security": [{"bearer": []}]
}
},
"/api/unstable/users/~me/notifications": {
"get": {
"summary": "Fetch your notifications. Will also clear `has_unread_notifications`.",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": ["unseen", "type"],
"properties": {
"unseen": {
"type": "boolean",
"description": "Whether this notification was generated since the last time notifications were checked."
},
"type": {
"type": "string",
"enum": ["post_reply", "comment_reply"]
},
"reply": {
"$ref": "#/components/schemas/MinimalCommentInfo"
},
"post": {
"$ref": "#/components/schemas/MinimalPostInfo"
},
"comment": {"type": "integer"}
}
}
}
}
}
}
},
"security": [{"bearer": []}]
}
}
}
}