mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-25 05:06:38 +00:00
11394 lines
462 KiB
YAML
11394 lines
462 KiB
YAML
|
basePath: /
|
|||
|
definitions:
|
|||
|
FilterAction:
|
|||
|
title: FilterAction
|
|||
|
description: FilterAction 是针对与过滤规则匹配的贴文所执行的操作。
|
|||
|
type: string
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
InstanceConfigurationEmojis:
|
|||
|
properties:
|
|||
|
emoji_size_limit:
|
|||
|
description: 最大自定义表情文件大小(字节)。
|
|||
|
example: 51200
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: EmojiSizeLimit
|
|||
|
title: InstanceConfigurationEmojis
|
|||
|
description: InstanceConfigurationEmojis 结构体包含有关自定义表情的配置信息。
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
Link:
|
|||
|
description: Link 代表针对查询请求返回的链接组中的一个“链接”。详见 https://webfinger.net/ 和 https://www.rfc-editor.org/rfc/rfc6415.html#section-3.1
|
|||
|
properties:
|
|||
|
href:
|
|||
|
type: string
|
|||
|
x-go-name: Href
|
|||
|
rel:
|
|||
|
type: string
|
|||
|
x-go-name: Rel
|
|||
|
template:
|
|||
|
type: string
|
|||
|
x-go-name: Template
|
|||
|
type:
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
title: Link
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
Mention:
|
|||
|
properties:
|
|||
|
acct:
|
|||
|
description: |-
|
|||
|
通过webfinger发现的帐户URI。
|
|||
|
对于本站用户,等于"用户名",对于外站用户,等于"用户名@域名"。
|
|||
|
example: some_user@example.org
|
|||
|
type: string
|
|||
|
x-go-name: Acct
|
|||
|
id:
|
|||
|
description: 被提及的帐户的ID。
|
|||
|
example: 01FBYJHQWQZAVWFRK9PDYTKGMB
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
url:
|
|||
|
description: 被提及的账户的Web资料页。
|
|||
|
example: https://example.org/@some_user
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
username:
|
|||
|
description: 被提及账户的用户名。
|
|||
|
example: some_user
|
|||
|
type: string
|
|||
|
x-go-name: Username
|
|||
|
title: Mention
|
|||
|
description: Mention 表示对另一个账户的一次提及。
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
NodeInfoServices:
|
|||
|
properties:
|
|||
|
inbound:
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Inbound
|
|||
|
outbound:
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Outbound
|
|||
|
title: NodeInfoServices
|
|||
|
description: 表示此节点对入站和出站连接提供的服务。
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
NodeInfoSoftware:
|
|||
|
properties:
|
|||
|
name:
|
|||
|
example: gotosocial
|
|||
|
type: string
|
|||
|
x-go-name: Name
|
|||
|
version:
|
|||
|
example: 0.1.2 1234567
|
|||
|
type: string
|
|||
|
x-go-name: Version
|
|||
|
title: NodeInfoSoftware
|
|||
|
description: NodeInfoSoftware 表示此节点软件的名称和版本号。
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
NodeInfoUsage:
|
|||
|
properties:
|
|||
|
localPosts:
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: LocalPosts
|
|||
|
users:
|
|||
|
$ref: '#/definitions/NodeInfoUsers'
|
|||
|
title: NodeInfoUsage
|
|||
|
description: 表示有关此服务器的使用信息,例如用户数量。
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
NodeInfoUsers:
|
|||
|
properties:
|
|||
|
total:
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: Total
|
|||
|
title: NodeInfoUsers
|
|||
|
description: NodeInfoUsers 表示有关服务器上用户的聚合信息。
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
Source:
|
|||
|
description: Source 表示用户自己账户的内容展示或发布偏好。在验证和更新凭据时,作为 Account 的一个属性返回的附加实体。
|
|||
|
properties:
|
|||
|
also_known_as_uris:
|
|||
|
description: |-
|
|||
|
要设置此值,请调用 `/api/v1/accounts/alias`。
|
|||
|
|
|||
|
若为空或为设置,将从json中省略。
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: AlsoKnownAsURIs
|
|||
|
fields:
|
|||
|
description: 此账户的元数据。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/field'
|
|||
|
type: array
|
|||
|
x-go-name: Fields
|
|||
|
follow_requests_count:
|
|||
|
description: 待处理的关注请求数量。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FollowRequestsCount
|
|||
|
language:
|
|||
|
description: 新贴文的默认发布语言。
|
|||
|
type: string
|
|||
|
x-go-name: Language
|
|||
|
note:
|
|||
|
description: 个人资料简介。
|
|||
|
type: string
|
|||
|
x-go-name: Note
|
|||
|
privacy:
|
|||
|
description: |-
|
|||
|
新贴文的默认可见性。
|
|||
|
public = 公开贴文
|
|||
|
unlisted = 未列出/不公开/悄悄公开贴文
|
|||
|
private = 仅粉丝可见的贴文
|
|||
|
direct = 私信贴文
|
|||
|
type: string
|
|||
|
x-go-name: Privacy
|
|||
|
sensitive:
|
|||
|
description: 是否将新贴文默认标记为敏感。
|
|||
|
type: boolean
|
|||
|
x-go-name: Sensitive
|
|||
|
status_content_type:
|
|||
|
description: 新贴文的默认内容格式。
|
|||
|
type: string
|
|||
|
x-go-name: StatusContentType
|
|||
|
web_visibility:
|
|||
|
description: |-
|
|||
|
通过网页端API显示的该账户下贴文的最低可见性。
|
|||
|
"public" = 默认值,此时仅显示公开贴文。
|
|||
|
"unlisted" = 显示公开贴文 *和* 未列出的贴文。
|
|||
|
"none" = 不在网页端显示任何贴文,即使贴文为公开贴文。
|
|||
|
type: string
|
|||
|
x-go-name: WebVisibility
|
|||
|
title: Source
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
TimelineMarker:
|
|||
|
properties:
|
|||
|
last_read_id:
|
|||
|
description: 最近查看的内容实体的ID。
|
|||
|
type: string
|
|||
|
x-go-name: LastReadID
|
|||
|
updated_at:
|
|||
|
description: 设定标记时的时间戳 (ISO 8601 Datetime)。
|
|||
|
type: string
|
|||
|
x-go-name: UpdatedAt
|
|||
|
version:
|
|||
|
description: 用于锁定以防止写冲突。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: Version
|
|||
|
title: TimelineMarker
|
|||
|
description: TimelineMarker 包含有关用户在特定时间线上的阅读进度的信息。
|
|||
|
type: object
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
account:
|
|||
|
description: Account 是一个 Fediverse 账户的抽象模型。被抽象的账户可以是本站账户,也可以是外站账户。
|
|||
|
properties:
|
|||
|
acct:
|
|||
|
description: |-
|
|||
|
通过 WebFinger 发现的帐户 URI。
|
|||
|
对于本站用户,等于“用户名”,对于外站用户,等于“用户名@域名”。
|
|||
|
example: some_user@example.org
|
|||
|
type: string
|
|||
|
x-go-name: Acct
|
|||
|
avatar:
|
|||
|
description: 账户头像的网络地址。
|
|||
|
example: https://example.org/media/some_user/avatar/original/avatar.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: Avatar
|
|||
|
avatar_description:
|
|||
|
description: 该账户头像的文字描述,用于提供 Alt 文本。
|
|||
|
example: 一只微笑的树懒的可爱图画。
|
|||
|
type: string
|
|||
|
x-go-name: AvatarDescription
|
|||
|
avatar_media_id:
|
|||
|
description: |-
|
|||
|
此账户的头像对应的媒体附件的数据库 ID。
|
|||
|
如果此账户没有上传头像(即默认头像),则省略。
|
|||
|
example: 01JAJ3XCD66K3T99JZESCR137W
|
|||
|
type: string
|
|||
|
x-go-name: AvatarMediaID
|
|||
|
avatar_static:
|
|||
|
description: |-
|
|||
|
该账户头像的静态版本的网络地址。
|
|||
|
仅在账户的主头像是视频或 gif 时才起实际作用。
|
|||
|
example: https://example.org/media/some_user/avatar/static/avatar.png
|
|||
|
type: string
|
|||
|
x-go-name: AvatarStatic
|
|||
|
bot:
|
|||
|
description: 表示账户是一个机器人。
|
|||
|
type: boolean
|
|||
|
x-go-name: Bot
|
|||
|
created_at:
|
|||
|
description: 账户创建时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
custom_css:
|
|||
|
description: 渲染该账户的资料页或贴文页时要包含的自定义 CSS。
|
|||
|
type: string
|
|||
|
x-go-name: CustomCSS
|
|||
|
discoverable:
|
|||
|
description: 表示账户已选择加入内容发现功能。
|
|||
|
type: boolean
|
|||
|
x-go-name: Discoverable
|
|||
|
display_name:
|
|||
|
description: 该账户的昵称
|
|||
|
example: 树懒一号
|
|||
|
type: string
|
|||
|
x-go-name: DisplayName
|
|||
|
emojis:
|
|||
|
description: |-
|
|||
|
该账户的简介或昵称中使用的自定义表情组成的数组。
|
|||
|
如果账户被屏蔽,则始终为空。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
type: array
|
|||
|
x-go-name: Emojis
|
|||
|
enable_rss:
|
|||
|
description: |-
|
|||
|
账户已启用 RSS 订阅。
|
|||
|
如果为 false,则省略键/值。
|
|||
|
type: boolean
|
|||
|
x-go-name: EnableRSS
|
|||
|
fields:
|
|||
|
description: |-
|
|||
|
账户设置的附加元数据。
|
|||
|
如果账户被屏蔽,则始终为空。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/field'
|
|||
|
type: array
|
|||
|
x-go-name: Fields
|
|||
|
followers_count:
|
|||
|
description: 该账户的粉丝数量(数据来源于本站)。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FollowersCount
|
|||
|
following_count:
|
|||
|
description: 该账户关注的账户数量(数据来源于本站)。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FollowingCount
|
|||
|
header:
|
|||
|
description: 该账户的资料卡横幅背景图片的网络地址。
|
|||
|
example: https://example.org/media/some_user/header/original/header.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: Header
|
|||
|
header_description:
|
|||
|
description: 该账户的资料卡横幅背景图片的文字描述,用于提供 Alt 文本。
|
|||
|
example: 一只树懒和一只小象在一起的可爱图画。
|
|||
|
type: string
|
|||
|
x-go-name: HeaderDescription
|
|||
|
header_media_id:
|
|||
|
description: |-
|
|||
|
此账户的资料卡横幅背景图片对应的媒体附件的数据库 ID。
|
|||
|
如果此账户没有上传资料卡横幅背景图(即使用默认横幅背景),则省略。
|
|||
|
example: 01JAJ3XCD66K3T99JZESCR137W
|
|||
|
type: string
|
|||
|
x-go-name: HeaderMediaID
|
|||
|
header_static:
|
|||
|
description: |-
|
|||
|
该账户的资料卡横幅背景图片的静态版本的网络地址。
|
|||
|
仅在账户的资料卡横幅背景图片是视频或 gif 时才起实际作用。
|
|||
|
example: https://example.org/media/some_user/header/static/header.png
|
|||
|
type: string
|
|||
|
x-go-name: HeaderStatic
|
|||
|
hide_collections:
|
|||
|
description: |-
|
|||
|
账户选择隐藏其粉丝/关注数据。
|
|||
|
如果为 false,则省略键/值。
|
|||
|
type: boolean
|
|||
|
x-go-name: HideCollections
|
|||
|
id:
|
|||
|
description: 账户的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
last_status_at:
|
|||
|
description: 账户最近一条贴文的发布时间 (ISO 8601 Date)。
|
|||
|
example: "2021-07-30"
|
|||
|
type: string
|
|||
|
x-go-name: LastStatusAt
|
|||
|
locked:
|
|||
|
description: 账户选择手动批准关注请求。
|
|||
|
type: boolean
|
|||
|
x-go-name: Locked
|
|||
|
moved:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
note:
|
|||
|
description: 账户的简介。
|
|||
|
type: string
|
|||
|
x-go-name: Note
|
|||
|
role:
|
|||
|
$ref: '#/definitions/accountRole'
|
|||
|
roles:
|
|||
|
description: |-
|
|||
|
Roles 列出了账户在本站上的公开身份组。
|
|||
|
与 Role 不同,Roles 始终可用,但从不包含权限细节。
|
|||
|
对于外站账户,键/值被省略。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/accountDisplayRole'
|
|||
|
type: array
|
|||
|
x-go-name: Roles
|
|||
|
source:
|
|||
|
$ref: '#/definitions/Source'
|
|||
|
statuses_count:
|
|||
|
description: Number of statuses posted by this account, according to our instance. 账户发布的贴文数量 (数据来源于本站)。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: StatusesCount
|
|||
|
suspended:
|
|||
|
description: 账户已被本站封禁。
|
|||
|
type: boolean
|
|||
|
x-go-name: Suspended
|
|||
|
theme:
|
|||
|
description: 用户选择的 CSS 主题文件名,用于在渲染此账户的资料页或贴文页时包含。
|
|||
|
type: string
|
|||
|
x-go-name: Theme
|
|||
|
url:
|
|||
|
description: 账户资料页的 Web 地址。
|
|||
|
example: https://example.org/@some_user
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
username:
|
|||
|
description: 账户的用户名,不包括域名。
|
|||
|
example: some_user
|
|||
|
type: string
|
|||
|
x-go-name: Username
|
|||
|
title: Account
|
|||
|
type: object
|
|||
|
x-go-name: Account
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
accountDisplayRole:
|
|||
|
description: AccountDisplayRole 是账户的公开、可显示身份组的抽象模型。它是 AccountRole 的一个子集。
|
|||
|
properties:
|
|||
|
color:
|
|||
|
description: |-
|
|||
|
Color 是一个带有前导 `#` 的 6 位 CSS 风格十六进制颜色码,如果此身份组没有设置颜色,则为空字符串。
|
|||
|
GotoSocial 不使用身份组颜色,因此我们将其留空。
|
|||
|
type: string
|
|||
|
x-go-name: Color
|
|||
|
id:
|
|||
|
description: |-
|
|||
|
身份组的 ID。
|
|||
|
GotoSocial 不使用该属性,但我们将其设置为身份组名称,以防客户端期望唯一 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
name:
|
|||
|
description: 身份组的名称。
|
|||
|
type: string
|
|||
|
x-go-name: Name
|
|||
|
title: AccountDisplayRole
|
|||
|
type: object
|
|||
|
x-go-name: AccountDisplayRole
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
accountExportStats:
|
|||
|
description: |-
|
|||
|
AccountExportStats 专门用于在 /api/v1/exports/stats 端点上通知有关导出大小的账户统计信息。
|
|||
|
properties:
|
|||
|
blocks_count:
|
|||
|
description: 被此账户屏蔽的账户数量。
|
|||
|
example: 15
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: BlocksCount
|
|||
|
followers_count:
|
|||
|
description: 此账户的粉丝数量。
|
|||
|
example: 50
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FollowersCount
|
|||
|
following_count:
|
|||
|
description: 此账户关注的账户数量。
|
|||
|
example: 50
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FollowingCount
|
|||
|
lists_count:
|
|||
|
description: 此账户创建的列表数量。
|
|||
|
example: 10
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: ListsCount
|
|||
|
media_storage:
|
|||
|
description: 'TODO: 此账户使用的媒体存储空间大小的字符串表示。'
|
|||
|
example: 500MB
|
|||
|
type: string
|
|||
|
x-go-name: MediaStorage
|
|||
|
mutes_count:
|
|||
|
description: 此账户静音/隐藏的账户数量。
|
|||
|
example: 11
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MutesCount
|
|||
|
statuses_count:
|
|||
|
description: 此账户发布的贴文数量。
|
|||
|
example: 81986
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: StatusesCount
|
|||
|
type: object
|
|||
|
x-go-name: AccountExportStats
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
accountRelationship:
|
|||
|
properties:
|
|||
|
blocked_by:
|
|||
|
description: 你被此账户屏蔽。
|
|||
|
type: boolean
|
|||
|
x-go-name: BlockedBy
|
|||
|
blocking:
|
|||
|
description: 你屏蔽了此账户。
|
|||
|
type: boolean
|
|||
|
x-go-name: Blocking
|
|||
|
domain_blocking:
|
|||
|
description: 你屏蔽了此账户所在的实例。
|
|||
|
type: boolean
|
|||
|
x-go-name: DomainBlocking
|
|||
|
endorsed:
|
|||
|
description: 你在你的资料页上展示了此账户。
|
|||
|
type: boolean
|
|||
|
x-go-name: Endorsed
|
|||
|
followed_by:
|
|||
|
description: 此账户关注了你。
|
|||
|
type: boolean
|
|||
|
x-go-name: FollowedBy
|
|||
|
following:
|
|||
|
description: 你关注了此账户。
|
|||
|
type: boolean
|
|||
|
x-go-name: Following
|
|||
|
id:
|
|||
|
description: 账户 ID。
|
|||
|
example: 01FBW9XGEP7G6K88VY4S9MPE1R
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
muting:
|
|||
|
description: 你静音/隐藏了此账户。
|
|||
|
type: boolean
|
|||
|
x-go-name: Muting
|
|||
|
muting_notifications:
|
|||
|
description: 你静音/隐藏了此账户的通知。
|
|||
|
type: boolean
|
|||
|
x-go-name: MutingNotifications
|
|||
|
note:
|
|||
|
description: 你对此账户的备注。
|
|||
|
type: string
|
|||
|
x-go-name: Note
|
|||
|
notifying:
|
|||
|
description: 你在此账户发布贴文时收到通知。
|
|||
|
type: boolean
|
|||
|
x-go-name: Notifying
|
|||
|
requested:
|
|||
|
description: 你向此账户发送了关注请求,请求正在等待对方处理。
|
|||
|
type: boolean
|
|||
|
x-go-name: Requested
|
|||
|
requested_by:
|
|||
|
description: 此账户请求关注你,请求正在等待你处理。
|
|||
|
type: boolean
|
|||
|
x-go-name: RequestedBy
|
|||
|
showing_reblogs:
|
|||
|
description: 你选择在主页时间线上看到此账户转发的贴文。
|
|||
|
type: boolean
|
|||
|
x-go-name: ShowingReblogs
|
|||
|
title: Relationship
|
|||
|
description: Relationship 表示账户之间的关系。
|
|||
|
type: object
|
|||
|
x-go-name: Relationship
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
accountRole:
|
|||
|
properties:
|
|||
|
color:
|
|||
|
description: |-
|
|||
|
Color 是一个带有 `#` 前缀的 6 位 CSS 风格十六进制颜色码,如果此身份组没有设置颜色,则为空字符串。
|
|||
|
GotoSocial 不使用身份组颜色,因此我们将其留空。
|
|||
|
type: string
|
|||
|
x-go-name: Color
|
|||
|
highlighted:
|
|||
|
description: |-
|
|||
|
Highlighted 表示该身份组是否在用户资料页上公开显示。
|
|||
|
对于 GotoSocial 内置的管理员和站务身份组,此值始终为 true,否则为 false。
|
|||
|
type: boolean
|
|||
|
x-go-name: Highlighted
|
|||
|
id:
|
|||
|
description: |-
|
|||
|
该身份组的 ID。
|
|||
|
GotoSocial 不使用该属性,但我们将其设置为身份组名称,以防客户端期望唯一 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
name:
|
|||
|
description: 身份组的名称。
|
|||
|
type: string
|
|||
|
x-go-name: Name
|
|||
|
permissions:
|
|||
|
description: Permissions 是一个按位序列化的数字字符串,指示用户可以执行哪些管理员/站务操作。
|
|||
|
type: string
|
|||
|
x-go-name: Permissions
|
|||
|
title: AccountRole
|
|||
|
description: AccountRole 是账户的身份组的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: AccountRole
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
adminAccountInfo:
|
|||
|
properties:
|
|||
|
account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
approved:
|
|||
|
description: 账户是否已被批准。
|
|||
|
type: boolean
|
|||
|
x-go-name: Approved
|
|||
|
confirmed:
|
|||
|
description: 账户是否已验证其电子邮件地址。
|
|||
|
type: boolean
|
|||
|
x-go-name: Confirmed
|
|||
|
created_at:
|
|||
|
description: 账户首次被发现的时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
created_by_application_id:
|
|||
|
description: 创建此账户的应用程序的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: CreatedByApplicationID
|
|||
|
disabled:
|
|||
|
description: 账户目前是否已被停用。
|
|||
|
type: boolean
|
|||
|
x-go-name: Disabled
|
|||
|
domain:
|
|||
|
description: |-
|
|||
|
账户所在实例的域名。
|
|||
|
对于本站账户,为 null。
|
|||
|
example: example.org
|
|||
|
type: string
|
|||
|
x-go-name: Domain
|
|||
|
email:
|
|||
|
description: |-
|
|||
|
与账户关联的电子邮件地址。
|
|||
|
对于外站账户或没有已知电子邮件地址的账户,为空字符串。
|
|||
|
example: someone@somewhere.com
|
|||
|
type: string
|
|||
|
x-go-name: Email
|
|||
|
id:
|
|||
|
description: 该账户在数据库中的 ID。
|
|||
|
example: 01GQ4PHNT622DQ9X95XQX4KKNR
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
invite_request:
|
|||
|
description: |-
|
|||
|
账户填写的注册理由。
|
|||
|
如果未提供理由或为外站账户,则为 null。
|
|||
|
example: 快给爷通过a!!
|
|||
|
type: string
|
|||
|
x-go-name: InviteRequest
|
|||
|
invited_by_account_id:
|
|||
|
description: 邀请此用户的账户的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: InvitedByAccountID
|
|||
|
ip:
|
|||
|
description: |-
|
|||
|
此账户上次登录的 IP 地址。
|
|||
|
如果未知,则为 null。
|
|||
|
example: 192.0.2.1
|
|||
|
type: string
|
|||
|
x-go-name: IP
|
|||
|
ips:
|
|||
|
description: |-
|
|||
|
与此账户关联的所有已知 IP 地址。
|
|||
|
未实现(将始终为空数组)。
|
|||
|
example: []
|
|||
|
items: {}
|
|||
|
type: array
|
|||
|
x-go-name: IPs
|
|||
|
locale:
|
|||
|
description: The locale of the account. (ISO 639 Part 1 two-letter language code) 账户的语言偏好。 (ISO 639 Part 1 两字母语言代码)
|
|||
|
example: zh
|
|||
|
type: string
|
|||
|
x-go-name: Locale
|
|||
|
role:
|
|||
|
$ref: '#/definitions/accountRole'
|
|||
|
silenced:
|
|||
|
description: 此账户是否被静音/隐藏。
|
|||
|
type: boolean
|
|||
|
x-go-name: Silenced
|
|||
|
suspended:
|
|||
|
description: 账户目前是否已被封禁。
|
|||
|
type: boolean
|
|||
|
x-go-name: Suspended
|
|||
|
username:
|
|||
|
description: 账户的用户名。
|
|||
|
example: dril
|
|||
|
type: string
|
|||
|
x-go-name: Username
|
|||
|
title: AdminAccountInfo
|
|||
|
description: AdminAccountInfo 是管理员视图下账户详情的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: AdminAccountInfo
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
adminActionResponse:
|
|||
|
description: |-
|
|||
|
AdminActionResponse 是服务器对管理员操作的响应的抽象模型。
|
|||
|
properties:
|
|||
|
action_id:
|
|||
|
description: 操作的内部 ID。
|
|||
|
example: 01H9QG6TZ9W5P0402VFRVM17TH
|
|||
|
type: string
|
|||
|
x-go-name: ActionID
|
|||
|
type: object
|
|||
|
x-go-name: AdminActionResponse
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
adminEmoji:
|
|||
|
properties:
|
|||
|
category:
|
|||
|
description: 于在表情选择器中对自定义表情进行排序。
|
|||
|
example: blobcats
|
|||
|
type: string
|
|||
|
x-go-name: Category
|
|||
|
content_type:
|
|||
|
description: 该表情的 MIME 内容类型。
|
|||
|
example: image/png
|
|||
|
type: string
|
|||
|
x-go-name: ContentType
|
|||
|
disabled:
|
|||
|
description: 若此表情已被管理员操作禁用,则为 true。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Disabled
|
|||
|
domain:
|
|||
|
description: 该表情的来源实例域名。仅用于外站域名,否则键/值将不会设置。
|
|||
|
example: example.org
|
|||
|
type: string
|
|||
|
x-go-name: Domain
|
|||
|
id:
|
|||
|
description: 该表情的 ID。
|
|||
|
example: 01GEM7SFDZ7GZNRXFVZ3X4E4N1
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
shortcode:
|
|||
|
description: 自定义表情的名称。
|
|||
|
example: blobcat_uwu
|
|||
|
type: string
|
|||
|
x-go-name: Shortcode
|
|||
|
static_url:
|
|||
|
description: 一个指向此自定义表情的静态副本的链接。
|
|||
|
example: https://example.org/fileserver/emojis/blogcat_uwu.png
|
|||
|
type: string
|
|||
|
x-go-name: StaticURL
|
|||
|
total_file_size:
|
|||
|
description: 表情占用的总文件大小(字节),包括静态和动画版本。
|
|||
|
example: 69420
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: TotalFileSize
|
|||
|
updated_at:
|
|||
|
description: 该表情的最后更新时间。
|
|||
|
example: "2022-10-05T09:21:26.419Z"
|
|||
|
type: string
|
|||
|
x-go-name: UpdatedAt
|
|||
|
uri:
|
|||
|
description: 该表情的 ActivityPub URI。
|
|||
|
example: https://example.org/emojis/016T5Q3SQKBT337DAKVSKNXXW1
|
|||
|
type: string
|
|||
|
x-go-name: URI
|
|||
|
url:
|
|||
|
description: 该自定义表情的 Web URL。
|
|||
|
example: https://example.org/fileserver/emojis/blogcat_uwu.gif
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
visible_in_picker:
|
|||
|
description: 该表情是否在实例的表情选择器中可见。
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: VisibleInPicker
|
|||
|
title: AdminEmoji
|
|||
|
description: AdminEmoji 是管理员视图下自定义表情的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: AdminEmoji
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
adminReport:
|
|||
|
properties:
|
|||
|
account:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
action_taken:
|
|||
|
description: 管理员是否已对该举报采取行动。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: ActionTaken
|
|||
|
action_taken_at:
|
|||
|
description: |-
|
|||
|
若已采取行动,在何时采取的行动? (ISO 8601 Datetime)
|
|||
|
如果未设置/尚未采取行动,则为null。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: ActionTakenAt
|
|||
|
action_taken_by_account:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
action_taken_comment:
|
|||
|
description: |-
|
|||
|
若已采取行动,管理员对采取的行动做了什么评论?
|
|||
|
如果未设置/尚未采取行动,则为null。
|
|||
|
example: 账户已被封禁。
|
|||
|
type: string
|
|||
|
x-go-name: ActionTakenComment
|
|||
|
assigned_account:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
category:
|
|||
|
description: 该举报的类别是?
|
|||
|
example: spam
|
|||
|
type: string
|
|||
|
x-go-name: Category
|
|||
|
comment:
|
|||
|
description: |-
|
|||
|
该举报创建时提交的评论。
|
|||
|
如果未提交评论,则为空。
|
|||
|
example: 此人一直在骚扰我。
|
|||
|
type: string
|
|||
|
x-go-name: Comment
|
|||
|
created_at:
|
|||
|
description: 举报创建时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
forwarded:
|
|||
|
description: 用于指示是否应将举报抄送外站实例的布尔值。
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: Forwarded
|
|||
|
id:
|
|||
|
description: 举报的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
rules:
|
|||
|
description: |-
|
|||
|
该举报中提交的违反的规则数组。
|
|||
|
如果未提交规则 ID,则为空。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
type: array
|
|||
|
x-go-name: Rules
|
|||
|
statuses:
|
|||
|
description: |-
|
|||
|
该举报中提交的贴文数组。
|
|||
|
如果未提交贴文 ID,则为空。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
x-go-name: Statuses
|
|||
|
target_account:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
updated_at:
|
|||
|
description: 针对此举报的最后一次操作的操作时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: UpdatedAt
|
|||
|
title: AdminReport
|
|||
|
description: AdminReport 是管理员视图下举报的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: AdminReport
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
application:
|
|||
|
properties:
|
|||
|
client_id:
|
|||
|
description: 应用程序关联的客户端 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ClientID
|
|||
|
client_secret:
|
|||
|
description: 应用程序关联的客户端密钥。
|
|||
|
type: string
|
|||
|
x-go-name: ClientSecret
|
|||
|
id:
|
|||
|
description: 应用程序的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
name:
|
|||
|
description: 应用程序的名称。
|
|||
|
example: Moshidon
|
|||
|
type: string
|
|||
|
x-go-name: Name
|
|||
|
redirect_uri:
|
|||
|
description: 授权后重定向 URI,用于应用程序 (OAuth2)。
|
|||
|
example: https://example.org/callback?some=query
|
|||
|
type: string
|
|||
|
x-go-name: RedirectURI
|
|||
|
vapid_key:
|
|||
|
description: 用于推送 API 的密钥。
|
|||
|
type: string
|
|||
|
x-go-name: VapidKey
|
|||
|
website:
|
|||
|
description: 与应用程序关联的网站 (url)。
|
|||
|
example: https://tusky.app
|
|||
|
type: string
|
|||
|
x-go-name: Website
|
|||
|
title: Application
|
|||
|
description: Application 是对 API 应用程序的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: Application
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
attachment:
|
|||
|
properties:
|
|||
|
blurhash:
|
|||
|
description: |-
|
|||
|
通过 BlurHash 算法计算的哈希,用于在媒体尚未下载时生成彩色预览缩略图。
|
|||
|
参见 https://github.com/woltapp/blurhash
|
|||
|
type: string
|
|||
|
x-go-name: Blurhash
|
|||
|
description:
|
|||
|
description: 用于描述媒体附件内容的 Alt 文本。
|
|||
|
example: 一只橘猫在阳光下打盹。
|
|||
|
type: string
|
|||
|
x-go-name: Description
|
|||
|
id:
|
|||
|
description: 媒体附件的 ID。
|
|||
|
example: 01FC31DZT1AYWDZ8XTCRWRBYRK
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
meta:
|
|||
|
$ref: '#/definitions/mediaMeta'
|
|||
|
preview_remote_url:
|
|||
|
description: |-
|
|||
|
外站服务器上的媒体附件缩略图地址。
|
|||
|
仅在非本站实例上定义。
|
|||
|
example: https://some-other-server.org/attachments/small/ahhhhh.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: PreviewRemoteURL
|
|||
|
preview_url:
|
|||
|
description: 该媒体附件的缩略图地址。
|
|||
|
example: https://example.org/fileserver/some_id/attachments/some_id/small/attachment.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: PreviewURL
|
|||
|
remote_url:
|
|||
|
description: |-
|
|||
|
外站服务器上的媒体附件原图地址。
|
|||
|
仅在非本站实例上定义。
|
|||
|
example: https://some-other-server.org/attachments/original/ahhhhh.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: RemoteURL
|
|||
|
text_url:
|
|||
|
description: |-
|
|||
|
该媒体附件的短链接。
|
|||
|
对于 GoToSocial,该值与 URL 相同,因为我们不创建较短的 URL。
|
|||
|
type: string
|
|||
|
x-go-name: TextURL
|
|||
|
type:
|
|||
|
description: 附件的类型。
|
|||
|
example: image
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
url:
|
|||
|
description: 附件的原图地址。
|
|||
|
example: https://example.org/fileserver/some_id/attachments/some_id/original/attachment.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
title: Attachment
|
|||
|
description: Attachment 是媒体附件的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: Attachment
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
card:
|
|||
|
properties:
|
|||
|
author_name:
|
|||
|
description: 原始资源的作者。
|
|||
|
example: weewee@buzzfeed.com
|
|||
|
type: string
|
|||
|
x-go-name: AuthorName
|
|||
|
author_url:
|
|||
|
description: 指向原始资源作者的链接。
|
|||
|
example: https://buzzfeed.com/authors/weewee
|
|||
|
type: string
|
|||
|
x-go-name: AuthorURL
|
|||
|
blurhash:
|
|||
|
description: 通过 BlurHash 算法计算的哈希,用于在媒体尚未下载时生成彩色预览缩略图。
|
|||
|
type: string
|
|||
|
x-go-name: Blurhash
|
|||
|
description:
|
|||
|
description: 预览的描述。
|
|||
|
example: 水是湿的吗?这很不好说。在这篇文章中,我们请教了一位专家...
|
|||
|
type: string
|
|||
|
x-go-name: Description
|
|||
|
embed_url:
|
|||
|
description: 用于照片嵌入,而非自定义 HTML。
|
|||
|
type: string
|
|||
|
x-go-name: EmbedURL
|
|||
|
height:
|
|||
|
description: 预览的高度,以像素为单位。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: Height
|
|||
|
html:
|
|||
|
description: 用于生成预览卡片的 HTML。
|
|||
|
type: string
|
|||
|
x-go-name: HTML
|
|||
|
image:
|
|||
|
description: 预览缩略图。
|
|||
|
example: https://example.org/fileserver/preview/thumb.jpg
|
|||
|
type: string
|
|||
|
x-go-name: Image
|
|||
|
provider_name:
|
|||
|
description: 原始资源的提供者。
|
|||
|
example: 惊爆新闻
|
|||
|
type: string
|
|||
|
x-go-name: ProviderName
|
|||
|
provider_url:
|
|||
|
description: 一个指向原始资源提供者的链接。
|
|||
|
example: https://buzzfeed.com
|
|||
|
type: string
|
|||
|
x-go-name: ProviderURL
|
|||
|
title:
|
|||
|
description: 链接到的资源的标题。
|
|||
|
example: 惊爆新闻:水是湿的吗?
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
type:
|
|||
|
description: 预览卡片的类型。
|
|||
|
example: link
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
url:
|
|||
|
description: 链接指向的资源的地址。
|
|||
|
example: https://buzzfeed.com/some/fuckin/buzzfeed/article
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
width:
|
|||
|
description: 预览的宽度,单位为像素。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: Width
|
|||
|
title: Card
|
|||
|
description: Card 表示使用 OpenGraph 标签从 URL 生成的丰富预览卡片。
|
|||
|
type: object
|
|||
|
x-go-name: Card
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
conversation:
|
|||
|
description: |-
|
|||
|
Conversation 表示具有“私信”可见性的对话。
|
|||
|
properties:
|
|||
|
accounts:
|
|||
|
description: |-
|
|||
|
对话的参与者。
|
|||
|
如果这是没有目标账户的对话(即仅自己可见的私信),
|
|||
|
则仅包含请求账户本身。否则,将包括对话中的所有其他账户,但不包括请求账户。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
x-go-name: Accounts
|
|||
|
id:
|
|||
|
description: 对话在本地数据库中的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
last_status:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
unread:
|
|||
|
description: 该对话当前是否被标记为未读?
|
|||
|
type: boolean
|
|||
|
x-go-name: Unread
|
|||
|
type: object
|
|||
|
x-go-name: Conversation
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
debugAPUrlResponse:
|
|||
|
description: |-
|
|||
|
DebugAPUrlResponse 提供对 AP URL 解引用请求的详细调试信息。
|
|||
|
properties:
|
|||
|
request_headers:
|
|||
|
additionalProperties:
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
description: 发送请求时使用的 HTTP 标头。
|
|||
|
type: object
|
|||
|
x-go-name: RequestHeaders
|
|||
|
request_url:
|
|||
|
description: 请求的外站 AP URL。
|
|||
|
type: string
|
|||
|
x-go-name: RequestURL
|
|||
|
response_body:
|
|||
|
description: |-
|
|||
|
外站实例返回的 Body。
|
|||
|
将是字符串化的字节;可能是 JSON,可能是错误文本,也可能同时是以上两者!
|
|||
|
type: string
|
|||
|
x-go-name: ResponseBody
|
|||
|
response_code:
|
|||
|
description: 外站实例返回的 HTTP 状态码。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: ResponseCode
|
|||
|
response_headers:
|
|||
|
additionalProperties:
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
description: 外站实例返回的 HTTP 标头。
|
|||
|
type: object
|
|||
|
x-go-name: ResponseHeaders
|
|||
|
type: object
|
|||
|
x-go-name: DebugAPUrlResponse
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
defaultPolicies:
|
|||
|
properties:
|
|||
|
direct:
|
|||
|
$ref: '#/definitions/interactionPolicy'
|
|||
|
private:
|
|||
|
$ref: '#/definitions/interactionPolicy'
|
|||
|
public:
|
|||
|
$ref: '#/definitions/interactionPolicy'
|
|||
|
unlisted:
|
|||
|
$ref: '#/definitions/interactionPolicy'
|
|||
|
title: 发起请求的账户的新贴文的默认互动规则。
|
|||
|
type: object
|
|||
|
x-go-name: DefaultPolicies
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
domain:
|
|||
|
description: Domain 表示一个外站实例
|
|||
|
properties:
|
|||
|
domain:
|
|||
|
description: 实例的主机名。
|
|||
|
example: example.org
|
|||
|
type: string
|
|||
|
x-go-name: Domain
|
|||
|
public_comment:
|
|||
|
description: 若实例被屏蔽,公开的屏蔽原因是什么。
|
|||
|
example: 它们被骚扰账号攻陷了。
|
|||
|
type: string
|
|||
|
x-go-name: PublicComment
|
|||
|
silenced_at:
|
|||
|
description: 实例被静音/隐藏的时间。对于开放实例,此键将不会存在。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: SilencedAt
|
|||
|
suspended_at:
|
|||
|
description: 实例被屏蔽的时间。对于开放实例,此键将不会存在。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: SuspendedAt
|
|||
|
type: object
|
|||
|
x-go-name: Domain
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
domainPermission:
|
|||
|
properties:
|
|||
|
created_at:
|
|||
|
description: 此权限条目创建的时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
created_by:
|
|||
|
description: 创建此实例权限条目的账户的 ID。
|
|||
|
example: 01FBW2758ZB6PBR200YPDDJK4C
|
|||
|
type: string
|
|||
|
x-go-name: CreatedBy
|
|||
|
domain:
|
|||
|
description: 此实例的主机名。
|
|||
|
example: example.org
|
|||
|
type: string
|
|||
|
x-go-name: Domain
|
|||
|
id:
|
|||
|
description: 此实例权限条目的 ID。
|
|||
|
example: 01FBW21XJA09XYX51KV5JVBW0F
|
|||
|
readOnly: true
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
obfuscate:
|
|||
|
description: 是否在公开此实例权限条目时对域名进行模糊处理。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Obfuscate
|
|||
|
private_comment:
|
|||
|
description: 对此权限条目的私密评论,仅对本站管理员可见。
|
|||
|
example: 它们管理员都是啥b啊
|
|||
|
type: string
|
|||
|
x-go-name: PrivateComment
|
|||
|
public_comment:
|
|||
|
description: 若实例被屏蔽,公开的屏蔽原因是什么。
|
|||
|
example: 它们被骚扰账号攻陷了。
|
|||
|
type: string
|
|||
|
x-go-name: PublicComment
|
|||
|
silenced_at:
|
|||
|
description: 该实例被静音/隐藏的时间。对于开放实例,此键将不会存在。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: SilencedAt
|
|||
|
subscription_id:
|
|||
|
description: 如果可用,导致此实例权限条目被创建的订阅的 ID。
|
|||
|
example: 01FBW25TF5J67JW3HFHZCSD23K
|
|||
|
type: string
|
|||
|
x-go-name: SubscriptionID
|
|||
|
suspended_at:
|
|||
|
description: 此实例被屏蔽的时间。对于开放实例,此键将不会存在。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: SuspendedAt
|
|||
|
title: DomainPermission
|
|||
|
description: DomainPermission 表示应用于某个实例的权限(显式阻止/允许)。
|
|||
|
type: object
|
|||
|
x-go-name: DomainPermission
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
emoji:
|
|||
|
properties:
|
|||
|
category:
|
|||
|
description: 用于在表情选择器中对自定义表情进行排序。
|
|||
|
example: blobcats
|
|||
|
type: string
|
|||
|
x-go-name: Category
|
|||
|
shortcode:
|
|||
|
description: 自定义表情的名称。
|
|||
|
example: blobcat_uwu
|
|||
|
type: string
|
|||
|
x-go-name: Shortcode
|
|||
|
static_url:
|
|||
|
description: 该自定义表情的静态副本链接。
|
|||
|
example: https://example.org/fileserver/emojis/blogcat_uwu.png
|
|||
|
type: string
|
|||
|
x-go-name: StaticURL
|
|||
|
url:
|
|||
|
description: 该自定义表情的 Web URL。
|
|||
|
example: https://example.org/fileserver/emojis/blogcat_uwu.gif
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
visible_in_picker:
|
|||
|
description: 该表情是否在实例的表情选择器中可见。
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: VisibleInPicker
|
|||
|
title: Emoji
|
|||
|
description: Emoji 表示一个自定义表情。
|
|||
|
type: object
|
|||
|
x-go-name: Emoji
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
emojiCategory:
|
|||
|
properties:
|
|||
|
id:
|
|||
|
description: 自定义表情类别的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
name:
|
|||
|
description: 自定义表情类别的名称。
|
|||
|
type: string
|
|||
|
x-go-name: Name
|
|||
|
title: EmojiCategory
|
|||
|
description: EmojiCategory 表示自定义表情的类别。
|
|||
|
type: object
|
|||
|
x-go-name: EmojiCategory
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
field:
|
|||
|
properties:
|
|||
|
name:
|
|||
|
description: 该附加字段的键/名称。
|
|||
|
example: 人称代词
|
|||
|
type: string
|
|||
|
x-go-name: Name
|
|||
|
value:
|
|||
|
description: 该附加字段的值。
|
|||
|
example: they/them
|
|||
|
type: string
|
|||
|
x-go-name: Value
|
|||
|
verified_at:
|
|||
|
description: 如果此字段已被验证,是何时验证的? (ISO 8601 Datetime)
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: VerifiedAt
|
|||
|
title: Field
|
|||
|
description: Field 表示要在账户资料上显示的名称/值对。
|
|||
|
type: object
|
|||
|
x-go-name: Field
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
filterContext:
|
|||
|
description: FilterContext 表示过滤规则要应用到的上下文。Filter API 的 v1 和 v2 使用相同的上下文集合。
|
|||
|
title: FilterContext
|
|||
|
type: string
|
|||
|
x-go-name: FilterContext
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
filterKeyword:
|
|||
|
properties:
|
|||
|
id:
|
|||
|
description: 数据库中过滤关键词条目的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
keyword:
|
|||
|
description: 被过滤的文本。
|
|||
|
example: 挂人
|
|||
|
type: string
|
|||
|
x-go-name: Keyword
|
|||
|
whole_word:
|
|||
|
description: 该过滤关键词是否应考虑单词边界?(整词匹配)
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: WholeWord
|
|||
|
title: FilterKeyword
|
|||
|
description: FilterKeyword 表示 v2 过滤规则中要过滤的关键词文本。
|
|||
|
type: object
|
|||
|
x-go-name: FilterKeyword
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
filterResult:
|
|||
|
properties:
|
|||
|
filter:
|
|||
|
$ref: '#/definitions/filterV2'
|
|||
|
keyword_matches:
|
|||
|
description: 该过滤规则中被匹配到的关键词。
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: KeywordMatches
|
|||
|
status_matches:
|
|||
|
description: 命中该过滤规则的贴文 ID。
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: StatusMatches
|
|||
|
title: FilterResult
|
|||
|
description: FilterResult 与被过滤的贴文一起返回,以解释为什么被过滤。
|
|||
|
type: object
|
|||
|
x-go-name: FilterResult
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
filterStatus:
|
|||
|
properties:
|
|||
|
id:
|
|||
|
description: 数据库中过滤贴文条目的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
phrase:
|
|||
|
description: 被过滤的贴文 ID。
|
|||
|
type: string
|
|||
|
x-go-name: StatusID
|
|||
|
title: FilterStatus
|
|||
|
description: FilterStatus 表示 v2 过滤规则中被过滤的贴文 ID。
|
|||
|
type: object
|
|||
|
x-go-name: FilterStatus
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
filterV1:
|
|||
|
description: |-
|
|||
|
FilterV1 表示用户定义的过滤规则,用于确定哪些贴文不应显示给用户。
|
|||
|
注意,v1 过滤规则在内部处理时会映射到 v2 过滤规则和 v2 过滤关键词。
|
|||
|
若 whole_word 为 true,则客户端应执行:
|
|||
|
为您的应用程序定义“单词组成字符 (word constituent character)”。在官方实现中,它是 [A-Za-z0-9_] (JavaScript) 和 [[:word:]] (Ruby)。
|
|||
|
Ruby 使用 POSIX 字符类 (Letter | Mark | Decimal_Number | Connector_Punctuation)。
|
|||
|
如果短语以单词字符开头,并且匹配范围之前的前一个字符是单词字符,则应将其匹配范围视为不匹配。
|
|||
|
如果短语以单词字符结尾,并且匹配范围之后的下一个字符是单词字符,则应将其匹配范围视为不匹配。
|
|||
|
请查看 Mastodon 源代码中的 app/javascript/mastodon/selectors/index.js 和 app/lib/feed_manager.rb 以获取更多详细信息。
|
|||
|
properties:
|
|||
|
context:
|
|||
|
description: 该过滤规则被应用到的上下文。
|
|||
|
example:
|
|||
|
- home
|
|||
|
- public
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterContext'
|
|||
|
minItems: 1
|
|||
|
type: array
|
|||
|
uniqueItems: true
|
|||
|
x-go-name: Context
|
|||
|
expires_at:
|
|||
|
description: 过滤规则不再生效的时间。如果过滤规则不会过期,则为 null。
|
|||
|
example: "2024-02-01T02:57:49Z"
|
|||
|
type: string
|
|||
|
x-go-name: ExpiresAt
|
|||
|
id:
|
|||
|
description: 数据库中过滤规则条目的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
irreversible:
|
|||
|
description: 命中的条目是否应从用户的时间线/视图中移除,而不是隐藏?
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Irreversible
|
|||
|
phrase:
|
|||
|
description: 被过滤的文本。
|
|||
|
example: 挂人
|
|||
|
type: string
|
|||
|
x-go-name: Phrase
|
|||
|
whole_word:
|
|||
|
description: 过滤规则是否应考虑单词边界?
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: WholeWord
|
|||
|
title: FilterV1
|
|||
|
type: object
|
|||
|
x-go-name: FilterV1
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
filterV2:
|
|||
|
description: FilterV2 表示用户定义的过滤规则,用于确定哪些贴文不应显示给用户。v2 过滤规则具有名称,并且可以包含多个短语和贴文 ID 以进行过滤。
|
|||
|
properties:
|
|||
|
context:
|
|||
|
description: 过滤规则应用的上下文。
|
|||
|
example:
|
|||
|
- home
|
|||
|
- public
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterContext'
|
|||
|
minItems: 1
|
|||
|
type: array
|
|||
|
uniqueItems: true
|
|||
|
x-go-name: Context
|
|||
|
expires_at:
|
|||
|
description: 过滤规则不再生效的时间。如果过滤规则不会过期,则为 null。
|
|||
|
example: "2024-02-01T02:57:49Z"
|
|||
|
type: string
|
|||
|
x-go-name: ExpiresAt
|
|||
|
filter_action:
|
|||
|
$ref: '#/definitions/FilterAction'
|
|||
|
id:
|
|||
|
description: 数据库中过滤规则条目的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
keywords:
|
|||
|
description: 此过滤规则下的关键词。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterKeyword'
|
|||
|
type: array
|
|||
|
x-go-name: Keywords
|
|||
|
statuses:
|
|||
|
description: 此过滤规则下的贴文。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterStatus'
|
|||
|
type: array
|
|||
|
x-go-name: Statuses
|
|||
|
title:
|
|||
|
description: 此过滤规则的名称。
|
|||
|
example: Linux 相关
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
title: FilterV2
|
|||
|
type: object
|
|||
|
x-go-name: FilterV2
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
headerFilter:
|
|||
|
properties:
|
|||
|
created_at:
|
|||
|
description: 标头过滤规则创建时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
readOnly: true
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
created_by:
|
|||
|
description: 创建此标头过滤规则的管理员账户的 ID。
|
|||
|
example: 01FBW2758ZB6PBR200YPDDJK4C
|
|||
|
readOnly: true
|
|||
|
type: string
|
|||
|
x-go-name: CreatedBy
|
|||
|
header:
|
|||
|
description: 此标头过滤规则匹配的 HTTP 标头。
|
|||
|
example: User-Agent
|
|||
|
type: string
|
|||
|
x-go-name: Header
|
|||
|
id:
|
|||
|
description: 此标头过滤规则的 ID。
|
|||
|
example: 01FBW21XJA09XYX51KV5JVBW0F
|
|||
|
readOnly: true
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
regex:
|
|||
|
description: 此标头过滤规则的正则表达式。
|
|||
|
example: .*Firefox.*
|
|||
|
type: string
|
|||
|
x-go-name: Regex
|
|||
|
title: HeaderFilter
|
|||
|
description: HeaderFilter 表示应用于特定 HTTP 标头的正则过滤规则(允许/阻止)。
|
|||
|
type: object
|
|||
|
x-go-name: HeaderFilter
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
hostmeta:
|
|||
|
description: 'HostMeta 表示一份 hostmeta 文档。参见: https://www.rfc-editor.org/rfc/rfc6415.html#section-3'
|
|||
|
properties:
|
|||
|
Link:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/Link'
|
|||
|
type: array
|
|||
|
XMLNS:
|
|||
|
type: string
|
|||
|
XMLName: {}
|
|||
|
title: HostMeta
|
|||
|
type: object
|
|||
|
x-go-name: HostMeta
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceConfigurationAccounts:
|
|||
|
properties:
|
|||
|
allow_custom_css:
|
|||
|
description: 此实例是否允许账户上传用于资料页和贴文页的自定义 CSS。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: AllowCustomCSS
|
|||
|
max_featured_tags:
|
|||
|
description: |-
|
|||
|
此实例允许每个账户设置的最大特色标签数。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxFeaturedTags
|
|||
|
max_profile_fields:
|
|||
|
description: |-
|
|||
|
此实例允许每个账户设置的最大附加字段数。
|
|||
|
目前不可配置,硬编码为 6。详见 (https://github.com/superseriousbusiness/gotosocial/issues/1876)
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxProfileFields
|
|||
|
title: InstanceConfigurationAccounts
|
|||
|
description: InstanceConfigurationAccounts 是实例账户配置参数的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceConfigurationAccounts
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceConfigurationMediaAttachments:
|
|||
|
properties:
|
|||
|
image_matrix_limit:
|
|||
|
description: |-
|
|||
|
图像的最大尺寸,以像素为单位,高度*宽度。
|
|||
|
|
|||
|
GtS 不对此设置限制,但为了保持兼容性,我们在这里给出 Mastodon 的 4096x4096px 值。
|
|||
|
example: 16777216
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: ImageMatrixLimit
|
|||
|
image_size_limit:
|
|||
|
description: 图像的最大大小,以字节为单位。
|
|||
|
example: 2097152
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: ImageSizeLimit
|
|||
|
supported_mime_types:
|
|||
|
description: 此实例支持上传的 MIME 类型列表。
|
|||
|
example:
|
|||
|
- image/jpeg
|
|||
|
- image/gif
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: SupportedMimeTypes
|
|||
|
video_frame_rate_limit:
|
|||
|
description: 此实例支持的最大视频帧率。
|
|||
|
example: 60
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: VideoFrameRateLimit
|
|||
|
video_matrix_limit:
|
|||
|
description: |-
|
|||
|
此实例支持的最大视频尺寸,以像素为单位,高度*宽度。
|
|||
|
|
|||
|
GtS 不对此设置限制,但为了保持兼容性,我们在这里给出 Mastodon 的 4096x4096px 值。
|
|||
|
example: 16777216
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: VideoMatrixLimit
|
|||
|
video_size_limit:
|
|||
|
description: 视频的最大大小,以字节为单位。
|
|||
|
example: 10485760
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: VideoSizeLimit
|
|||
|
title: InstanceConfigurationMediaAttachments
|
|||
|
description: InstanceConfigurationMediaAttachments 是实例媒体附件配置参数的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceConfigurationMediaAttachments
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceConfigurationPolls:
|
|||
|
properties:
|
|||
|
max_characters_per_option:
|
|||
|
description: 投票选项中允许的最大字符数。
|
|||
|
example: 50
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxCharactersPerOption
|
|||
|
max_expiration:
|
|||
|
description: 投票的最大时长,以秒为单位。
|
|||
|
example: 2629746
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxExpiration
|
|||
|
max_options:
|
|||
|
description: 此实例允许的最大投票选项数。
|
|||
|
example: 4
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxOptions
|
|||
|
min_expiration:
|
|||
|
description: 投票的最小时长,以秒为单位。
|
|||
|
example: 300
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MinExpiration
|
|||
|
title: InstanceConfigurationPolls
|
|||
|
description: InstanceConfigurationPolls 是实例投票配置参数的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceConfigurationPolls
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceConfigurationStatuses:
|
|||
|
properties:
|
|||
|
characters_reserved_per_url:
|
|||
|
description: 客户端应假设 URL 占用的字符数。
|
|||
|
example: 25
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: CharactersReservedPerURL
|
|||
|
max_characters:
|
|||
|
description: 此实例允许的最大贴文长度,以字符为单位。
|
|||
|
example: 5000
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxCharacters
|
|||
|
max_media_attachments:
|
|||
|
description: 此实例允许的最大媒体附件数。
|
|||
|
example: 4
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxMediaAttachments
|
|||
|
supported_mime_types:
|
|||
|
description: 此实例的贴文可用的 MIME 类型列表。
|
|||
|
example:
|
|||
|
- text/plain
|
|||
|
- text/markdown
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: SupportedMimeTypes
|
|||
|
title: InstanceConfigurationStatuses
|
|||
|
description: InstanceConfigurationStatuses 是实例贴文配置参数的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceConfigurationStatuses
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceRule:
|
|||
|
properties:
|
|||
|
id:
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
text:
|
|||
|
type: string
|
|||
|
x-go-name: Text
|
|||
|
title: InstanceRule
|
|||
|
description: InstanceRule 表示一条实例规则。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceRule
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV1:
|
|||
|
properties:
|
|||
|
account_domain:
|
|||
|
description: |-
|
|||
|
此实例上的账户的域名。
|
|||
|
这不一定与 URI 的 Host 部分相同。
|
|||
|
example: example.org
|
|||
|
type: string
|
|||
|
x-go-name: AccountDomain
|
|||
|
approval_required:
|
|||
|
description: 新账户注册需要管理员批准。
|
|||
|
type: boolean
|
|||
|
x-go-name: ApprovalRequired
|
|||
|
configuration:
|
|||
|
$ref: '#/definitions/instanceV1Configuration'
|
|||
|
contact_account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
debug:
|
|||
|
description: 此实例是否在 DEBUG 模式下运行。如果为 false,则省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: Debug
|
|||
|
description:
|
|||
|
description: |-
|
|||
|
此实例的描述。
|
|||
|
|
|||
|
应为 HTML 格式,但可能是纯文本。
|
|||
|
|
|||
|
这应该显示在实例的“关于”页面上。
|
|||
|
type: string
|
|||
|
x-go-name: Description
|
|||
|
description_text:
|
|||
|
description: 描述的原始(未解析)版本。
|
|||
|
type: string
|
|||
|
x-go-name: DescriptionText
|
|||
|
email:
|
|||
|
description: 用于咨询的电子邮件地址。
|
|||
|
example: social@example.org
|
|||
|
type: string
|
|||
|
x-go-name: Email
|
|||
|
invites_enabled:
|
|||
|
description: 此实例是否允许邀请注册。
|
|||
|
type: boolean
|
|||
|
x-go-name: InvitesEnabled
|
|||
|
languages:
|
|||
|
description: 此实例的主要语言。
|
|||
|
example:
|
|||
|
- zh
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Languages
|
|||
|
max_toot_chars:
|
|||
|
description: |-
|
|||
|
此实例允许的最大贴文长度,以字符为单位。
|
|||
|
|
|||
|
这是为了与 Tusky 和其他应用程序兼容而提供的。
|
|||
|
example: 5000
|
|||
|
format: uint64
|
|||
|
type: integer
|
|||
|
x-go-name: MaxTootChars
|
|||
|
registrations:
|
|||
|
description: 此实例上启用了新账户注册。
|
|||
|
type: boolean
|
|||
|
x-go-name: Registrations
|
|||
|
rules:
|
|||
|
description: 此实例的规则的条目化列表。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
type: array
|
|||
|
x-go-name: Rules
|
|||
|
short_description:
|
|||
|
description: |-
|
|||
|
此实例的简要描述。
|
|||
|
|
|||
|
应为 HTML 格式,但可能是纯文本。
|
|||
|
|
|||
|
这应该显示在实例的首页上。
|
|||
|
type: string
|
|||
|
x-go-name: ShortDescription
|
|||
|
short_description_text:
|
|||
|
description: 短描述的原始(未解析)版本。
|
|||
|
type: string
|
|||
|
x-go-name: ShortDescriptionText
|
|||
|
stats:
|
|||
|
additionalProperties:
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
description: |-
|
|||
|
此实例的统计信息:贴文数、账户数等。
|
|||
|
值为指针,因为我们不希望在通过 Web 模板渲染统计信息时跳过 0 值。
|
|||
|
type: object
|
|||
|
x-go-name: Stats
|
|||
|
terms:
|
|||
|
description: 此实例的条款与条件。
|
|||
|
type: string
|
|||
|
x-go-name: Terms
|
|||
|
terms_text:
|
|||
|
description: 条款与条件的原始(未解析)版本。
|
|||
|
type: string
|
|||
|
x-go-name: TermsRaw
|
|||
|
thumbnail:
|
|||
|
description: 此实例的头像/横幅图像的 URL。
|
|||
|
example: https://example.org/files/instance/thumbnail.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: Thumbnail
|
|||
|
thumbnail_description:
|
|||
|
description: 此实例的头像描述。
|
|||
|
example: 一张可爱的卡通小懒
|
|||
|
type: string
|
|||
|
x-go-name: ThumbnailDescription
|
|||
|
thumbnail_static:
|
|||
|
description: 此实例头像/横幅图的静态版本的 URL。
|
|||
|
example: https://example.org/files/instance/static/thumbnail.webp
|
|||
|
type: string
|
|||
|
x-go-name: ThumbnailStatic
|
|||
|
thumbnail_static_type:
|
|||
|
description: 此实例的头像/横幅图的静态版本的 MIME 类型。
|
|||
|
example: image/webp
|
|||
|
type: string
|
|||
|
x-go-name: ThumbnailStaticType
|
|||
|
thumbnail_type:
|
|||
|
description: 此实例头像的 MIME 类型。
|
|||
|
example: image/png
|
|||
|
type: string
|
|||
|
x-go-name: ThumbnailType
|
|||
|
title:
|
|||
|
description: 实例的标题。
|
|||
|
example: GoToSocial 演示实例
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
uri:
|
|||
|
description: 实例的 URI。
|
|||
|
example: https://gts.example.org
|
|||
|
type: string
|
|||
|
x-go-name: URI
|
|||
|
urls:
|
|||
|
$ref: '#/definitions/instanceV1URLs'
|
|||
|
version:
|
|||
|
description: |-
|
|||
|
此实例部署的 GoToSocial 版本。
|
|||
|
|
|||
|
至少包含一个语义版本号。
|
|||
|
|
|||
|
它还可能包含当前软件的 git 提交短 ID。
|
|||
|
example: 0.1.1 cb85f65
|
|||
|
type: string
|
|||
|
x-go-name: Version
|
|||
|
title: InstanceV1
|
|||
|
description: InstanceV1 是关于此实例的信息的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV1
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV1Configuration:
|
|||
|
properties:
|
|||
|
accounts:
|
|||
|
$ref: '#/definitions/instanceConfigurationAccounts'
|
|||
|
emojis:
|
|||
|
$ref: '#/definitions/InstanceConfigurationEmojis'
|
|||
|
media_attachments:
|
|||
|
$ref: '#/definitions/instanceConfigurationMediaAttachments'
|
|||
|
oidc_enabled:
|
|||
|
description: 若实例使用 OIDC 作为身份验证/身份后端,则为 true,否则省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: OIDCEnabled
|
|||
|
polls:
|
|||
|
$ref: '#/definitions/instanceConfigurationPolls'
|
|||
|
statuses:
|
|||
|
$ref: '#/definitions/instanceConfigurationStatuses'
|
|||
|
title: InstanceV1Configuration
|
|||
|
description: InstanceV1Configuration 是实例配置参数的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV1Configuration
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV1URLs:
|
|||
|
properties:
|
|||
|
streaming_api:
|
|||
|
description: 用于贴文和通知的流式传输的 Websockets 地址。
|
|||
|
example: wss://example.org
|
|||
|
type: string
|
|||
|
x-go-name: StreamingAPI
|
|||
|
title: InstanceV1URLs
|
|||
|
description: InstanceV1URLs 是客户端应用程序使用的与实例相关的 URL 的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV1URLs
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2:
|
|||
|
properties:
|
|||
|
account_domain:
|
|||
|
description: |-
|
|||
|
此实例上的账户的域名。
|
|||
|
这不一定与 URI 的 Host 部分相同。
|
|||
|
example: example.org
|
|||
|
type: string
|
|||
|
x-go-name: AccountDomain
|
|||
|
configuration:
|
|||
|
$ref: '#/definitions/instanceV2Configuration'
|
|||
|
contact:
|
|||
|
$ref: '#/definitions/instanceV2Contact'
|
|||
|
debug:
|
|||
|
description: 此实例是否在 DEBUG 模式下运行。如果为 false,则省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: Debug
|
|||
|
description:
|
|||
|
description: |-
|
|||
|
此实例的描述。
|
|||
|
|
|||
|
应为 HTML 格式,但可能是纯文本。
|
|||
|
|
|||
|
这应该显示在实例的“关于”页面上。
|
|||
|
type: string
|
|||
|
x-go-name: Description
|
|||
|
description_text:
|
|||
|
description: 描述的原始(未解析)版本。
|
|||
|
type: string
|
|||
|
x-go-name: DescriptionText
|
|||
|
domain:
|
|||
|
description: 实例的域名。
|
|||
|
example: gts.example.org
|
|||
|
type: string
|
|||
|
x-go-name: Domain
|
|||
|
languages:
|
|||
|
description: 实例和实例站务/管理员的主要语言。
|
|||
|
example:
|
|||
|
- zh
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Languages
|
|||
|
registrations:
|
|||
|
$ref: '#/definitions/instanceV2Registrations'
|
|||
|
rules:
|
|||
|
description: 该实例的规则的条目化列表。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
type: array
|
|||
|
x-go-name: Rules
|
|||
|
source_url:
|
|||
|
description: 本实例部署的软件的源代码 URL,应 AGPL 许可要求提供。
|
|||
|
example: https://github.com/superseriousbusiness/gotosocial
|
|||
|
type: string
|
|||
|
x-go-name: SourceURL
|
|||
|
terms:
|
|||
|
description: 本实例的账户条款与条件。
|
|||
|
type: string
|
|||
|
x-go-name: Terms
|
|||
|
terms_text:
|
|||
|
description: 条款与条件的原始(未解析)版本。
|
|||
|
type: string
|
|||
|
x-go-name: TermsText
|
|||
|
thumbnail:
|
|||
|
$ref: '#/definitions/instanceV2Thumbnail'
|
|||
|
title:
|
|||
|
description: 实例的标题。
|
|||
|
example: GoToSocial 演示实例
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
usage:
|
|||
|
$ref: '#/definitions/instanceV2Usage'
|
|||
|
version:
|
|||
|
description: |-
|
|||
|
此实例部署的 GoToSocial 版本。
|
|||
|
|
|||
|
至少包含一个语义版本号。
|
|||
|
|
|||
|
它还可能包含当前软件的 git 提交短 ID。
|
|||
|
example: 0.1.1 cb85f65
|
|||
|
type: string
|
|||
|
x-go-name: Version
|
|||
|
title: InstanceV2
|
|||
|
description: InstanceV2 是关于此实例的信息的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2Configuration:
|
|||
|
properties:
|
|||
|
accounts:
|
|||
|
$ref: '#/definitions/instanceConfigurationAccounts'
|
|||
|
emojis:
|
|||
|
$ref: '#/definitions/InstanceConfigurationEmojis'
|
|||
|
media_attachments:
|
|||
|
$ref: '#/definitions/instanceConfigurationMediaAttachments'
|
|||
|
oidc_enabled:
|
|||
|
description: 若实例使用 OIDC 作为身份验证/身份后端,则为 true,否则省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: OIDCEnabled
|
|||
|
polls:
|
|||
|
$ref: '#/definitions/instanceConfigurationPolls'
|
|||
|
statuses:
|
|||
|
$ref: '#/definitions/instanceConfigurationStatuses'
|
|||
|
translation:
|
|||
|
$ref: '#/definitions/instanceV2ConfigurationTranslation'
|
|||
|
urls:
|
|||
|
$ref: '#/definitions/instanceV2URLs'
|
|||
|
title: InstanceV2Configuration
|
|||
|
description: 此实例的配置值和限制。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2Configuration
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2ConfigurationTranslation:
|
|||
|
properties:
|
|||
|
enabled:
|
|||
|
description: |-
|
|||
|
此实例是否支持翻译 API。
|
|||
|
由于尚未实现,因此此值始终为 false。
|
|||
|
type: boolean
|
|||
|
x-go-name: Enabled
|
|||
|
title: InstanceV2ConfigurationTranslation
|
|||
|
description: 关于翻译功能的提示。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2ConfigurationTranslation
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2Contact:
|
|||
|
properties:
|
|||
|
account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
email:
|
|||
|
description: |-
|
|||
|
可用于咨询和问题反馈的电子邮件地址。
|
|||
|
如果未设置电子邮件地址,则为空字符串。
|
|||
|
example: someone@example.org
|
|||
|
type: string
|
|||
|
x-go-name: Email
|
|||
|
title: InstanceV2Contact
|
|||
|
description: 此实例的联系信息。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2Contact
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2Registrations:
|
|||
|
properties:
|
|||
|
approval_required:
|
|||
|
description: 此实例是否需要管理员批准新账户注册。
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: ApprovalRequired
|
|||
|
enabled:
|
|||
|
description: 是否开放注册。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Enabled
|
|||
|
message:
|
|||
|
description: |-
|
|||
|
一条自定义消息(HTML 字符串),用于在关闭注册时显示。
|
|||
|
example: <p>由于骚扰猖獗,example.org 目前关闭了注册,请联系管理员以获取帮助。</p>
|
|||
|
type: string
|
|||
|
x-go-name: Message
|
|||
|
title: InstanceV2Registrations
|
|||
|
description: 此实例有关注册的信息。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2Registrations
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2Thumbnail:
|
|||
|
properties:
|
|||
|
blurhash:
|
|||
|
description: |-
|
|||
|
通过 BlurHash 算法计算的哈希,用于在媒体尚未下载时生成彩色预览缩略图。
|
|||
|
example: UeKUpFxuo~R%0nW;WCnhF6RjaJt757oJodS$
|
|||
|
type: string
|
|||
|
x-go-name: Blurhash
|
|||
|
static_url:
|
|||
|
description: 缩略图图像的静态版本的 URL。
|
|||
|
example: https://example.org/fileserver/01BPSX2MKCRVMD4YN4D71G9CP5/attachment/static/01H88X0KQ2DFYYDSWYP93VDJZA.webp
|
|||
|
type: string
|
|||
|
x-go-name: StaticURL
|
|||
|
thumbnail_description:
|
|||
|
description: |-
|
|||
|
实例缩略图的描述。
|
|||
|
如果没有描述可用,则不设置键/值。
|
|||
|
example: 一只可爱的小懒
|
|||
|
type: string
|
|||
|
x-go-name: Description
|
|||
|
thumbnail_static_type:
|
|||
|
description: |-
|
|||
|
实例缩略图的静态版本的 MIME 类型。
|
|||
|
如果类型未知,则不设置键/值。
|
|||
|
example: image/png
|
|||
|
type: string
|
|||
|
x-go-name: StaticType
|
|||
|
thumbnail_type:
|
|||
|
description: |-
|
|||
|
实例缩略图的 MIME 类型。
|
|||
|
如果类型未知,则不设置键/值。
|
|||
|
example: image/png
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
url:
|
|||
|
description: 缩略图的 URL。
|
|||
|
example: https://example.org/fileserver/01BPSX2MKCRVMD4YN4D71G9CP5/attachment/original/01H88X0KQ2DFYYDSWYP93VDJZA.png
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
versions:
|
|||
|
$ref: '#/definitions/instanceV2ThumbnailVersions'
|
|||
|
title: InstanceV2Thumbnail
|
|||
|
description: 代表此实例的图像。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2Thumbnail
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2ThumbnailVersions:
|
|||
|
properties:
|
|||
|
'@1x':
|
|||
|
description: |-
|
|||
|
此缩略图的 1 倍分辨率缩放版本的 URL。
|
|||
|
如果未提供此缩放版本,则不设置键/值。
|
|||
|
type: string
|
|||
|
x-go-name: Size1URL
|
|||
|
'@2x':
|
|||
|
description: |-
|
|||
|
此缩略图的 2 倍分辨率缩放版本的 URL。
|
|||
|
如果未提供此缩放版本,则不设置键/值。
|
|||
|
type: string
|
|||
|
x-go-name: Size2URL
|
|||
|
title: InstanceV2ThumbnailVersions
|
|||
|
description: 缩略图的高分辨率版本,用于高 DPI 屏幕。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2ThumbnailVersions
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2URLs:
|
|||
|
properties:
|
|||
|
streaming:
|
|||
|
description: 用于流式传输贴文和通知的 Websockets 地址。
|
|||
|
example: wss://example.org
|
|||
|
type: string
|
|||
|
x-go-name: Streaming
|
|||
|
title: InstanceV2URLs
|
|||
|
description: InstanceV2URLs 是客户端应用程序使用的与实例相关的 URL 的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2URLs
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2Usage:
|
|||
|
properties:
|
|||
|
users:
|
|||
|
$ref: '#/definitions/instanceV2Users'
|
|||
|
title: InstanceV2Usage
|
|||
|
description: InstanceV2Usage 是关于此实例的使用数据的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2Usage
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
instanceV2Users:
|
|||
|
properties:
|
|||
|
active_month:
|
|||
|
description: |-
|
|||
|
此实例过去 4 周内的活跃用户数。
|
|||
|
目前未实现:将始终为 0。
|
|||
|
example: 0
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: ActiveMonth
|
|||
|
title: InstanceV2Users
|
|||
|
description: 此实例的用户使用数据。
|
|||
|
type: object
|
|||
|
x-go-name: InstanceV2Users
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
interactionPolicy:
|
|||
|
properties:
|
|||
|
can_favourite:
|
|||
|
$ref: '#/definitions/interactionPolicyRules'
|
|||
|
can_reblog:
|
|||
|
$ref: '#/definitions/interactionPolicyRules'
|
|||
|
can_reply:
|
|||
|
$ref: '#/definitions/interactionPolicyRules'
|
|||
|
title: InteractionPolicy
|
|||
|
description: 某条贴文的互动规则。
|
|||
|
type: object
|
|||
|
x-go-name: InteractionPolicy
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
interactionPolicyRules:
|
|||
|
properties:
|
|||
|
always:
|
|||
|
description: 始终可以执行此类互动的账户的规则条目。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/interactionPolicyValue'
|
|||
|
type: array
|
|||
|
x-go-name: Always
|
|||
|
with_approval:
|
|||
|
description: 执行此类互动需要批准的账户的规则条目。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/interactionPolicyValue'
|
|||
|
type: array
|
|||
|
x-go-name: WithApproval
|
|||
|
title: InteractionPolicyRules
|
|||
|
description: 某类互动的规则。
|
|||
|
type: object
|
|||
|
x-go-name: PolicyRules
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
interactionPolicyValue:
|
|||
|
description: |-
|
|||
|
一条贴文的互动规则条目。
|
|||
|
可以是以下内部关键字之一,也可以是一个完整的 ActivityPub Actor URI,如 "https://example.org/users/some_user"。
|
|||
|
|
|||
|
内部关键字:
|
|||
|
|
|||
|
public - 公开,即任何可以根据其可见性级别看到此贴文的人。
|
|||
|
followers - 贴文作者的粉丝。
|
|||
|
following - 贴文作者关注的人。
|
|||
|
mutuals - 贴文作者的互相关注(保留,未使用)。
|
|||
|
mentioned - 在贴文中提到的账户,或者在贴文中回复的账户。
|
|||
|
author - 贴文作者本人。
|
|||
|
me - 如果请求是由授权用户发出的,则 "me" 代表发出请求的、现在正在查询此互动策略的用户。
|
|||
|
title: InteractionPolicyValue
|
|||
|
type: string
|
|||
|
x-go-name: PolicyValue
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
interactionRequest:
|
|||
|
properties:
|
|||
|
accepted_at:
|
|||
|
description: The timestamp that the interaction request was accepted (ISO 8601 Datetime). Field omitted if request not accepted (yet). 互动请求被接受的时间戳 (ISO 8601 Datetime)。如果请求尚未被接受,则省略此字段。
|
|||
|
type: string
|
|||
|
x-go-name: AcceptedAt
|
|||
|
account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
created_at:
|
|||
|
description: 互动请求的时间戳 (ISO 8601 Datetime)
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
id:
|
|||
|
description: 互动请求在数据库中的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
rejected_at:
|
|||
|
description: 互动请求被拒绝的时间戳 (ISO 8601 Datetime)。如果请求尚未被拒绝,则省略此字段。
|
|||
|
type: string
|
|||
|
x-go-name: RejectedAt
|
|||
|
reply:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
status:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type:
|
|||
|
description: |-
|
|||
|
该互动请求所涉及的互动类型。
|
|||
|
|
|||
|
`favourite` - 有人点赞了一条贴文。
|
|||
|
`reply` - 有人回复了一条贴文。
|
|||
|
`reblog` - 有人转发了一条贴文。
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
uri:
|
|||
|
description: 接受或拒绝的 URI。仅在设置了 accepted_at 或 rejected_at 时设置,否则省略。
|
|||
|
type: string
|
|||
|
x-go-name: URI
|
|||
|
title: InteractionRequest
|
|||
|
description: InteractionRequest 表示待处理、已批准或已拒绝的点赞、回复或转发互动。
|
|||
|
type: object
|
|||
|
x-go-name: InteractionRequest
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
list:
|
|||
|
properties:
|
|||
|
exclusive:
|
|||
|
description: |-
|
|||
|
此列表是否为单独列表。
|
|||
|
如果为 true,则在主页时间线中隐藏此列表的成员的贴文。
|
|||
|
type: boolean
|
|||
|
x-go-name: Exclusive
|
|||
|
id:
|
|||
|
description: 列表的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
replies_policy:
|
|||
|
description: |-
|
|||
|
此列表的回复显示规则。
|
|||
|
followed = 显示任何对已关注用户的回复
|
|||
|
list = 显示对列表成员的回复
|
|||
|
none = 不显示任何回复
|
|||
|
type: string
|
|||
|
x-go-name: RepliesPolicy
|
|||
|
title:
|
|||
|
description: 用户设定的列表名称。
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
title: List
|
|||
|
description: List 表示用户为关注的账户创建的列表。
|
|||
|
type: object
|
|||
|
x-go-name: List
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
markers:
|
|||
|
properties:
|
|||
|
home:
|
|||
|
$ref: '#/definitions/TimelineMarker'
|
|||
|
notifications:
|
|||
|
$ref: '#/definitions/TimelineMarker'
|
|||
|
title: Marker
|
|||
|
description: Marker 表示用户时间线中的上次阅读位置。
|
|||
|
type: object
|
|||
|
x-go-name: Marker
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
mediaDimensions:
|
|||
|
properties:
|
|||
|
aspect:
|
|||
|
description: |-
|
|||
|
媒体附件的宽高比。
|
|||
|
等于宽度 / 高度。
|
|||
|
example: 1.777777778
|
|||
|
format: float
|
|||
|
type: number
|
|||
|
x-go-name: Aspect
|
|||
|
bitrate:
|
|||
|
description: 媒体附件的比特率,以每秒位数为单位。
|
|||
|
example: 1000000
|
|||
|
format: uint64
|
|||
|
type: integer
|
|||
|
x-go-name: Bitrate
|
|||
|
duration:
|
|||
|
description: |-
|
|||
|
媒体的时长(秒)。
|
|||
|
仅对视频和音频设置。
|
|||
|
example: 5.43
|
|||
|
format: float
|
|||
|
type: number
|
|||
|
x-go-name: Duration
|
|||
|
frame_rate:
|
|||
|
description: |-
|
|||
|
媒体的帧率。
|
|||
|
仅对视频和 GIF 设置。
|
|||
|
example: "30"
|
|||
|
type: string
|
|||
|
x-go-name: FrameRate
|
|||
|
height:
|
|||
|
description: |-
|
|||
|
媒体的高度(像素)。
|
|||
|
对于音频不设置。
|
|||
|
example: 1080
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: Height
|
|||
|
size:
|
|||
|
description: |-
|
|||
|
媒体的尺寸,格式为 `[width]x[height]`。
|
|||
|
对于音频不设置。
|
|||
|
example: 1920x1080
|
|||
|
type: string
|
|||
|
x-go-name: Size
|
|||
|
width:
|
|||
|
description: |-
|
|||
|
媒体的宽度(像素)。
|
|||
|
对于音频不设置。
|
|||
|
example: 1920
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: Width
|
|||
|
title: MediaDimensions
|
|||
|
description: MediaDimensions 是一份媒体附件的详细属性的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: MediaDimensions
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
mediaFocus:
|
|||
|
properties:
|
|||
|
x:
|
|||
|
description: |-
|
|||
|
焦点的 x 轴位置,应在 -1 和 1 之间
|
|||
|
format: float
|
|||
|
type: number
|
|||
|
x-go-name: X
|
|||
|
"y":
|
|||
|
description: |-
|
|||
|
焦点的 y 轴位置,应在 -1 和 1 之间
|
|||
|
format: float
|
|||
|
type: number
|
|||
|
x-go-name: "Y"
|
|||
|
title: MediaFocus
|
|||
|
description: MediaFocus 是媒体附件的焦点的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: MediaFocus
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
mediaMeta:
|
|||
|
description: MediaMeta 是媒体附件的元数据的抽象模型。这可以是有关图像、音频文件、视频等的元数据。
|
|||
|
properties:
|
|||
|
focus:
|
|||
|
$ref: '#/definitions/mediaFocus'
|
|||
|
original:
|
|||
|
$ref: '#/definitions/mediaDimensions'
|
|||
|
small:
|
|||
|
$ref: '#/definitions/mediaDimensions'
|
|||
|
title: MediaMeta
|
|||
|
type: object
|
|||
|
x-go-name: MediaMeta
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
mutedAccount:
|
|||
|
properties:
|
|||
|
acct:
|
|||
|
description: |-
|
|||
|
通过 webfinger 发现的账户 URI。
|
|||
|
对于本地用户,等于用户名;对于远程用户,等于用户名@域名。
|
|||
|
example: some_user@example.org
|
|||
|
type: string
|
|||
|
x-go-name: Acct
|
|||
|
avatar:
|
|||
|
description: 该账户的头像的 Web 地址。
|
|||
|
example: https://example.org/media/some_user/avatar/original/avatar.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: Avatar
|
|||
|
avatar_description:
|
|||
|
description: 该账户的头像描述,用于 alt 文本。
|
|||
|
example: 一张微笑的树懒的可爱图画。
|
|||
|
type: string
|
|||
|
x-go-name: AvatarDescription
|
|||
|
avatar_media_id:
|
|||
|
description: |-
|
|||
|
此账户的头像对应的媒体附件的数据库 ID。
|
|||
|
如果此账户没有上传头像(即默认头像),则省略。
|
|||
|
example: 01JAJ3XCD66K3T99JZESCR137W
|
|||
|
type: string
|
|||
|
x-go-name: AvatarMediaID
|
|||
|
avatar_static:
|
|||
|
description: |-
|
|||
|
账户头像的静态版本的 Web 地址。
|
|||
|
仅在账户的主头像是视频或 gif 时才有用。
|
|||
|
example: https://example.org/media/some_user/avatar/static/avatar.png
|
|||
|
type: string
|
|||
|
x-go-name: AvatarStatic
|
|||
|
bot:
|
|||
|
description: 账户被标记为机器人。
|
|||
|
type: boolean
|
|||
|
x-go-name: Bot
|
|||
|
created_at:
|
|||
|
description: 该账户创建的时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
custom_css:
|
|||
|
description: 渲染此账户的资料页或贴文页时包含的自定义 CSS。
|
|||
|
type: string
|
|||
|
x-go-name: CustomCSS
|
|||
|
discoverable:
|
|||
|
description: 账户选择加入发现功能。
|
|||
|
type: boolean
|
|||
|
x-go-name: Discoverable
|
|||
|
display_name:
|
|||
|
description: 账户的昵称。
|
|||
|
example: big jeff (he/him)
|
|||
|
type: string
|
|||
|
x-go-name: DisplayName
|
|||
|
emojis:
|
|||
|
description: |-
|
|||
|
账户的简介或显示名称中使用的自定义表情符号的数组。
|
|||
|
对于被屏蔽的账户为空。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
type: array
|
|||
|
x-go-name: Emojis
|
|||
|
enable_rss:
|
|||
|
description: |-
|
|||
|
账户已启用 RSS 订阅。
|
|||
|
如果为 false,则省略键/值。
|
|||
|
type: boolean
|
|||
|
x-go-name: EnableRSS
|
|||
|
fields:
|
|||
|
description: |-
|
|||
|
账户资料中的附加元数据。
|
|||
|
对于被屏蔽的账户为空。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/field'
|
|||
|
type: array
|
|||
|
x-go-name: Fields
|
|||
|
followers_count:
|
|||
|
description: 该账户的粉丝数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FollowersCount
|
|||
|
following_count:
|
|||
|
description: 该账户关注的账户数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FollowingCount
|
|||
|
header:
|
|||
|
description: 账户资料卡横幅背景图的 Web 地址。
|
|||
|
example: https://example.org/media/some_user/header/original/header.jpeg
|
|||
|
type: string
|
|||
|
x-go-name: Header
|
|||
|
header_description:
|
|||
|
description: 账户资料卡横幅背景图的描述,用于 alt 文本。
|
|||
|
example: 花开富贵。
|
|||
|
type: string
|
|||
|
x-go-name: HeaderDescription
|
|||
|
header_media_id:
|
|||
|
description: |-
|
|||
|
此账户的资料卡横幅背景图片对应的媒体附件的数据库 ID。
|
|||
|
如果此账户没有上传资料卡横幅背景图(即使用默认横幅背景),则省略。
|
|||
|
example: 01JAJ3XCD66K3T99JZESCR137W
|
|||
|
type: string
|
|||
|
x-go-name: HeaderMediaID
|
|||
|
header_static:
|
|||
|
description: |-
|
|||
|
账户资料卡横幅背景图的静态版本的 Web 地址。
|
|||
|
仅在账户的主横幅是视频或 gif 时才有用。
|
|||
|
example: https://example.org/media/some_user/header/static/header.png
|
|||
|
type: string
|
|||
|
x-go-name: HeaderStatic
|
|||
|
hide_collections:
|
|||
|
description: |-
|
|||
|
账户选择隐藏他们的粉丝/关注数据。
|
|||
|
如果为 false,则省略键/值。
|
|||
|
type: boolean
|
|||
|
x-go-name: HideCollections
|
|||
|
id:
|
|||
|
description: 账户 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
last_status_at:
|
|||
|
description: 账户上次发帖的时间 (ISO 8601 Date)。
|
|||
|
example: "2021-07-30"
|
|||
|
type: string
|
|||
|
x-go-name: LastStatusAt
|
|||
|
locked:
|
|||
|
description: 账户手动批准关注请求。
|
|||
|
type: boolean
|
|||
|
x-go-name: Locked
|
|||
|
moved:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
mute_expires_at:
|
|||
|
description: |-
|
|||
|
如果此账户被静音/隐藏,静音/隐藏将在何时到期 (ISO 8601 Datetime)。
|
|||
|
如果静音/隐藏是永久的,值将为 null。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: MuteExpiresAt
|
|||
|
note:
|
|||
|
description: 该账户的简介/描述。
|
|||
|
type: string
|
|||
|
x-go-name: Note
|
|||
|
role:
|
|||
|
$ref: '#/definitions/accountRole'
|
|||
|
roles:
|
|||
|
description: |-
|
|||
|
Roles 列出了账户在本实例上的公开身份。
|
|||
|
与 Role 不同,此属性始终可用的,但从不包含权限细节。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/accountDisplayRole'
|
|||
|
type: array
|
|||
|
x-go-name: Roles
|
|||
|
source:
|
|||
|
$ref: '#/definitions/Source'
|
|||
|
statuses_count:
|
|||
|
description: 该账户发布的贴文数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: StatusesCount
|
|||
|
suspended:
|
|||
|
description: 账户已被本站实例封禁。
|
|||
|
type: boolean
|
|||
|
x-go-name: Suspended
|
|||
|
theme:
|
|||
|
description: 用户选择的 CSS 主题的文件名,用于在渲染此账户的资料页或贴文页时包含。例如,`blurple-light.css`。
|
|||
|
type: string
|
|||
|
x-go-name: Theme
|
|||
|
url:
|
|||
|
description: 该账户资料页的 Web 地址。
|
|||
|
example: https://example.org/@some_user
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
username:
|
|||
|
description: 账户的用户名,不包括域名。
|
|||
|
example: some_user
|
|||
|
type: string
|
|||
|
x-go-name: Username
|
|||
|
title: MutedAccount
|
|||
|
description: MutedAccount 扩展了 Account,其中包含仅静音/隐藏用户列表使用的字段。
|
|||
|
type: object
|
|||
|
x-go-name: MutedAccount
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
nodeinfo:
|
|||
|
description: 'NodeInfo 表示版本 2.1 或版本 2.0 的 nodeinfo 数据结构。参见: https://nodeinfo.diaspora.software/schema.html'
|
|||
|
properties:
|
|||
|
metadata:
|
|||
|
additionalProperties: {}
|
|||
|
description: 自由形式的键值对,用于软件特定值。客户端不应依赖于任何特定的键存在。
|
|||
|
type: object
|
|||
|
x-go-name: Metadata
|
|||
|
openRegistrations:
|
|||
|
description: 此服务器是否开放自主注册。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: OpenRegistrations
|
|||
|
protocols:
|
|||
|
description: 服务器支持的协议。
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Protocols
|
|||
|
services:
|
|||
|
$ref: '#/definitions/NodeInfoServices'
|
|||
|
software:
|
|||
|
$ref: '#/definitions/NodeInfoSoftware'
|
|||
|
usage:
|
|||
|
$ref: '#/definitions/NodeInfoUsage'
|
|||
|
version:
|
|||
|
description: NodeInfo 数据结构版本。
|
|||
|
example: "2.0"
|
|||
|
type: string
|
|||
|
x-go-name: Version
|
|||
|
title: Nodeinfo
|
|||
|
type: object
|
|||
|
x-go-name: Nodeinfo
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
notification:
|
|||
|
properties:
|
|||
|
account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
created_at:
|
|||
|
description: 通知的时间戳 (ISO 8601 Datetime)
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
id:
|
|||
|
description: 通知在数据库中的 ID。
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
status:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type:
|
|||
|
description: |-
|
|||
|
触发通知的事件类型。
|
|||
|
follow = 有人关注了你。`account` 将被设置。
|
|||
|
follow_request = 有人请求关注你。`account` 将被设置。
|
|||
|
mention = 有人在他们的贴文中提到了你。`status` 将被设置。`account` 将被设置。
|
|||
|
reblog = 有人转发了你的一条贴文。`status` 将被设置。`account` 将被设置。
|
|||
|
favourite = 有人点赞了你的一条贴文。`status` 将被设置。`account` 将被设置。
|
|||
|
poll = 你参与或创建的一次投票已结束。`status` 将被设置。`account` 将被设置。
|
|||
|
status = 你设置的接收发帖通知的某个账户发布了一条贴文。`status` 将被设置。`account` 将被设置。
|
|||
|
admin.sign_up = 有人在实例上注册了一个新账户。`account` 将被设置。
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
title: Notification
|
|||
|
description: Notification 表示与用户相关的事件的通知。
|
|||
|
type: object
|
|||
|
x-go-name: Notification
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
oauthToken:
|
|||
|
properties:
|
|||
|
access_token:
|
|||
|
description: 用于身份验证的访问令牌。
|
|||
|
type: string
|
|||
|
x-go-name: AccessToken
|
|||
|
created_at:
|
|||
|
description: 生成 OAuth 令牌的时间 (UNIX 时间戳格式的秒)。
|
|||
|
example: 1627644520
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: CreatedAt
|
|||
|
scope:
|
|||
|
description: 此令牌被授予的 OAuth 作用域,以空格分隔。
|
|||
|
example: read write admin
|
|||
|
type: string
|
|||
|
x-go-name: Scope
|
|||
|
token_type:
|
|||
|
description: OAuth 令牌类型。将始终为 'Bearer'。
|
|||
|
example: bearer
|
|||
|
type: string
|
|||
|
x-go-name: TokenType
|
|||
|
title: Token
|
|||
|
description: Token 表示用于 GoToSocial API 身份验证和执行操作的 OAuth 令牌。
|
|||
|
type: object
|
|||
|
x-go-name: Token
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
poll:
|
|||
|
properties:
|
|||
|
emojis:
|
|||
|
description: 渲染投票选项时使用的自定义表情符号。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
type: array
|
|||
|
x-go-name: Emojis
|
|||
|
expired:
|
|||
|
description: 投票是否已结束?
|
|||
|
type: boolean
|
|||
|
x-go-name: Expired
|
|||
|
expires_at:
|
|||
|
description: 投票结束时间 (ISO 8601 Datetime)。
|
|||
|
type: string
|
|||
|
x-go-name: ExpiresAt
|
|||
|
id:
|
|||
|
description: 数据库中投票的 ID。
|
|||
|
example: 01FBYKMD1KBMJ0W6JF1YZ3VY5D
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
multiple:
|
|||
|
description: 投票是否允许多选?
|
|||
|
type: boolean
|
|||
|
x-go-name: Multiple
|
|||
|
options:
|
|||
|
description: 投票的选项。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/pollOption'
|
|||
|
type: array
|
|||
|
x-go-name: Options
|
|||
|
own_votes:
|
|||
|
description: |-
|
|||
|
当使用用户令牌调用时,令牌关联的授权用户选择了哪些选项?包含选项的索引值数组。
|
|||
|
|
|||
|
未提供用户令牌时省略。
|
|||
|
items:
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
type: array
|
|||
|
x-go-name: OwnVotes
|
|||
|
voted:
|
|||
|
description: |-
|
|||
|
当使用用户令牌调用时,令牌关联的授权用户是否已投票?
|
|||
|
|
|||
|
未提供用户令牌时省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: Voted
|
|||
|
voters_count:
|
|||
|
description: 多选投票中有多少个独立账户投票。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: VotersCount
|
|||
|
votes_count:
|
|||
|
description: 收到了多少票。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: VotesCount
|
|||
|
title: Poll
|
|||
|
description: Poll 表示一个附加到贴文的投票。
|
|||
|
type: object
|
|||
|
x-go-name: Poll
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
pollOption:
|
|||
|
properties:
|
|||
|
title:
|
|||
|
description: 投票选项的文本值。格式为字符串。
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
votes_count:
|
|||
|
description: 该选项收到的票数。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: VotesCount
|
|||
|
title: PollOption
|
|||
|
description: PollOption 表示不同投票选项的当前投票计数。
|
|||
|
type: object
|
|||
|
x-go-name: PollOption
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
report:
|
|||
|
properties:
|
|||
|
action_taken:
|
|||
|
description: 管理员是否已对此举报采取行动。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: ActionTaken
|
|||
|
action_taken_at:
|
|||
|
description: |-
|
|||
|
若已采取行动,在何时采取行动?(ISO 8601 Datetime)
|
|||
|
如果未设置/尚未采取行动,则为null。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: ActionTakenAt
|
|||
|
action_taken_comment:
|
|||
|
description: |-
|
|||
|
若已采取行动,管理员在采取行动时发表了什么评论?
|
|||
|
如果未设置/尚未采取行动,则为null。
|
|||
|
example: 账户已被封禁。
|
|||
|
type: string
|
|||
|
x-go-name: ActionTakenComment
|
|||
|
category:
|
|||
|
description: 此举报是在哪个类别下创建的?
|
|||
|
example: spam
|
|||
|
type: string
|
|||
|
x-go-name: Category
|
|||
|
comment:
|
|||
|
description: |-
|
|||
|
提交举报时附带的评论。
|
|||
|
如果未提交评论,则为空。
|
|||
|
example: 此人一直在骚扰我。
|
|||
|
type: string
|
|||
|
x-go-name: Comment
|
|||
|
created_at:
|
|||
|
description: 举报被创建的时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
forwarded:
|
|||
|
description: 用于指示是否应将举报抄送到外站实例的布尔值。
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: Forwarded
|
|||
|
id:
|
|||
|
description: 举报的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
rule_ids:
|
|||
|
description: |-
|
|||
|
与该举报一并提交的实例规则的 ID 数组。
|
|||
|
如果未提交规则 ID,则为空。
|
|||
|
example:
|
|||
|
- 01GPBN5YDY6JKBWE44H7YQBDCQ
|
|||
|
- 01GPBN65PDWSBPWVDD0SQCFFY3
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: RuleIDs
|
|||
|
status_ids:
|
|||
|
description: |-
|
|||
|
与此举报一起提交的贴文的 ID 数组。
|
|||
|
如果未提交贴文 ID,则为空。
|
|||
|
example:
|
|||
|
- 01GPBN5YDY6JKBWE44H7YQBDCQ
|
|||
|
- 01GPBN65PDWSBPWVDD0SQCFFY3
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: StatusIDs
|
|||
|
target_account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
title: Report
|
|||
|
description: Report 是提交给实例的一份举报的抽象模型,可以通过客户端 API 或联合 API 提交。
|
|||
|
type: object
|
|||
|
x-go-name: Report
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
searchResult:
|
|||
|
properties:
|
|||
|
accounts:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
x-go-name: Accounts
|
|||
|
hashtags:
|
|||
|
description: 若为 API v1,则为字符串切片;若为 API v2,则为话题标签切片。
|
|||
|
items: {}
|
|||
|
type: array
|
|||
|
x-go-name: Hashtags
|
|||
|
statuses:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
x-go-name: Statuses
|
|||
|
title: SearchResult
|
|||
|
description: SearchResult 是一次搜索结果的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: SearchResult
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
status:
|
|||
|
properties:
|
|||
|
account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
application:
|
|||
|
$ref: '#/definitions/application'
|
|||
|
bookmarked:
|
|||
|
description: 此贴文已被查看的账户收藏。
|
|||
|
type: boolean
|
|||
|
x-go-name: Bookmarked
|
|||
|
card:
|
|||
|
$ref: '#/definitions/card'
|
|||
|
content:
|
|||
|
description: 此贴文的内容。应为 HTML,但在某些情况下也可能为纯文本。
|
|||
|
example: <p>你好,我是一条嘟文。</p>
|
|||
|
type: string
|
|||
|
x-go-name: Content
|
|||
|
created_at:
|
|||
|
description: 此贴文的创建时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
emojis:
|
|||
|
description: 此贴文内容中使用的自定义表情符号。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
type: array
|
|||
|
x-go-name: Emojis
|
|||
|
favourited:
|
|||
|
description: 此贴文已被查看它的账户点赞。
|
|||
|
type: boolean
|
|||
|
x-go-name: Favourited
|
|||
|
favourites_count:
|
|||
|
description: 此贴文收到的点赞数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FavouritesCount
|
|||
|
filtered:
|
|||
|
description: 此贴文命中的过滤规则列表,如果有命中的过滤规则,还会包含命中原因。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterResult'
|
|||
|
type: array
|
|||
|
x-go-name: Filtered
|
|||
|
id:
|
|||
|
description: 此贴文的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
in_reply_to_account_id:
|
|||
|
description: 此贴文回复的账户的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: InReplyToAccountID
|
|||
|
in_reply_to_id:
|
|||
|
description: 此贴文回复的贴文的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: InReplyToID
|
|||
|
interaction_policy:
|
|||
|
$ref: '#/definitions/interactionPolicy'
|
|||
|
language:
|
|||
|
description: |-
|
|||
|
此贴文的主要语言 (ISO 639 Part 1 两字母语言代码)。当语言未知时将为 null。
|
|||
|
example: en
|
|||
|
type: string
|
|||
|
x-go-name: Language
|
|||
|
local_only:
|
|||
|
description: 若贴文不参与联合,则设置为 "true";否则省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: LocalOnly
|
|||
|
media_attachments:
|
|||
|
description: 附于到此贴文的媒体。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/attachment'
|
|||
|
type: array
|
|||
|
x-go-name: MediaAttachments
|
|||
|
mentions:
|
|||
|
description: 此贴文内容中提及的用户。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/Mention'
|
|||
|
type: array
|
|||
|
x-go-name: Mentions
|
|||
|
muted:
|
|||
|
description: 此贴文下的回复已被查看它的账户静音。
|
|||
|
type: boolean
|
|||
|
x-go-name: Muted
|
|||
|
pinned:
|
|||
|
description: 此贴文已被查看它的账户置顶(仅适用于您自己的贴文)。
|
|||
|
type: boolean
|
|||
|
x-go-name: Pinned
|
|||
|
poll:
|
|||
|
$ref: '#/definitions/poll'
|
|||
|
reblog:
|
|||
|
$ref: '#/definitions/statusReblogged'
|
|||
|
reblogged:
|
|||
|
description: 此贴文已被查看它的账户转发。
|
|||
|
type: boolean
|
|||
|
x-go-name: Reblogged
|
|||
|
reblogs_count:
|
|||
|
description: 此贴文被转发的次数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: ReblogsCount
|
|||
|
replies_count:
|
|||
|
description: 此贴文的回复数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: RepliesCount
|
|||
|
sensitive:
|
|||
|
description: 此贴文包含敏感内容。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Sensitive
|
|||
|
spoiler_text:
|
|||
|
description: 此贴文的主题、摘要或内容警告。
|
|||
|
example: NSFW 警告
|
|||
|
type: string
|
|||
|
x-go-name: SpoilerText
|
|||
|
tags:
|
|||
|
description: 贴文内容中使用的话题标签。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/tag'
|
|||
|
type: array
|
|||
|
x-go-name: Tags
|
|||
|
text:
|
|||
|
description: |-
|
|||
|
贴文的纯文本内容。当贴文被删除时返回,以便用户可以从源文本重新起草,而无需客户端从 HTML 内容中逆向出原始文本。
|
|||
|
type: string
|
|||
|
x-go-name: Text
|
|||
|
uri:
|
|||
|
description: 此贴文的 ActivityPub URI。等同于贴文的 activitypub ID。
|
|||
|
example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: URI
|
|||
|
url:
|
|||
|
description: 此贴文的公开 Web URL。仅当贴文的可见性为 'public' 时,此链接才有效。
|
|||
|
example: https://example.org/@some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
visibility:
|
|||
|
description: 此贴文的可见性。
|
|||
|
example: unlisted
|
|||
|
type: string
|
|||
|
x-go-name: Visibility
|
|||
|
title: Status
|
|||
|
description: Status 表示一条贴文或帖子。
|
|||
|
type: object
|
|||
|
x-go-name: Status
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
statusEdit:
|
|||
|
description: |-
|
|||
|
StatusEdit 表示一条贴文的一个历史修订版本,包含该修订版本的状态的部分信息。
|
|||
|
properties:
|
|||
|
account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
content:
|
|||
|
description: |-
|
|||
|
本次修订的贴文内容。
|
|||
|
应为 HTML,但在某些情况下也可能为纯文本。
|
|||
|
example: <p>这是一条嘟文。</p>
|
|||
|
type: string
|
|||
|
x-go-name: Content
|
|||
|
created_at:
|
|||
|
description: 此修订版本创建的时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
emojis:
|
|||
|
description: 渲染此贴文时用到的自定义表情符号。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
type: array
|
|||
|
x-go-name: Emojis
|
|||
|
media_attachments:
|
|||
|
description: 此贴文随附的媒体。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/attachment'
|
|||
|
type: array
|
|||
|
x-go-name: MediaAttachments
|
|||
|
poll:
|
|||
|
$ref: '#/definitions/poll'
|
|||
|
sensitive:
|
|||
|
description: 贴文在本次编辑中被标记为敏感。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Sensitive
|
|||
|
spoiler_text:
|
|||
|
description: 本次编辑中设定的贴文主题、摘要或内容警告。
|
|||
|
example: warning nsfw
|
|||
|
type: string
|
|||
|
x-go-name: SpoilerText
|
|||
|
type: object
|
|||
|
x-go-name: StatusEdit
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
statusReblogged:
|
|||
|
properties:
|
|||
|
account:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
application:
|
|||
|
$ref: '#/definitions/application'
|
|||
|
bookmarked:
|
|||
|
description: 此贴文已被查看它的账户收藏。
|
|||
|
type: boolean
|
|||
|
x-go-name: Bookmarked
|
|||
|
card:
|
|||
|
$ref: '#/definitions/card'
|
|||
|
content:
|
|||
|
description: 此贴文的内容。应为 HTML,但在某些情况下也可能为纯文本。
|
|||
|
example: <p>这是一条嘟文。</p>
|
|||
|
type: string
|
|||
|
x-go-name: Content
|
|||
|
created_at:
|
|||
|
description: 此贴文的创建时间 (ISO 8601 Datetime)。
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
emojis:
|
|||
|
description: 渲染此贴文时使用的自定义表情符号。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
type: array
|
|||
|
x-go-name: Emojis
|
|||
|
favourited:
|
|||
|
description: 此贴文已被查看它的账户点赞。
|
|||
|
type: boolean
|
|||
|
x-go-name: Favourited
|
|||
|
favourites_count:
|
|||
|
description: 此贴文收到的点赞数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: FavouritesCount
|
|||
|
filtered:
|
|||
|
description: 此贴文命中的过滤规则列表,如果有命中的过滤规则,还会包含命中原因。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterResult'
|
|||
|
type: array
|
|||
|
x-go-name: Filtered
|
|||
|
id:
|
|||
|
description: 贴文的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
in_reply_to_account_id:
|
|||
|
description: 贴文回复的账户的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: InReplyToAccountID
|
|||
|
in_reply_to_id:
|
|||
|
description: 此贴文回复的贴文的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: InReplyToID
|
|||
|
interaction_policy:
|
|||
|
$ref: '#/definitions/interactionPolicy'
|
|||
|
language:
|
|||
|
description: |-
|
|||
|
此贴文的主要语言 (ISO 639 Part 1 两字母语言代码)。
|
|||
|
当语言未知时将为 null。
|
|||
|
example: zh
|
|||
|
type: string
|
|||
|
x-go-name: Language
|
|||
|
local_only:
|
|||
|
description: 若贴文不参与联合,则设置为 "true";否则省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: LocalOnly
|
|||
|
media_attachments:
|
|||
|
description: 随附到此贴文的媒体。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/attachment'
|
|||
|
type: array
|
|||
|
x-go-name: MediaAttachments
|
|||
|
mentions:
|
|||
|
description: 此贴文内容中提及的用户。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/Mention'
|
|||
|
type: array
|
|||
|
x-go-name: Mentions
|
|||
|
muted:
|
|||
|
description: 此贴文下的回复已被查看它的账户静音。
|
|||
|
type: boolean
|
|||
|
x-go-name: Muted
|
|||
|
pinned:
|
|||
|
description: 此贴文已被查看它的账户置顶(仅适用于您自己的贴文)。
|
|||
|
type: boolean
|
|||
|
x-go-name: Pinned
|
|||
|
poll:
|
|||
|
$ref: '#/definitions/poll'
|
|||
|
reblog:
|
|||
|
$ref: '#/definitions/statusReblogged'
|
|||
|
reblogged:
|
|||
|
description: 此贴文已被查看它的账户转发。
|
|||
|
type: boolean
|
|||
|
x-go-name: Reblogged
|
|||
|
reblogs_count:
|
|||
|
description: 此贴文被转发的次数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: ReblogsCount
|
|||
|
replies_count:
|
|||
|
description: 此贴文的回复数,数据来源于本站实例。
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
x-go-name: RepliesCount
|
|||
|
sensitive:
|
|||
|
description: 贴文包含敏感内容。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Sensitive
|
|||
|
spoiler_text:
|
|||
|
description: 此贴文的主题、摘要或内容警告。
|
|||
|
example: NSFW
|
|||
|
type: string
|
|||
|
x-go-name: SpoilerText
|
|||
|
tags:
|
|||
|
description: 此贴文内容中使用的话题标签。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/tag'
|
|||
|
type: array
|
|||
|
x-go-name: Tags
|
|||
|
text:
|
|||
|
description: |-
|
|||
|
此贴文的纯文本内容。当贴文被删除时返回,以便用户可以从源文本重新起草,而无需客户端从 HTML 内容中逆向出原始文本。
|
|||
|
type: string
|
|||
|
x-go-name: Text
|
|||
|
uri:
|
|||
|
description: 此贴文的 ActivityPub URI。等同于贴文的 activitypub ID。
|
|||
|
example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: URI
|
|||
|
url:
|
|||
|
description: 此贴文的公开 Web URL。仅当贴文的可见性为 'public' 时,此链接才有效。
|
|||
|
example: https://example.org/@some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
visibility:
|
|||
|
description: 此贴文的可见性。
|
|||
|
example: unlisted
|
|||
|
type: string
|
|||
|
x-go-name: Visibility
|
|||
|
title: StatusReblogged
|
|||
|
description: StatusReblogged 表示一条被转发的贴文。
|
|||
|
type: object
|
|||
|
x-go-name: StatusReblogged
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
statusSource:
|
|||
|
description: |-
|
|||
|
StatusSource 表示创建贴文时提交给 API 的贴文源文本。
|
|||
|
properties:
|
|||
|
id:
|
|||
|
description: 贴文的 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
spoiler_text:
|
|||
|
description: 贴文折叠提示的纯文本版本。
|
|||
|
type: string
|
|||
|
x-go-name: SpoilerText
|
|||
|
text:
|
|||
|
description: 贴文的源文本。
|
|||
|
type: string
|
|||
|
x-go-name: Text
|
|||
|
type: object
|
|||
|
x-go-name: StatusSource
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
swaggerCollection:
|
|||
|
properties:
|
|||
|
'@context':
|
|||
|
description: |-
|
|||
|
ActivityStreams JSON-LD 上下文。
|
|||
|
字符串或字符串数组,或更复杂的嵌套项。
|
|||
|
example: https://www.w3.org/ns/activitystreams
|
|||
|
x-go-name: Context
|
|||
|
first:
|
|||
|
$ref: '#/definitions/swaggerCollectionPage'
|
|||
|
id:
|
|||
|
description: ActivityStreams ID.
|
|||
|
example: https://example.org/users/some_user/statuses/106717595988259568/replies
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
last:
|
|||
|
$ref: '#/definitions/swaggerCollectionPage'
|
|||
|
type:
|
|||
|
description: ActivityStreams 类型。
|
|||
|
example: Collection
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
title: SwaggerCollection
|
|||
|
description: SwaggerCollection 表示一个 ActivityPub 集合。
|
|||
|
type: object
|
|||
|
x-go-name: SwaggerCollection
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users
|
|||
|
swaggerCollectionPage:
|
|||
|
properties:
|
|||
|
id:
|
|||
|
description: ActivityStreams ID.
|
|||
|
example: https://example.org/users/some_user/statuses/106717595988259568/replies?page=true
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
items:
|
|||
|
description: 此页面上的条目。
|
|||
|
example:
|
|||
|
- https://example.org/users/some_other_user/statuses/086417595981111564
|
|||
|
- https://another.example.com/users/another_user/statuses/01FCN8XDV3YG7B4R42QA6YQZ9R
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Items
|
|||
|
next:
|
|||
|
description: 指向下一页的链接。
|
|||
|
example: https://example.org/users/some_user/statuses/106717595988259568/replies?only_other_accounts=true&page=true
|
|||
|
type: string
|
|||
|
x-go-name: Next
|
|||
|
partOf:
|
|||
|
description: 此页面所属的集合。
|
|||
|
example: https://example.org/users/some_user/statuses/106717595988259568/replies
|
|||
|
type: string
|
|||
|
x-go-name: PartOf
|
|||
|
type:
|
|||
|
description: ActivityStreams 类型。
|
|||
|
example: CollectionPage
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
title: SwaggerCollectionPage
|
|||
|
description: SwaggerCollectionPage 表示一个 ActivityPub 集合的一页。
|
|||
|
type: object
|
|||
|
x-go-name: SwaggerCollectionPage
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users
|
|||
|
swaggerFeaturedCollection:
|
|||
|
properties:
|
|||
|
'@context':
|
|||
|
description: |-
|
|||
|
ActivityStreams JSON-LD 上下文。
|
|||
|
字符串或字符串数组,或更复杂的嵌套项。
|
|||
|
example: https://www.w3.org/ns/activitystreams
|
|||
|
x-go-name: Context
|
|||
|
TotalItems:
|
|||
|
description: 此集合中的项目数。
|
|||
|
example: 2
|
|||
|
format: int64
|
|||
|
type: integer
|
|||
|
id:
|
|||
|
description: ActivityStreams ID.
|
|||
|
example: https://example.org/users/some_user/collections/featured
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
items:
|
|||
|
description: 贴文 URI 的列表。
|
|||
|
example:
|
|||
|
- https://example.org/users/some_user/statuses/01GSZ0F7Q8SJKNRF777GJD271R
|
|||
|
- https://example.org/users/some_user/statuses/01GSZ0G012CBQ7TEKX689S3QRE
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Items
|
|||
|
type:
|
|||
|
description: ActivityStreams 类型。
|
|||
|
example: OrderedCollection
|
|||
|
type: string
|
|||
|
x-go-name: Type
|
|||
|
title: SwaggerFeaturedCollection
|
|||
|
description: SwaggerFeaturedCollection 表示一个有序 ActivityPub 集合。
|
|||
|
type: object
|
|||
|
x-go-name: SwaggerFeaturedCollection
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users
|
|||
|
tag:
|
|||
|
properties:
|
|||
|
following:
|
|||
|
description: |-
|
|||
|
Following 在当用户关注此标签时为 true,不关注时为 false,如果没有当前认证用户则省略。
|
|||
|
type: boolean
|
|||
|
x-go-name: Following
|
|||
|
history:
|
|||
|
description: |-
|
|||
|
此话题标签的使用历史。
|
|||
|
目前只是一个存根,如果提供将始终为空数组。
|
|||
|
example: []
|
|||
|
items: {}
|
|||
|
type: array
|
|||
|
x-go-name: History
|
|||
|
name:
|
|||
|
description: '此话题标签的名称,不包含 # 符号。'
|
|||
|
example: helloworld
|
|||
|
type: string
|
|||
|
x-go-name: Name
|
|||
|
url:
|
|||
|
description: 此话题标签的网页链接。
|
|||
|
example: https://example.org/tags/helloworld
|
|||
|
type: string
|
|||
|
x-go-name: URL
|
|||
|
title: Tag
|
|||
|
description: Tag 表示贴文内容中使用的某个话题标签。
|
|||
|
type: object
|
|||
|
x-go-name: Tag
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
theme:
|
|||
|
properties:
|
|||
|
description:
|
|||
|
description: 此主题面向用户的描述。
|
|||
|
type: string
|
|||
|
x-go-name: Description
|
|||
|
file_name:
|
|||
|
description: 此主题在主题目录中的文件名。
|
|||
|
type: string
|
|||
|
x-go-name: FileName
|
|||
|
title:
|
|||
|
description: 此主题的用户可见标题。
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
title: Theme
|
|||
|
description: Theme 表示一个用户可选的预设 CSS 主题。
|
|||
|
type: object
|
|||
|
x-go-name: Theme
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
threadContext:
|
|||
|
description: |-
|
|||
|
ThreadContext 是围绕给定贴文的贴文树/贴文串的抽象模型。
|
|||
|
properties:
|
|||
|
ancestors:
|
|||
|
description: 此贴文的祖先。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
x-go-name: Ancestors
|
|||
|
descendants:
|
|||
|
description: 此贴文的后代。
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
x-go-name: Descendants
|
|||
|
type: object
|
|||
|
x-go-name: ThreadContext
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
user:
|
|||
|
properties:
|
|||
|
admin:
|
|||
|
description: 用户为管理员。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Admin
|
|||
|
approved:
|
|||
|
description: 用户已被管理员批准。
|
|||
|
example: true
|
|||
|
type: boolean
|
|||
|
x-go-name: Approved
|
|||
|
confirmation_sent_at:
|
|||
|
description: 上次发送“请确认您的电子邮件地址”电子邮件的时间(如果有的话)。 (ISO 8601 Datetime)
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: ConfirmationSentAt
|
|||
|
confirmed_at:
|
|||
|
description: 用户填写的电子邮件地址被确认的时间,如果有的话。 (ISO 8601 Datetime)
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: ConfirmedAt
|
|||
|
created_at:
|
|||
|
description: 用户创建时间。 (ISO 8601 Datetime)
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: CreatedAt
|
|||
|
disabled:
|
|||
|
description: 用户的帐户已被停用。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Disabled
|
|||
|
email:
|
|||
|
description: 用户确认的电子邮件地址(如果用户设置了电子邮件地址)。
|
|||
|
example: someone@example.org
|
|||
|
type: string
|
|||
|
x-go-name: Email
|
|||
|
id:
|
|||
|
description: 此用户的数据库 ID。
|
|||
|
example: 01FBVD42CQ3ZEEVMW180SBX03B
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
last_emailed_at:
|
|||
|
description: 上次给此用户发送电子邮件的时间,如果有的话。 (ISO 8601 Datetime)
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: LastEmailedAt
|
|||
|
moderator:
|
|||
|
description: 用户为站务/监察员。
|
|||
|
example: false
|
|||
|
type: boolean
|
|||
|
x-go-name: Moderator
|
|||
|
reason:
|
|||
|
description: 用户注册原因(如果用户注册时填写了原因)。
|
|||
|
example: Please! Pretty please!
|
|||
|
type: string
|
|||
|
x-go-name: Reason
|
|||
|
reset_password_sent_at:
|
|||
|
description: 上次发送“请重置您的密码”电子邮件的时间(如果有的话)。 (ISO 8601 Datetime)
|
|||
|
example: "2021-07-30T09:20:25+00:00"
|
|||
|
type: string
|
|||
|
x-go-name: ResetPasswordSentAt
|
|||
|
unconfirmed_email:
|
|||
|
description: 此用户的未确认电子邮件地址(如果用户设置了电子邮件地址)。
|
|||
|
example: someone.else@somewhere.else.example.org
|
|||
|
type: string
|
|||
|
x-go-name: UnconfirmedEmail
|
|||
|
title: User
|
|||
|
description: User 是单个用户的相关字段的抽象模型。
|
|||
|
type: object
|
|||
|
x-go-name: User
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
wellKnownResponse:
|
|||
|
properties:
|
|||
|
aliases:
|
|||
|
items:
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
x-go-name: Aliases
|
|||
|
links:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/Link'
|
|||
|
type: array
|
|||
|
x-go-name: Links
|
|||
|
subject:
|
|||
|
type: string
|
|||
|
x-go-name: Subject
|
|||
|
title: WellKnownResponse
|
|||
|
description: |-
|
|||
|
WellKnownResponse 表示对“acct”资源的 webfinger 请求或对 nodeinfo 请求的响应。
|
|||
|
例如,访问 https://example.org/.well-known/webfinger?resource=acct:some_username@example.org 时将返回一个此类型的响应。
|
|||
|
参见 https://webfinger.net/
|
|||
|
type: object
|
|||
|
x-go-name: WellKnownResponse
|
|||
|
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
|
|||
|
host: example.org
|
|||
|
info:
|
|||
|
contact:
|
|||
|
email: admin@gotosocial.org
|
|||
|
name: 全体 GotoSocial 开发者
|
|||
|
license:
|
|||
|
name: AGPL3
|
|||
|
url: https://www.gnu.org/licenses/agpl-3.0.zh-cn.html
|
|||
|
title: GoToSocial Swagger 文档
|
|||
|
version: 0.17.2-SNAPSHOT-8a93300a
|
|||
|
paths:
|
|||
|
/.well-known/host-meta:
|
|||
|
get:
|
|||
|
description: '响应 web 主机元数据查询,返回符合规范的 hostmeta 响应。参见: https://www.rfc-editor.org/rfc/rfc6415.html'
|
|||
|
operationId: hostMetaGet
|
|||
|
produces:
|
|||
|
- application/xrd+xml"
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/hostmeta'
|
|||
|
summary: 获取 host-meta
|
|||
|
tags:
|
|||
|
- .well-known
|
|||
|
/.well-known/nodeinfo:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
返回一个 well-known 响应,将调用者重定向到 `/nodeinfo/2.0`。
|
|||
|
例如: `{"links":[{"rel":"http://nodeinfo.diaspora.software/ns/schema/2.0","href":"http://example.org/nodeinfo/2.0"}]}`
|
|||
|
参见: https://nodeinfo.diaspora.software/protocol.html
|
|||
|
operationId: nodeInfoWellKnownGet
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/wellKnownResponse'
|
|||
|
summary: 获取 nodeinfo
|
|||
|
tags:
|
|||
|
- .well-known
|
|||
|
/.well-known/webfinger:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
处理 webfinger 账户查询请求。
|
|||
|
例如,对 `https://example.org/.well-known/webfinger?resource=acct:admin@example.org` 发送 GET 请求,将返回:
|
|||
|
```
|
|||
|
{"subject":"acct:admin@example.org","aliases":["https://example.org/users/admin","https://example.org/@admin"],"links":[{"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://example.org/@admin"},{"rel":"self","type":"application/activity+json","href":"https://example.org/users/admin"}]}
|
|||
|
```
|
|||
|
参见: https://webfinger.net/
|
|||
|
operationId: webfingerGet
|
|||
|
produces:
|
|||
|
- application/jrd+json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/wellKnownResponse'
|
|||
|
summary: Webfinger 账户查询
|
|||
|
tags:
|
|||
|
- .well-known
|
|||
|
/api/{api_version}/media:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: mediaCreate
|
|||
|
parameters:
|
|||
|
- description: 要使用的 API 版本。必须是 `v1` 或 `v2`。
|
|||
|
in: path
|
|||
|
name: api_version
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 媒体附件的 alt 文本描述。这对于使用屏幕阅读器的用户非常有用!根据您的实例设置,可能需要也可能不需要。
|
|||
|
in: formData
|
|||
|
name: description
|
|||
|
type: string
|
|||
|
- default: 0,0
|
|||
|
description: '媒体附件的焦点。如果存在,它应该是两个介于 -1 和 1 之间的逗号分隔的浮点数。例如:`-0.5,0.25`。'
|
|||
|
in: formData
|
|||
|
name: focus
|
|||
|
type: string
|
|||
|
- description: 要上传的媒体附件。
|
|||
|
in: formData
|
|||
|
name: file
|
|||
|
required: true
|
|||
|
type: file
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的媒体附件。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/attachment'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:media
|
|||
|
summary: 上传新附件
|
|||
|
description: 上传新的媒体附件。
|
|||
|
tags:
|
|||
|
- media
|
|||
|
/api/{api_version}/search:
|
|||
|
get:
|
|||
|
description: 在本站或其他地方搜索贴文、帐户或话题标签。如果结果中包含贴文,则它们将按时间顺序(最新的在前)返回,带有连续的 ID(更大 = 更新)。
|
|||
|
operationId: searchGet
|
|||
|
parameters:
|
|||
|
- description: 必须是 `v1` 或 `v2`。如果使用 v1,Hashtag 结果将是字符串切片。如果使用 v2,Hashtag 结果将是 apimodel 标签切片。
|
|||
|
in: path
|
|||
|
name: api_version
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 仅返回 *早于* 给定的 max ID 的项目。当前仅在将 type 设置为特定类型时使用。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回 *晚于且紧邻* 给定的 min ID 的项目。当前仅在将 type 设置为特定类型时使用。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的每种项目的数量。
|
|||
|
in: query
|
|||
|
maximum: 40
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- default: 0
|
|||
|
description: 要返回的结果的页数(从 0 开始)。该参数目前未使用,请通过选择特定的查询类型并使用 maxID 和 minID 来分页。
|
|||
|
in: query
|
|||
|
maximum: 10
|
|||
|
minimum: 0
|
|||
|
name: offset
|
|||
|
type: integer
|
|||
|
- description: |-
|
|||
|
要搜索的关键词。这可以是以下形式之一:
|
|||
|
- `@[username]` -- 搜索任何实例上具有给定用户名的帐户。可以返回多个结果。
|
|||
|
- `@[username]@[domain]` -- 精确匹配给定的用户名和实例域名的外站帐户。最多只会返回 1 个结果。
|
|||
|
- `https://example.org/some/arbitrary/url` -- 搜索具有给定 URL 的账户或贴文。最多只会返回 1 个结果。
|
|||
|
- `#[hashtag_name]` -- 搜索具有给定话题标签名称或以给定话题标签名称开头的话题标签。不区分大小写。可以返回多个结果。
|
|||
|
- 任意字符串 -- 搜索包含给定字符串的帐户或贴文。可以返回多个结果。
|
|||
|
|
|||
|
任意字符串搜索可以包括以下运算符:
|
|||
|
- `from:localuser`,`from:remoteuser@instance.tld`:将结果限制为由指定帐户创建的贴文。
|
|||
|
in: query
|
|||
|
name: q
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要返回的项目类型。可以是以下之一:
|
|||
|
- `` -- 空字符串;返回任何/所有结果。
|
|||
|
- `accounts` -- 仅返回帐户。
|
|||
|
- `statuses` -- 仅返回贴文。
|
|||
|
- `hashtags` -- 仅返回话题标签。
|
|||
|
如果指定了 `type`,则可以使用 max_id 和 min_id 参数进行分页。
|
|||
|
如果未指定 `type`,使用 `offset` 参数进行分页。
|
|||
|
in: query
|
|||
|
name: type
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: 若搜索关键词是 `@[username]@[domain]` 或 URL,则允许 GoToSocial 实例通过外站调用(webfinger、ActivityPub 等)来解析搜索关键词。
|
|||
|
in: query
|
|||
|
name: resolve
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 若搜索类型包括帐户,并且搜索关键词是任意字符串,则仅显示请求帐户关注的帐户。如果设置为 `true`,则 GoToSocial 将在用户名和昵称之外同时检索账户信息来增强搜索。
|
|||
|
in: query
|
|||
|
name: following
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 若搜索类型包括话题标签,并且搜索关键词是任意字符串,则排除尚未被实例管理员批准的话题标签。目前此参数未使用。
|
|||
|
in: query
|
|||
|
name: exclude_unreviewed
|
|||
|
type: boolean
|
|||
|
- description: 将搜索范围限制到由指定帐户创建的贴文。
|
|||
|
in: query
|
|||
|
name: account_id
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 搜索结果。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/searchResult'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:search
|
|||
|
summary: 搜索
|
|||
|
tags:
|
|||
|
- search
|
|||
|
/api/v1/accounts:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
使用应用程序令牌创建新帐户。
|
|||
|
若 Content-Type 为 `application/json`,则参数也可在请求体中以 JSON 形式给出。
|
|||
|
若 Content-Type 为 `application/xml`,则参数也可在请求体中以 XML 形式给出。
|
|||
|
operationId: accountCreate
|
|||
|
parameters:
|
|||
|
- description: 若注册需要手动批准,则此文本将由管理员审核。
|
|||
|
in: query
|
|||
|
name: reason
|
|||
|
type: string
|
|||
|
x-go-name: Reason
|
|||
|
- description: 账户设置的用户名。
|
|||
|
in: query
|
|||
|
name: username
|
|||
|
type: string
|
|||
|
x-go-name: Username
|
|||
|
- description: 用于登录的电子邮件地址。
|
|||
|
in: query
|
|||
|
name: email
|
|||
|
type: string
|
|||
|
x-go-name: Email
|
|||
|
- description: 用于登录的密码。将在存储之前进行哈希处理。
|
|||
|
in: query
|
|||
|
name: password
|
|||
|
type: string
|
|||
|
x-go-name: Password
|
|||
|
- description: 用户同意实例的条款、条件和政策。
|
|||
|
in: query
|
|||
|
name: agreement
|
|||
|
type: boolean
|
|||
|
x-go-name: Agreement
|
|||
|
- description: 确认邮件的语言。
|
|||
|
in: query
|
|||
|
name: locale
|
|||
|
type: string
|
|||
|
x-go-name: Locale
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 为新创建的帐户提供的 OAuth2 访问令牌。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/oauthToken'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理. 你的帐户创建请求无法处理,因为在过去的 24 小时内在此实例上创建了太多帐户,或者待处理的帐户积压已满。
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Application:
|
|||
|
- write:accounts
|
|||
|
summary: 创建新帐户
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}:
|
|||
|
get:
|
|||
|
operationId: accountGet
|
|||
|
parameters:
|
|||
|
- description: 请求的帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的帐户。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 获取账户详情
|
|||
|
description: 获取具有给定 ID 的帐户的信息。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/block:
|
|||
|
post:
|
|||
|
operationId: accountBlock
|
|||
|
parameters:
|
|||
|
- description: 要屏蔽的帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与帐户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:blocks
|
|||
|
summary: 屏蔽帐户
|
|||
|
description: 屏蔽具有给定 ID 的帐户。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/follow:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
关注具有给定 ID 的帐户。
|
|||
|
|
|||
|
若 Content-Type 为 `application/json`,则参数也可在请求体中以 JSON 形式给出。
|
|||
|
若 Content-Type 为 `application/xml`,则参数也可在请求体中以 XML 形式给出。
|
|||
|
|
|||
|
若您已经关注了给定的帐户,则关注(请求)将被更新,不会使用 `reblogs` 和 `notify` 参数。
|
|||
|
operationId: accountFollow
|
|||
|
parameters:
|
|||
|
- description: 要关注的帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: true
|
|||
|
description: 显示此帐户的转发。
|
|||
|
in: formData
|
|||
|
name: reblogs
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 该账户发帖时通知。
|
|||
|
in: formData
|
|||
|
name: notify
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此帐户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:follows
|
|||
|
summary: 关注帐户
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/followers:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看关注此帐户的帐户。
|
|||
|
下一个/上一个查询可以从返回的 Link 标头中解析。
|
|||
|
例如:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/accounts/0657WMDEC3KQDTD6NZ4XJZBK4M/followers?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/accounts/0657WMDEC3KQDTD6NZ4XJZBK4M/followers?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
```
|
|||
|
若帐户 `hide_collections` 为 true,且请求帐户 != 目标帐户,则不会返回结果。
|
|||
|
operationId: accountFollowers
|
|||
|
parameters:
|
|||
|
- description: 帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: '仅返回早于给定的max ID 的粉丝帐户。具有指定 ID 的粉丝帐户不会包含在响应中。注意:ID 是内部关注的 ID,而不是任何返回的帐户的 ID。'
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: '仅返回晚于给定的 since ID 的粉丝帐户。具有指定 ID 的粉丝帐户不会包含在响应中。注意:ID 是内部关注的 ID,而不是任何返回的帐户的 ID。'
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: '仅返回 *晚于且紧邻* 给定的 min ID 的粉丝帐户。具有指定 ID 的粉丝帐户不会包含在响应中。注意:ID 是内部关注的 ID,而不是任何返回的帐户的 ID。'
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: 要返回的粉丝帐户数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 一个关注此帐户的帐户的数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 指向下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 查看粉丝
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/following:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查询此ID对应的帐户关注的帐户。
|
|||
|
下一个/上一个查询可以从返回的 Link 标头中解析。
|
|||
|
示例:
|
|||
|
```
|
|||
|
<https://example.org/api/v1/accounts/0657WMDEC3KQDTD6NZ4XJZBK4M/following?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/accounts/0657WMDEC3KQDTD6NZ4XJZBK4M/following?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
```
|
|||
|
若帐户 `hide_collections` 为 true,且请求帐户 != 目标帐户,则不会返回结果。
|
|||
|
operationId: accountFollowing
|
|||
|
parameters:
|
|||
|
- description: Account ID.
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: '仅返回早于给定的 max ID 的关注帐户。具有指定 ID 的关注帐户不会包含在响应中。注意:ID 是内部关注的 ID,而不是任何返回的帐户的 ID。'
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: '仅返回晚于给定的 since ID 的关注帐户。具有指定 ID 的关注帐户不会包含在响应中。注意:ID 是内部关注的 ID,而不是任何返回的帐户的 ID。'
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: '仅返回 *晚于且紧邻* 给定的 min ID 的关注帐户。具有指定 ID 的关注帐户不会包含在响应中。注意:ID 是内部关注的 ID,而不是任何返回的帐户的 ID。'
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: 要返回的关注帐户数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 此账户关注的账户数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 指向下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 查看关注
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/lists:
|
|||
|
get:
|
|||
|
operationId: accountLists
|
|||
|
parameters:
|
|||
|
- description: 账户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 一个包含此帐户的所有列表的数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/list'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 查看列表
|
|||
|
description: 查看你的列表中包含此帐户的所有列表。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/mute:
|
|||
|
post:
|
|||
|
description: 根据 ID 静音/隐藏帐户。若此账户已被静音/隐藏,则无论如何都会成功。这可以用来更新静音/隐藏的细节。
|
|||
|
operationId: accountMute
|
|||
|
parameters:
|
|||
|
- description: 要静音/隐藏的帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: 在静音/隐藏贴文的同时也静音/隐藏通知。
|
|||
|
in: formData
|
|||
|
name: notifications
|
|||
|
type: boolean
|
|||
|
- default: 0
|
|||
|
description: 静音/隐藏持续时间,以秒为单位。如果为 0 或未提供,则静音/隐藏持续时间无限。
|
|||
|
in: formData
|
|||
|
name: duration
|
|||
|
type: number
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此帐户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户设置静音/隐藏
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:mutes
|
|||
|
summary: 静音/隐藏帐户
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/note:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: accountNote
|
|||
|
parameters:
|
|||
|
- description: 备注要添加到的帐户的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: ""
|
|||
|
description: 备注的文本。省略此参数或发送空字符串以清除备注。
|
|||
|
in: formData
|
|||
|
name: comment
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此账户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 设置备注
|
|||
|
description: 为具有给定 ID 的帐户设置私人备注。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/statuses:
|
|||
|
get:
|
|||
|
description: 查看指定账户的贴文。贴文将按时间顺序(最新的在前)返回,带有连续的 ID(更大 = 更新)。
|
|||
|
operationId: accountStatuses
|
|||
|
parameters:
|
|||
|
- description: 账户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: 30
|
|||
|
description: 要返回的贴文数量。
|
|||
|
in: query
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- default: false
|
|||
|
description: 排除回复。
|
|||
|
in: query
|
|||
|
name: exclude_replies
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 排除转发。
|
|||
|
in: query
|
|||
|
name: exclude_reblogs
|
|||
|
type: boolean
|
|||
|
- description: 仅返回 *早于* 给定的 max status ID 的项目。当前仅在将 type 设置为特定类型时使用。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回 *晚于* 给定的 min status ID 的项目。当前仅在将 type 设置为特定类型时使用。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: 仅显示置顶的贴文。即排除未置顶到给定帐户 ID 的贴文。
|
|||
|
in: query
|
|||
|
name: pinned
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 仅显示带有媒体附件的贴文。
|
|||
|
in: query
|
|||
|
name: only_media
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 仅显示具有“公开”可见性的贴文。
|
|||
|
in: query
|
|||
|
name: only_public
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 贴文的数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 查看贴文
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/unblock:
|
|||
|
post:
|
|||
|
operationId: accountUnblock
|
|||
|
parameters:
|
|||
|
- description: 要解除屏蔽的帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此账户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:blocks
|
|||
|
summary: 解除屏蔽账户
|
|||
|
description: 解除对给定 ID 的帐户的屏蔽。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/unfollow:
|
|||
|
post:
|
|||
|
operationId: accountUnfollow
|
|||
|
parameters:
|
|||
|
- description: 要取消关注的帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此账户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:follows
|
|||
|
summary: 取关账户
|
|||
|
description: 取消关注具有给定 ID 的帐户。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/{id}/unmute:
|
|||
|
post:
|
|||
|
description: 解除对给定 ID 的帐户的静音/隐藏。若账户已被解除静音/隐藏,则无论如何都会成功。
|
|||
|
operationId: accountUnmute
|
|||
|
parameters:
|
|||
|
- description: 要解除静音/隐藏的帐户 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此账户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:mutes
|
|||
|
summary: 取消静音/隐藏账户
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/alias:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: |-
|
|||
|
通过将 alsoKnownAs 设置为给定的 URI,将此账户设置为另一个账户的别名。
|
|||
|
|
|||
|
在需要将其它账户迁移到此账户时很有用。
|
|||
|
|
|||
|
在这种情况下,你应该将此账户的 alsoKnownAs 设置为要发起迁移的账户的 URI。
|
|||
|
operationId: accountAlias
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
要设为别名的账户的 ActivityPub URI/ID。例如,`["https://example.org/users/some_account"]`。
|
|||
|
使用空数组也可以清除 alsoKnownAs,清除账户别名。
|
|||
|
in: formData
|
|||
|
name: also_known_as_uris
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的账户。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理。请查看响应正文以获取更多详细信息。
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 设置账户别名
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/delete:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: accountDelete
|
|||
|
parameters:
|
|||
|
- description: 账户的密码,用于确认。
|
|||
|
in: formData
|
|||
|
name: password
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: 账户删除请求已被接受,账户将被删除。
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 删除账户
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/lookup:
|
|||
|
get:
|
|||
|
operationId: accountLookupGet
|
|||
|
parameters:
|
|||
|
- description: 要查询的用户名或 Webfinger 地址。
|
|||
|
in: query
|
|||
|
name: acct
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 查询结果。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 快速查找账户
|
|||
|
description: 快速查找用户名以查看其是否可用,跳过 WebFinger 解析。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/move:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: accountMove
|
|||
|
parameters:
|
|||
|
- description: 账户的密码,用于确认。
|
|||
|
in: formData
|
|||
|
name: password
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 目标账户的 ActivityPub URI/ID。例如,`https://example.org/users/some_account`。目标账户必须也是请求账户的 alsoKnownAs,才能成功迁移。
|
|||
|
in: formData
|
|||
|
name: moved_to_uri
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: 账户迁移请求已被接受,账户将被迁移。
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理。请查看响应正文以获取更多详细信息。
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 迁出账户
|
|||
|
description: 将此账户迁移到另一个账户。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/relationships:
|
|||
|
get:
|
|||
|
operationId: accountRelationships
|
|||
|
parameters:
|
|||
|
- collectionFormat: multi
|
|||
|
description: 账户 ID。
|
|||
|
in: query
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: id[]
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 账户关系(relationship)的数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 查询账户关系
|
|||
|
description: 查看你的账户与给定账户 ID 的关系。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/search:
|
|||
|
get:
|
|||
|
operationId: accountSearchGet
|
|||
|
parameters:
|
|||
|
- default: 40
|
|||
|
description: 要返回的结果数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- default: 0
|
|||
|
description: 要返回的结果所在的页数(从 0 开始)。此参数目前未使用,偏移量大于 0 将始终返回 0 个结果。
|
|||
|
in: query
|
|||
|
maximum: 10
|
|||
|
minimum: 0
|
|||
|
name: offset
|
|||
|
type: integer
|
|||
|
- description: |-
|
|||
|
要查找的关键词。可以是以下形式之一:
|
|||
|
- `@[username]` -- 在任何实例上搜索具有给定用户名的帐户。可以返回多个结果。
|
|||
|
- `@[username]@[domain]` -- 搜索确切的用户名和域名的外站帐户。最多只返回 1 个结果。
|
|||
|
- 任意字符串 -- 搜索用户名或昵称中包含给定字符串的帐户。可以返回多个结果。
|
|||
|
in: query
|
|||
|
name: q
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: 若关键词为 `@[username]@[domain]` 或 URL,允许 GoToSocial 实例通过调用外站实例(webfinger、ActivityPub 等)来解析搜索。
|
|||
|
in: query
|
|||
|
name: resolve
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示发起请求的账户关注的账户。如果设置为 `true`,则 GoToSocial 实例将在用户名和昵称之外,同时在账户信息中发起搜索,来增强搜索结果。
|
|||
|
in: query
|
|||
|
name: following
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 搜索结果。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 搜索账户
|
|||
|
description: 搜索具有给定用户名或昵称的帐户。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/themes:
|
|||
|
get:
|
|||
|
operationId: accountThemes
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 主题的数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/theme'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 查看主题
|
|||
|
description: 查看此实例上可用于账户的预设 CSS 主题。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/update_credentials:
|
|||
|
patch:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
- application/json
|
|||
|
operationId: accountUpdate
|
|||
|
parameters:
|
|||
|
- description: 账户是否可被发现,并在用户名录中显示。
|
|||
|
in: formData
|
|||
|
name: discoverable
|
|||
|
type: boolean
|
|||
|
- description: 账户被标记为机器人。
|
|||
|
in: formData
|
|||
|
name: bot
|
|||
|
type: boolean
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 账户的昵称。
|
|||
|
in: formData
|
|||
|
name: display_name
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 账户的简介。
|
|||
|
in: formData
|
|||
|
name: note
|
|||
|
type: string
|
|||
|
- description: 账户的头像。
|
|||
|
in: formData
|
|||
|
name: avatar
|
|||
|
type: file
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 账户的头像描述,用于 alt 文本。
|
|||
|
in: formData
|
|||
|
name: avatar_description
|
|||
|
type: string
|
|||
|
- description: 用户的资料页横幅背景。
|
|||
|
in: formData
|
|||
|
name: header
|
|||
|
type: file
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 用户资料页横幅背景的描述,用于 alt 文本。
|
|||
|
in: formData
|
|||
|
name: header_description
|
|||
|
type: string
|
|||
|
- description: 关注请求需要手动批准。
|
|||
|
in: formData
|
|||
|
name: locked
|
|||
|
type: boolean
|
|||
|
- description: 撰写的贴文的默认可见性。
|
|||
|
in: formData
|
|||
|
name: source[privacy]
|
|||
|
type: string
|
|||
|
- description: 将撰写的贴文默认标记为敏感。
|
|||
|
in: formData
|
|||
|
name: source[sensitive]
|
|||
|
type: boolean
|
|||
|
- description: 撰写的贴文的默认语言 (ISO 6391)。
|
|||
|
in: formData
|
|||
|
name: source[language]
|
|||
|
type: string
|
|||
|
- description: 撰写的贴文的默认内容类型 (text/plain 或 text/markdown)。
|
|||
|
in: formData
|
|||
|
name: source[status_content_type]
|
|||
|
type: string
|
|||
|
- description: 渲染此帐户的资料页或贴文时要使用的主题的文件名。主题必须存在于此服务器上,如 /api/v1/accounts/themes 所示。空字符串意味着取消主题偏好并回退到 GoToSocial 默认主题。
|
|||
|
in: formData
|
|||
|
name: theme
|
|||
|
type: string
|
|||
|
- description: 渲染此帐户的资料页或贴文时要使用的自定义 CSS。字符串长度不能超过 5,000 个字符(~5kb)。
|
|||
|
in: formData
|
|||
|
name: custom_css
|
|||
|
type: string
|
|||
|
- description: 为此帐户的公开贴文启用 RSS 订阅,端点为 `/[username]/feed.rss`。
|
|||
|
in: formData
|
|||
|
name: enable_rss
|
|||
|
type: boolean
|
|||
|
- description: 隐藏此帐户的关注/粉丝信息。
|
|||
|
in: formData
|
|||
|
name: hide_collections
|
|||
|
type: boolean
|
|||
|
- description: |-
|
|||
|
Posts to show on the web view of the account.
|
|||
|
"public": default, show only Public visibility posts on the web.
|
|||
|
"unlisted": show Public *和* Unlisted visibility posts on the web.
|
|||
|
"none": show no posts on the web, not even Public ones.
|
|||
|
要在网页端展示的贴文范围。
|
|||
|
"public": 默认,只在网页上显示公开的贴文。
|
|||
|
"unlisted": 在网页上显示可见性为公开 *和* 不列出的贴文。
|
|||
|
"none": 在网页上不显示任何贴文,甚至不显示公开的贴文。
|
|||
|
in: formData
|
|||
|
name: web_visibility
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第一个资料字段的名称。 (索引可以是任何字符串;添加更多索引以发送更多字段。)
|
|||
|
in: formData
|
|||
|
name: fields_attributes[0][name]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第一个资料字段的值。 (索引可以是任何字符串;添加更多索引以发送更多字段。)
|
|||
|
in: formData
|
|||
|
name: fields_attributes[0][value]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第二个资料字段的名称。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[1][name]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第二个资料字段的值。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[1][value]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第三个资料字段的名称。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[2][name]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第三个资料字段的值。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[2][value]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第四个资料字段的名称。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[3][name]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第四个资料字段的值。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[3][value]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第五个资料字段的名称。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[4][name]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第五个资料字段的值。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[4][value]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第六个资料字段的名称。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[5][name]
|
|||
|
type: string
|
|||
|
- description: 要添加到此帐户的资料页的第六个资料字段的值。
|
|||
|
in: formData
|
|||
|
name: fields_attributes[5][value]
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的账户。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 更新账户信息
|
|||
|
description: 更新你的账户信息。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/accounts/verify_credentials:
|
|||
|
get:
|
|||
|
operationId: accountVerify
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 验证令牌
|
|||
|
description: 验证令牌并返回与之相关的账户详细信息。
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/admin/accounts:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
使用特定的过滤规则查看 + 分页浏览已知的账户。
|
|||
|
|
|||
|
返回的账户将按域名 + 用户名的字母顺序(a-z)排序。
|
|||
|
|
|||
|
下一个和上一个查询可以从返回的 Link 标头中解析出来。
|
|||
|
例如:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/admin/accounts?limit=80&max_id=example.org%2F%40someone>; rel="next", <https://example.org/api/v1/admin/accounts?limit=80&min_id=example.org%2F%40someone_else>; rel="prev"
|
|||
|
````
|
|||
|
operationId: adminAccountsGetV1
|
|||
|
parameters:
|
|||
|
- default: false
|
|||
|
description: 只显示本站账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: local
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示外站账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: remote
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示当前活跃的账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: active
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示当前待处理的账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: pending
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示当前被禁用的账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: disabled
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示当前被静音的账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: silenced
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示当前被封禁的账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: suspended
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 只显示当前被强制标记为敏感的账户的过滤规则。
|
|||
|
in: query
|
|||
|
name: sensitized
|
|||
|
type: boolean
|
|||
|
- description: 搜索给定的用户名。
|
|||
|
in: query
|
|||
|
name: username
|
|||
|
type: string
|
|||
|
- description: 搜索给定的昵称。
|
|||
|
in: query
|
|||
|
name: display_name
|
|||
|
type: string
|
|||
|
- description: 搜索给定的域名。
|
|||
|
in: query
|
|||
|
name: by_domain
|
|||
|
type: string
|
|||
|
- description: 搜索具有给定电子邮箱的用户。
|
|||
|
in: query
|
|||
|
name: email
|
|||
|
type: string
|
|||
|
- description: 搜索具有给定 IP 地址的用户。
|
|||
|
in: query
|
|||
|
name: ip
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: 搜索工作人员账户。
|
|||
|
in: query
|
|||
|
name: staff
|
|||
|
type: boolean
|
|||
|
- description: "`[domain]/@[username]` 中的 `max_id`。返回的所有结果都将在 `[domain]/@[username]` 之后的字母顺序中。例如,如果 `max_id` = `example.org/@someone`,则返回的条目可能包含 `example.org/@someone_else`、`later.example.org/@someone` 等。在此形式中,本站帐户 ID 使用空字符串作为 `[domain]` 部分,例如具有用户名 `someone` 的本地帐户将是 `/@someone`。"
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: "`[domain]/@[username]` 中的 `min_id`。返回的所有结果都将在 `[domain]/@[username]` 之前的字母顺序中。例如,如果 `min_id` = `example.org/@someone`,则返回的条目可能包含 `example.org/@earlier_account`、`earlier.example.org/@someone` 等。在此形式中,本站帐户 ID 使用空字符串作为 `[domain]` 部分,例如具有用户名 `someone` 的本地帐户将是 `/@someone`。"
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 50
|
|||
|
description: 要返回的最大结果数。
|
|||
|
in: query
|
|||
|
maximum: 200
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看账户
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/accounts/{id}:
|
|||
|
get:
|
|||
|
operationId: adminAccountGet
|
|||
|
parameters:
|
|||
|
- description: 账户的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: OK
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看单个账户
|
|||
|
description: 查看一个账户。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/accounts/{id}/action:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: adminAccountAction
|
|||
|
parameters:
|
|||
|
- description: 账户的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 要执行的操作类型,目前仅支持 `suspend`。
|
|||
|
in: formData
|
|||
|
name: type
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 描述执行此操作的原因的文本,可不填。
|
|||
|
in: formData
|
|||
|
name: text
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: OK
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: '冲突: 已经有一个与此操作冲突的管理员操作正在执行。查看响应正文中的错误消息以获取更多信息。这是一个临时错误; 如果稍后再试一次,应该可以处理此操作。'
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 执行管理操作
|
|||
|
description: 对某个账户执行管理员操作。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/accounts/{id}/approve:
|
|||
|
post:
|
|||
|
operationId: adminAccountApprove
|
|||
|
parameters:
|
|||
|
- description: 账户的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被批准后的账户。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 批准账户
|
|||
|
description: 批准待处理的账户。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/accounts/{id}/reject:
|
|||
|
post:
|
|||
|
operationId: adminAccountReject
|
|||
|
parameters:
|
|||
|
- description: 账户的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 用于说明为什么拒绝此账户的评论。评论仅对管理员可见。
|
|||
|
in: formData
|
|||
|
name: private_comment
|
|||
|
type: string
|
|||
|
- description: 要包含在发送给申请人的电子邮件中的消息。仅在 send_email 为 true 时包含。
|
|||
|
in: formData
|
|||
|
name: message
|
|||
|
type: string
|
|||
|
- description: 向申请人发送一封电子邮件,告知他们的注册已被拒绝。
|
|||
|
in: formData
|
|||
|
name: send_email
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被拒绝的账户。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 拒绝账户
|
|||
|
description: 拒绝待处理的账户。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/custom_emojis:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
下一个/上一个查询可以从返回的 Link 标头中解析。
|
|||
|
例如:
|
|||
|
|
|||
|
`<http://localhost:8080/api/v1/admin/custom_emojis?limit=30&max_shortcode_domain=yell@fossbros-anonymous.io&filter=domain:all>; rel="next", <http://localhost:8080/api/v1/admin/custom_emojis?limit=30&min_shortcode_domain=rainbow@&filter=domain:all>; rel="prev"`
|
|||
|
operationId: emojisGet
|
|||
|
parameters:
|
|||
|
- default: domain:all
|
|||
|
description: |-
|
|||
|
查看本站表情和已知的外站表情。
|
|||
|
|
|||
|
要应用到结果中的过滤规则列表,以逗号分隔。可被识别的过滤规则有:
|
|||
|
|
|||
|
`domain:[domain]` -- 显示给定域名下的表情,例如 `?filter=domain:example.org` 将只显示 `example.org` 的表情。
|
|||
|
除了给定特定域名外,还可以给出关键字 `local` 或 `all`,以仅显示本站表情 (`domain:local`) 或显示所有实例的所有表情 (`domain:all`)。
|
|||
|
注意:`domain:*` 等同于 `domain:all`(包括本站)。
|
|||
|
如果未提供域名过滤规则,则将假定 `domain:all`。
|
|||
|
|
|||
|
`disabled` -- 包括已禁用的表情。
|
|||
|
|
|||
|
`enabled` -- 包括已启用的表情。
|
|||
|
|
|||
|
`shortcode:[shortcode]` -- 仅显示给定的表情代码,例如 `?filter=shortcode:blob_cat_uwu` 将仅显示表情代码为 `blob_cat_uwu` 的表情(区分大小写)。
|
|||
|
|
|||
|
如果未提供 `disabled` 或 `enabled`,则将同时显示已禁用和已启用的表情。
|
|||
|
|
|||
|
如果未提供过滤规则,则将使用默认的 `domain:all`,它将显示所有实例的所有表情。
|
|||
|
in: query
|
|||
|
name: filter
|
|||
|
type: string
|
|||
|
- default: 50
|
|||
|
description: 要返回的表情数量。小于 1 或未设置表示无限制(所有表情)。
|
|||
|
in: query
|
|||
|
maximum: 200
|
|||
|
minimum: 0
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- description: |-
|
|||
|
只返回比给定 `[shortcode]@[domain]` *更低*(按字母顺序)的表情。例如,如果 `max_shortcode_domain=beep@example.org`,则返回的值可能包括 `[shortcode]@[domain]` 为 `car@example.org`, `debian@aaa.com`, `test@` (本站表情) 等。
|
|||
|
具有给定 `[shortcode]@[domain]` 的表情将不包含在结果集中。
|
|||
|
in: query
|
|||
|
name: max_shortcode_domain
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
只返回比给定 `[shortcode]@[domain]` *更高*(按字母顺序)的表情。例如,如果 `max_shortcode_domain=beep@example.org`, 则返回的值可能包括 `[shortcode]@[domain]` 为 `arse@test.com`, `0101_binary@hackers.net`, `bee@` (本站表情) 等。
|
|||
|
具有给定 `[shortcode]@[domain]` 的表情将不包含在结果集中。
|
|||
|
in: query
|
|||
|
name: min_shortcode_domain
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 表情数组,按表情代码和域名字母顺序排列。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/adminEmoji'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
summary: 查看表情
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: emojiCreate
|
|||
|
parameters:
|
|||
|
- description: 此表情的代码,将被实例居民用于选定对应表情。此代码在实例上必须是唯一的。
|
|||
|
in: formData
|
|||
|
name: shortcode
|
|||
|
pattern: \w{2,30}
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 此表情的 png 或 gif 图像。动画 png 也可以!为了确保与其他 fedi 实现的兼容性,默认情况下表情大小限制为 50kb。
|
|||
|
in: formData
|
|||
|
name: image
|
|||
|
required: true
|
|||
|
type: file
|
|||
|
- description: 此表情所属的类别。如果留空,表情将不属于任何类别。如果给定的类别名称尚不存在,则将创建该类别。
|
|||
|
in: formData
|
|||
|
name: category
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的表情。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: 冲突 -- 此表情的代码已被使用
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 创建表情
|
|||
|
description: 上传和创建一个新的实例表情。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/custom_emojis/{id}:
|
|||
|
delete:
|
|||
|
description: |-
|
|||
|
在此实例删除一个 **本地** 表情。
|
|||
|
|
|||
|
给定 ID 的表情将不再在此实例上可用。
|
|||
|
|
|||
|
如果您只想更新表情图像,请使用 `/api/v1/admin/custom_emojis/{id}` PATCH 路由。
|
|||
|
|
|||
|
要禁用 **外站** 实例的表情,请使用 `/api/v1/admin/custom_emojis/{id}` PATCH 路由。
|
|||
|
operationId: emojiDelete
|
|||
|
parameters:
|
|||
|
- description: 表情的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被删除的表情将被返回给调用者,以便进一步处理。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminEmoji'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除表情
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
get:
|
|||
|
operationId: emojiGet
|
|||
|
parameters:
|
|||
|
- description: 表情的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 单个表情。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminEmoji'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
summary: 查看表情
|
|||
|
description: 在管理视图中查看单个表情。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
patch:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: |-
|
|||
|
对一个 **本站** 或 **外站** 表情执行管理操作。
|
|||
|
|
|||
|
要执行的操作取决于提供的操作类型 `type` 参数。
|
|||
|
|
|||
|
`disable`: 禁用一个 **外站** 表情,使其无法在此实例上使用/显示。不适用于本站表情。
|
|||
|
|
|||
|
`copy`: 将 **外站** 表情复制到此实例。执行此操作时,必须提供一个表情代码,并且它必须在此实例上已有的表情中是唯一的。可以提供一个类别,然后复制的表情将被放入提供的类别中。
|
|||
|
|
|||
|
`modify`: 修改一个 **本站** 表情。您可以为表情提供一个新的图像和/或更新类别。
|
|||
|
|
|||
|
本站表情不能使用此端点删除。要删除本站表情,请查看 DELETE /api/v1/admin/custom_emojis/{id}。
|
|||
|
operationId: emojiUpdate
|
|||
|
parameters:
|
|||
|
- description: 表情的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要执行的操作类型。需为下列其中之一:(`disable`, `copy`, `modify`)。
|
|||
|
对于 **外站** 表情,支持 `copy` 或 `disable`。
|
|||
|
对于 **本站** 表情,仅支持 `modify`。
|
|||
|
enum:
|
|||
|
- copy
|
|||
|
- disable
|
|||
|
- modify
|
|||
|
in: formData
|
|||
|
name: type
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 用于表情的代码,将被实例居民用于选定表情。此代码在实例上必须是唯一的。仅适用于 `copy` 操作类型。
|
|||
|
in: formData
|
|||
|
name: shortcode
|
|||
|
pattern: \w{2,30}
|
|||
|
type: string
|
|||
|
- description: 此表情的新 png 或 gif 图像。动画 png 也可以!为了确保与其他 fedi 实现的兼容性,默认情况下表情大小限制为 50kb。仅适用于 **本站** 表情。
|
|||
|
in: formData
|
|||
|
name: image
|
|||
|
type: file
|
|||
|
- description: 表情所属的类别。如果尚不存在具有给定名称的类别,则将创建该类别。仅适用于 `copy` 和 `modify` 操作类型。
|
|||
|
in: formData
|
|||
|
name: category
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的表情。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminEmoji'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 修改表情
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/custom_emojis/categories:
|
|||
|
get:
|
|||
|
operationId: emojiCategoriesGet
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 现有表情类别的数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emojiCategory'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
summary: 查看表情类别
|
|||
|
description: 获取现有表情类别的列表。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/debug/apurl:
|
|||
|
get:
|
|||
|
description: 对指定的 ActivityPub URL 执行 GET 请求,并返回详细的调试信息。仅当 GoToSocial 使用 DEBUG=1 标志构建和运行时才启用/公开。
|
|||
|
operationId: debugAPUrl
|
|||
|
parameters:
|
|||
|
- description: 要解析的 URL 或 ActivityPub ID。 如 `https://example.org/users/someone`
|
|||
|
in: query
|
|||
|
name: url
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/debugAPUrlResponse'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 解析 ActivityPub URL
|
|||
|
tags:
|
|||
|
- debug
|
|||
|
/api/v1/admin/debug/caches/clear:
|
|||
|
post:
|
|||
|
description: 清除所有内存中的缓存。仅当 GoToSocial 使用 DEBUG=1 标志构建和运行时才启用/公开。
|
|||
|
operationId: debugClearCaches
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 所有缓存都已清除。
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 清除缓存
|
|||
|
tags:
|
|||
|
- debug
|
|||
|
/api/v1/admin/domain_allows:
|
|||
|
get:
|
|||
|
operationId: domainAllowsGet
|
|||
|
parameters:
|
|||
|
- description: 如果设为 `true`,则返回的实例白名单列表中的每个条目将仅包含字段 `domain` 和 `public_comment`。这对于当您想要保存和共享您实例上允许的所有域名的列表时非常有用,以便其他人可以轻松导入它们,但您不希望他们看到您的允许的数据库 ID,或私人评论等。
|
|||
|
in: query
|
|||
|
name: export
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 目前所有被允许的域名。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看实例白名单
|
|||
|
description: 查看当前所有被允许联合的域名。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: |-
|
|||
|
从字符串或文件中创建一个或多个实例白名单。
|
|||
|
|
|||
|
在使用此端点时,您有两个选项:要么将 `import` 设置为 `true` 并上传一个包含多个要允许的域名的 JSON 文件,要么将 `import` 设置为 `false`,并添加一条要允许的域名。
|
|||
|
|
|||
|
JSON 文件的格式应该类似于:`[{"domain":"example.org"},{"domain":"whatever.com","public_comment":"它们是我的好厚米"}]`
|
|||
|
operationId: domainAllowCreate
|
|||
|
parameters:
|
|||
|
- default: false
|
|||
|
description: 表示正在导入一个包含多个要允许的域名的文件。如果设置为 `true`,则 `domains` 必须作为 JSON 格式的文件存在。如果设置为 `false`,则 `domains` 将被忽略,`domain` 必须存在。
|
|||
|
in: query
|
|||
|
name: import
|
|||
|
type: boolean
|
|||
|
- description: JSON 格式的实例白名单列表。仅在 `import` 设置为 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: domains
|
|||
|
type: file
|
|||
|
- description: 要允许的单个域名。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: domain
|
|||
|
type: string
|
|||
|
- description: 在公开时对域名的名称进行混淆。例如,`example.org` 变成类似于 `ex***e.org`。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: obfuscate
|
|||
|
type: boolean
|
|||
|
- description: 有关此实例白名单的公共评论。如果选择共享允许,则此评论将显示在实例白名单旁边。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: public_comment
|
|||
|
type: string
|
|||
|
- description: 有关此实例白名单的私人评论。仅显示给其他管理员,因此这是一个有用的内部方法,用于跟踪为什么某个域名最终被允许。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: private_comment
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 如果 `import` != `true`,则返回新创建的实例白名单。如果导入了列表,则将返回新创建的实例白名单的 `array` (数组)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: '冲突: 已经有一个与此操作冲突的管理员操作正在执行。查看响应正文中的错误消息以获取更多信息。这是一个临时错误; 如果稍后再试一次,应该可以处理此操作。'
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 创建实例白名单
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/domain_allows/{id}:
|
|||
|
delete:
|
|||
|
operationId: domainAllowDelete
|
|||
|
parameters:
|
|||
|
- description: 实例白名单条目的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 刚刚删除的实例白名单条目。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: '冲突: 已经有一个与此操作冲突的管理员操作正在执行。查看响应正文中的错误消息以获取更多信息。这是一个临时错误; 如果稍后再试一次,应该可以处理此操作。'
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除实例白名单条目
|
|||
|
description: 删除具有给定 ID 的实例白名单条目。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
get:
|
|||
|
operationId: domainAllowGet
|
|||
|
parameters:
|
|||
|
- description: 实例白名单条目的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的实例白名单条目。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看实例白名单条目
|
|||
|
description: 查看具有给定 ID 的实例白名单条目。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/domain_blocks:
|
|||
|
get:
|
|||
|
operationId: domainBlocksGet
|
|||
|
parameters:
|
|||
|
- description: 如果设为 `true`,则返回的实例黑名单的每个条目将仅包含字段 `domain` 和 `public_comment`。这对于当您想要保存和共享您实例上阻止的所有实例的列表时非常有用,以便其他人可以轻松导入它们,但您不希望他们看到您的黑名单的数据库 ID,或私人评论等。
|
|||
|
in: query
|
|||
|
name: export
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 目前所有的实例黑名单。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看实例黑名单
|
|||
|
description: 查看当前所有实例黑名单。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: |-
|
|||
|
从字符串或文件中创建一个或多个实例黑名单条目。
|
|||
|
|
|||
|
使用此端点时,您有两个选项:要么将 `import` 设置为 `true` 并上传一个包含多个要阻止联合的实例的 JSON 文件,要么将 `import` 设置为 `false`,并添加一个要阻止的实例。
|
|||
|
|
|||
|
JSON 文件的格式应该类似于:`[{"domain":"example.org"},{"domain":"whatever.com","public_comment":"它们不是我的好厚米"}]`
|
|||
|
operationId: domainBlockCreate
|
|||
|
parameters:
|
|||
|
- default: false
|
|||
|
description: 表示正在导入一个包含多个要阻止联合的实例的文件。如果设置为 `true`,则 `domains` 必须作为 JSON 格式的文件存在。如果设置为 `false`,则 `domains` 将被忽略,`domain` 必须存在。
|
|||
|
in: query
|
|||
|
name: import
|
|||
|
type: boolean
|
|||
|
- description: 要导入的 JSON 格式的实例黑名单。仅在 `import` 设置为 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: domains
|
|||
|
type: file
|
|||
|
- description: 单个要阻止联合的实例。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: domain
|
|||
|
type: string
|
|||
|
- description: 对外公开时对域名进行混淆。例如,`example.org` 变成类似于 `ex***e.org`。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: obfuscate
|
|||
|
type: boolean
|
|||
|
- description: 对此实例黑名单条目的公开评论。如果选择共享阻止,此评论将显示在实例黑名单条目旁边。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: public_comment
|
|||
|
type: string
|
|||
|
- description: 对此实例黑名单条目的私人评论。仅显示给其他管理员,因此这是一个有用的内部方法,用于跟踪为什么某个域名最终被阻止。仅在 `import` 不是 `true` 时使用。
|
|||
|
in: formData
|
|||
|
name: private_comment
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 如果 `import` != `true`,则返回新创建的实例黑名单条目。如果导入了列表,则将返回新创建的实例黑名单的 `array` (数组)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: '冲突: 已经有一个与此操作冲突的管理员操作正在执行。查看响应正文中的错误消息以获取更多信息。这是一个临时错误; 如果稍后再试一次,应该可以处理此操作。'
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 创建实例黑名单
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/domain_blocks/{id}:
|
|||
|
delete:
|
|||
|
operationId: domainBlockDelete
|
|||
|
parameters:
|
|||
|
- description: 实例黑名单条目的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 刚刚删除的实例黑名单条目。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: '冲突: 已经有一个与此操作冲突的管理员操作正在执行。查看响应正文中的错误消息以获取更多信息。这是一个临时错误; 如果稍后再试一次,应该可以处理此操作。'
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除实例黑名单条目
|
|||
|
description: 删除具有给定 ID 的实例黑名单条目。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
get:
|
|||
|
operationId: domainBlockGet
|
|||
|
parameters:
|
|||
|
- description: 实例黑名单条目的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的实例黑名单条目。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/domainPermission'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看实例黑名单条目
|
|||
|
description: 查看具有给定 ID 的实例黑名单条目。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/domain_keys_expire:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: |-
|
|||
|
将指定域名的所有帐户的缓存公钥强制吊销,这些公钥存储在您的数据库中。
|
|||
|
|
|||
|
当外站实例不得不轮转其密钥时(出于安全问题、数据泄漏、例行安全程序等原因),此功能非常有用,您的实例无法使用缓存的密钥与其正常通信。以这种方式标记为过期的密钥将在下次由该密钥所有者签名的请求发送到您的实例时进行懒惰重新获取,因此不需要进一步操作即可重新建立与该域的通信。
|
|||
|
|
|||
|
此端点务必不能用于轮转您自己的密钥,它仅适用于外站实例。
|
|||
|
|
|||
|
使用此端点来吊销尚未轮转所有密钥的实例的密钥既不会有害,也不会破坏联合,但是毫无意义,会导致不必要的请求执行。
|
|||
|
operationId: domainKeysExpire
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
要吊销密钥的实例域名。
|
|||
|
例如:example.org
|
|||
|
in: formData
|
|||
|
name: domain
|
|||
|
type: string
|
|||
|
x-go-name: Domain
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: 请求已接受并将被处理。检查日志以查看进度/错误。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminActionResponse'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: '冲突: 已经有一个与此操作冲突的管理员操作正在执行。查看响应正文中的错误消息以获取更多信息。这是一个临时错误; 如果稍后再试一次,应该可以处理此操作。'
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 吊销实例密钥
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/email/test:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: |-
|
|||
|
向指定的电子邮件地址发送一封通用的测试电子邮件。
|
|||
|
|
|||
|
这可以用来验证实例的 SMTP 配置,并调试任何潜在问题。
|
|||
|
|
|||
|
如果 SMTP 连接返回错误,此处理程序将返回代码 422,以指示请求无法处理,并将 SMTP 错误返回给调用者。
|
|||
|
operationId: testEmailSend
|
|||
|
parameters:
|
|||
|
- description: 要发送测试电子邮件的电子邮件地址。
|
|||
|
in: formData
|
|||
|
name: email
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 要包含在电子邮件中的消息,可不填。
|
|||
|
in: formData
|
|||
|
name: message
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: 测试邮件已发送。
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: 尝试发件时发生了一个 smtp 错误。检查返回的 json 以获取更多信息。将包含 smtp 错误,以帮助您调试与 smtp 服务器的通信。
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 测试电子邮件
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/header_allows:
|
|||
|
get:
|
|||
|
operationId: headerFilterAllowsGet
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 目前所有的标头 "allow" (放行) 过滤规则。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/headerFilter'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看标头放行规则
|
|||
|
description: 查看当前所有 "allow" (放行) 过滤规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
创建一条新的 "allow" (放行) HTTP 请求标头过滤规则。
|
|||
|
若 Content-Type 为 'application/json',则参数也可以在请求体中以 JSON 形式给出。
|
|||
|
若 Content-Type 为 'application/xml',则参数也可以在请求体中以 XML 形式给出。
|
|||
|
operationId: headerFilterAllowCreate
|
|||
|
parameters:
|
|||
|
- description: 要匹配的 HTTP 标头 (例如 User-Agent)。
|
|||
|
in: formData
|
|||
|
name: header
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Header
|
|||
|
- description: 要匹配的标头值的正则表达式。
|
|||
|
in: formData
|
|||
|
name: regex
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Regex
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的 "allow" (放行) 标头过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/headerFilter'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 创建标头放行规则
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/header_allows/{id}:
|
|||
|
delete:
|
|||
|
operationId: headerFilterAllowDelete
|
|||
|
parameters:
|
|||
|
- description: 目标标头过滤规则 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: Accepted 已接受
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除标头放行规则
|
|||
|
description: 删除具有给定 ID 的 "allow" (放行) 标头过滤规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
get:
|
|||
|
operationId: headerFilterAllowGet
|
|||
|
parameters:
|
|||
|
- description: 目标标头过滤规则 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的 "allow" (放行) 标头过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/headerFilter'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 获取单个标头放行规则
|
|||
|
description: 获取具有给定 ID 的 "allow" (放行) 标头过滤规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/header_blocks:
|
|||
|
get:
|
|||
|
operationId: headerFilterBlocksGet
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 目前所有的 "block" (阻止) 标头过滤规则。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/headerFilter'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看标头阻止规则
|
|||
|
description: 获取目前所有的 "block" (阻止) 标头过滤规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
创建一条新的 "block" (阻止) HTTP 请求标头过滤规则。
|
|||
|
若 Content-Type 为 'application/json',则参数也可以在请求体中以 JSON 形式给出。
|
|||
|
若 Content-Type 为 'application/xml',则参数也可以在请求体中以 XML 形式给出。
|
|||
|
operationId: headerFilterBlockCreate
|
|||
|
parameters:
|
|||
|
- description: 要匹配的 HTTP 标头 (例如 User-Agent)。
|
|||
|
in: formData
|
|||
|
name: header
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Header
|
|||
|
- description: 要匹配的标头值的正则表达式。
|
|||
|
in: formData
|
|||
|
name: regex
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Regex
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的 "block" (阻止) 标头过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/headerFilter'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 创建标头阻止规则
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/header_blocks/{id}:
|
|||
|
delete:
|
|||
|
operationId: headerFilterBlockDelete
|
|||
|
parameters:
|
|||
|
- description: 目标标头过滤规则 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: Accepted 已接受
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除标头阻止规则
|
|||
|
description: 删除具有给定 ID 的 "block" (阻止) 标头过滤规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
get:
|
|||
|
operationId: headerFilterBlockGet
|
|||
|
parameters:
|
|||
|
- description: 目标标头过滤规则 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的 "block" (阻止) 标头过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/headerFilter'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 获取单个标头阻止规则
|
|||
|
description: 获取具有给定 ID 的 "block" (阻止) 标头过滤规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/instance/rules:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: ruleCreate
|
|||
|
parameters:
|
|||
|
- description: 实例规则的文本内容,纯文本。
|
|||
|
in: formData
|
|||
|
name: text
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Text
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的实例规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 创建实例规则
|
|||
|
description: 创建一条新的实例规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/instance/rules/{id}:
|
|||
|
delete:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: ruleDelete
|
|||
|
parameters:
|
|||
|
- description: 要删除的规则的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被删除的实例规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除实例规则
|
|||
|
description: 删除一条现有的实例规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
patch:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
operationId: ruleUpdate
|
|||
|
parameters:
|
|||
|
- description: 要更新的规则的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: ID
|
|||
|
- description: 更新的实例规则的文本内容,纯文本。
|
|||
|
in: formData
|
|||
|
name: text
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Text
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的实例规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 更新实例规则
|
|||
|
description: 更新一条现有的实例规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/media_cleanup:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: 删除早于给定日期的外站媒体。也会清理未使用的头像和横幅背景头图,并从存储中删除孤立的项目。
|
|||
|
operationId: mediaCleanup
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
要保留的外站媒体的天数。本地(Native)值将被视为 0。
|
|||
|
若未指定值,则将使用服务器配置中的 media-remote-cache-days 的值。
|
|||
|
format: int64
|
|||
|
in: query
|
|||
|
name: remote_cache_days
|
|||
|
type: integer
|
|||
|
x-go-name: RemoteCacheDays
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 返回请求的天数。清理将在请求完成后异步执行。
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 清理媒体
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/media_refetch:
|
|||
|
post:
|
|||
|
description: |-
|
|||
|
重新获取数据库中指定但在存储中丢失的媒体。
|
|||
|
当前,仅包括外站表情。
|
|||
|
当数据丢失时,您可以使用此端点尝试恢复到工作状态。
|
|||
|
operationId: mediaRefetch
|
|||
|
parameters:
|
|||
|
- description: 要重新获取媒体的实例。如果为空,则将重新获取所有实例的媒体。
|
|||
|
in: query
|
|||
|
name: domain
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: 请求已接受并将被处理。检查日志以查看进度/错误。
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 重新获取媒体
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/reports:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看发给管理员的用户举报。
|
|||
|
|
|||
|
举报将按时间顺序(最新的在前)返回,带有连续的 ID(更大 = 更新)。
|
|||
|
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
|
|||
|
例子:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/admin/reports?limit=20&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/admin/reports?limit=20&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: adminReports
|
|||
|
parameters:
|
|||
|
- description: 如果设为 true,则只返回已解决的举报。如果设为 false,则只返回未解决的举报。如果未设置,则不会根据其解决状态过滤举报。
|
|||
|
in: query
|
|||
|
name: resolved
|
|||
|
type: boolean
|
|||
|
- description: 只返回由给定 ID 的账户创建的举报。
|
|||
|
in: query
|
|||
|
name: account_id
|
|||
|
type: string
|
|||
|
- description: 只返回针对给定 ID 的账户的举报。
|
|||
|
in: query
|
|||
|
name: target_account_id
|
|||
|
type: string
|
|||
|
- description: 只返回比给定的 max ID *旧* 的举报(用于向下翻页)。具有指定 ID 的举报不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 只返回比给定的 since ID *新* 的举报。具有指定 ID 的举报不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 只返回比给定的 min ID 相邻且*更新* 的举报(用于向上翻页)。具有指定 ID 的举报不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的举报数量。
|
|||
|
in: query
|
|||
|
maximum: 100
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 举报数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/adminReport'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看用户举报
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/reports/{id}:
|
|||
|
get:
|
|||
|
operationId: adminReportGet
|
|||
|
parameters:
|
|||
|
- description: 举报的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的举报。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminReport'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看单个用户举报
|
|||
|
description: 查看具有给定 ID 的用户举报。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/reports/{id}/resolve:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- multipart/form-data
|
|||
|
operationId: adminReportResolve
|
|||
|
parameters:
|
|||
|
- description: 举报的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
管理员对此举报采取的行动的评论,可不填。在将举报标记为已处理之前,提供关于采取的行动(如果有)的解释非常有用。这将对创建举报的用户可见!
|
|||
|
in: formData
|
|||
|
name: action_taken_comment
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 已处理的举报。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/adminReport'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 处理用户举报
|
|||
|
description: 将具有给定 ID 的用户举报标记为已处理。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/rules:
|
|||
|
get:
|
|||
|
description: 查看实例规则及其 ID。实例规则将按顺序返回(按 Order 升序排序)。
|
|||
|
operationId: adminsRuleGet
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 本站实例的所有规则组成的数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看实例规则
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/admin/rules/{id}:
|
|||
|
get:
|
|||
|
operationId: adminRuleGet
|
|||
|
parameters:
|
|||
|
- description: 实例规则的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看单个实例规则
|
|||
|
description: 查看具有给定 ID 的实例规则。
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v1/apps:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
在本实例注册一个新的应用程序。
|
|||
|
注册的应用程序可用于获取应用程序令牌。
|
|||
|
然后可以使用此令牌注册新帐户,或(通过用户身份验证)获取访问令牌。
|
|||
|
|
|||
|
若 Content-Type 为 'application/json',则参数也可以在请求体中以 JSON 形式给出。
|
|||
|
若 Content-Type 为 'application/xml',则参数也可以在请求体中以 XML 形式给出。
|
|||
|
operationId: appCreate
|
|||
|
parameters:
|
|||
|
- description: 应用程序的名称。
|
|||
|
in: formData
|
|||
|
name: client_name
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: ClientName
|
|||
|
- description: |-
|
|||
|
用户在授权后应重定向到何处。
|
|||
|
|
|||
|
若要向用户显示授权代码而不是重定向到网页,请在此参数中使用 `urn:ietf:wg:oauth:2.0:oob`。
|
|||
|
in: formData
|
|||
|
name: redirect_uris
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: RedirectURIs
|
|||
|
- description: |-
|
|||
|
授权范围,以空格分隔的列表。
|
|||
|
|
|||
|
如果未提供范围,则默认为 `read`。
|
|||
|
in: formData
|
|||
|
name: scopes
|
|||
|
type: string
|
|||
|
x-go-name: Scopes
|
|||
|
- description: 此应用程序的网页 URL(可选)。
|
|||
|
in: formData
|
|||
|
name: website
|
|||
|
type: string
|
|||
|
x-go-name: Website
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的应用程序。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/application'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
summary: 创建应用程序
|
|||
|
tags:
|
|||
|
- apps
|
|||
|
/api/v1/blocks:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取发起请求的账户已屏蔽的账户数组。
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/blocks?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/blocks?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: blocksGet
|
|||
|
parameters:
|
|||
|
- description: '仅返回早于给定的 max ID 的已屏蔽账户。具有指定 ID 的已屏蔽账户不会包含在响应中。注意:ID 是内部屏蔽的 ID,而不是任何返回的账户的 ID。'
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: '仅返回晚于给定的 since ID 的已屏蔽账户。具有指定 ID 的已屏蔽账户不会包含在响应中。注意:ID 是内部屏蔽的 ID,而不是任何返回的账户的 ID。'
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: '仅返回比给定的 min ID *相邻且更新* 的已屏蔽账户。具有指定 ID 的已屏蔽账户不会包含在响应中。注意:ID 是内部屏蔽的 ID,而不是任何返回的账户的 ID。'
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: 要返回的已屏蔽账户数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:blocks
|
|||
|
summary: 获取已屏蔽账户
|
|||
|
tags:
|
|||
|
- blocks
|
|||
|
/api/v1/bookmarks:
|
|||
|
get:
|
|||
|
description: 获取在本站收藏的贴文的数组。
|
|||
|
operationId: bookmarksGet
|
|||
|
parameters:
|
|||
|
- default: 30
|
|||
|
description: 要返回的贴文数量。
|
|||
|
in: query
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- description: 仅返回早于给定的收藏 ID 的已收藏贴文。具有相应收藏 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的收藏 ID *新* 的已收藏贴文。具有相应收藏 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 已收藏贴文的数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:bookmarks
|
|||
|
summary: 获取收藏列表
|
|||
|
tags:
|
|||
|
- bookmarks
|
|||
|
/api/v1/conversation/{id}/read:
|
|||
|
post:
|
|||
|
operationId: conversationRead
|
|||
|
parameters:
|
|||
|
- description: 对话的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的对话。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/conversation'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理 content
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:conversations
|
|||
|
summary: 标记对话为已读
|
|||
|
description: 将具有给定 ID 的对话标记为已读。
|
|||
|
tags:
|
|||
|
- conversations
|
|||
|
/api/v1/conversations:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取发起请求的账户参与的对话(私信)数组。
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/conversations?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/conversations?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: conversationsGet
|
|||
|
parameters:
|
|||
|
- description: '仅返回最后贴文早于给定的 max ID 的对话。具有相应贴文 ID 的对话不会包含在响应中。注意:ID 是贴文 ID。使用Link标头进行分页。'
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: '仅返回最后贴文晚于给定的 since ID 的对话。具有相应贴文 ID 的对话不会包含在响应中。注意:ID 是贴文 ID。使用Link标头进行分页。'
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: '仅返回最后贴文 **相邻且晚于** 给定的 since ID 的对话。具有相应贴文 ID 的对话不会包含在响应中。注意:ID 是贴文 ID。使用Link标头进行分页。'
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: 要返回的对话数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/conversation'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 获取对话列表
|
|||
|
tags:
|
|||
|
- conversations
|
|||
|
/api/v1/conversations/{id}:
|
|||
|
delete:
|
|||
|
description: |-
|
|||
|
删除具有给定 ID 的单个对话。
|
|||
|
这不会删除对话包含的实际贴文,也不会阻止参与者稍后从相同的贴文串和参与者创建新对话。
|
|||
|
operationId: conversationDelete
|
|||
|
parameters:
|
|||
|
- description: 对话的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 对话已删除
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:conversations
|
|||
|
summary: 删除对话
|
|||
|
tags:
|
|||
|
- conversations
|
|||
|
/api/v1/custom_emojis:
|
|||
|
get:
|
|||
|
operationId: customEmojisGet
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 自定义表情数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/emoji'
|
|||
|
type: array
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:custom_emojis
|
|||
|
summary: 获取自定义表情
|
|||
|
description: 获取本实例可用的自定义表情数组。
|
|||
|
tags:
|
|||
|
- custom_emojis
|
|||
|
/api/v1/exports/blocks.csv:
|
|||
|
get:
|
|||
|
operationId: exportBlocks
|
|||
|
produces:
|
|||
|
- text/csv
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你屏蔽的账户的 CSV 文件。
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:blocks
|
|||
|
summary: 导出屏蔽列表
|
|||
|
description: 导出你屏蔽的账户的 CSV 文件。
|
|||
|
tags:
|
|||
|
- import-export
|
|||
|
/api/v1/exports/followers.csv:
|
|||
|
get:
|
|||
|
operationId: exportFollowers
|
|||
|
produces:
|
|||
|
- text/csv
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你的粉丝的 CSV 文件。
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:follows
|
|||
|
summary: 导出粉丝列表
|
|||
|
description: 导出你的粉丝的 CSV 文件。
|
|||
|
tags:
|
|||
|
- import-export
|
|||
|
/api/v1/exports/following.csv:
|
|||
|
get:
|
|||
|
operationId: exportFollowing
|
|||
|
produces:
|
|||
|
- text/csv
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你关注的账户的 CSV 文件。
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:follows
|
|||
|
summary: 导出关注列表
|
|||
|
description: 导出你关注的账户的 CSV 文件。
|
|||
|
tags:
|
|||
|
- import-export
|
|||
|
/api/v1/exports/lists.csv:
|
|||
|
get:
|
|||
|
operationId: exportLists
|
|||
|
produces:
|
|||
|
- text/csv
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 列表的 CSV 文件。
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 导出所有列表
|
|||
|
description: 导出你创建的列表的 CSV 文件。
|
|||
|
tags:
|
|||
|
- import-export
|
|||
|
/api/v1/exports/mutes.csv:
|
|||
|
get:
|
|||
|
operationId: exportMutes
|
|||
|
produces:
|
|||
|
- text/csv
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你屏蔽的账户的 CSV 文件。
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:mutes
|
|||
|
summary: 导出静音列表
|
|||
|
description: 导出你静音/隐藏的账户的 CSV 文件。
|
|||
|
tags:
|
|||
|
- import-export
|
|||
|
/api/v1/exports/stats:
|
|||
|
get:
|
|||
|
operationId: exportStats
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 导出统计信息
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountExportStats'
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:account
|
|||
|
summary: 查看导出统计信息
|
|||
|
description: 返回对应账户有关可以导出的项目数量的统计信息。
|
|||
|
tags:
|
|||
|
- import-export
|
|||
|
/api/v1/favourites:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看发起请求的账户已点赞的贴文数组。
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/favourites?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/favourites?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: favouritesGet
|
|||
|
parameters:
|
|||
|
- default: 20
|
|||
|
description: 要返回的贴文数量。
|
|||
|
in: query
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- description: 仅返回比给定的点赞 ID *旧* 的贴文。具有相应点赞 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的点赞 ID *新* 的贴文。具有相应点赞 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:favourites
|
|||
|
summary: 查看点赞贴文
|
|||
|
tags:
|
|||
|
- favourites
|
|||
|
/api/v1/featured_tags:
|
|||
|
get:
|
|||
|
description: '获取你当前在个人资料上展示的所有话题标签的数组。**此端点尚未完全实现**:它将始终返回一个空数组。'
|
|||
|
operationId: getFeaturedTags
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
items:
|
|||
|
type: object
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 获取精选话题标签
|
|||
|
tags:
|
|||
|
- tags
|
|||
|
/api/v1/filters:
|
|||
|
get:
|
|||
|
operationId: filtersV1Get
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterV1'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取V1过滤规则
|
|||
|
description: 获取发起请求的账户的所有过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: filterV1Post
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
要过滤的文本。
|
|||
|
|
|||
|
示例:挂人
|
|||
|
in: formData
|
|||
|
maxLength: 40
|
|||
|
minLength: 1
|
|||
|
name: phrase
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- collectionFormat: multi
|
|||
|
description: |-
|
|||
|
此过滤规则要应用的上下文。
|
|||
|
|
|||
|
示例: home, public
|
|||
|
enum:
|
|||
|
- home
|
|||
|
- notifications
|
|||
|
- public
|
|||
|
- thread
|
|||
|
- account
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
minItems: 1
|
|||
|
name: context[]
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
uniqueItems: true
|
|||
|
- description: |-
|
|||
|
此过滤规则的过期时间(秒)。如果省略,则过滤规则永不过期。
|
|||
|
|
|||
|
示例:86400
|
|||
|
in: formData
|
|||
|
name: expires_in
|
|||
|
type: number
|
|||
|
- default: false
|
|||
|
description: |-
|
|||
|
被命中的条目是否应该从用户的时间线/视图中移除,而不是隐藏?目前不支持。
|
|||
|
|
|||
|
示例:false
|
|||
|
in: formData
|
|||
|
name: irreversible
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: |-
|
|||
|
此过滤规则是否应考虑单词边界(整词匹配)?
|
|||
|
|
|||
|
示例:true
|
|||
|
in: formData
|
|||
|
name: whole_word
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterV1'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户执行此操作
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: conflict (duplicate keyword)
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理 content
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 创建V1过滤规则
|
|||
|
description: 创建一条新的V1过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v1/filters/{id}:
|
|||
|
delete:
|
|||
|
operationId: filterV1Delete
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 过滤规则已删除
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 删除V1过滤规则
|
|||
|
description: 删除具有给定 ID 的单个过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
get:
|
|||
|
operationId: filterV1Get
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterV1'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取单个V1过滤规则
|
|||
|
description: 获取具有给定 ID 的单个V1过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
put:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: filterV1Put
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID.
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要过滤的文本。
|
|||
|
|
|||
|
示例: 挂人
|
|||
|
in: formData
|
|||
|
maxLength: 40
|
|||
|
minLength: 1
|
|||
|
name: phrase
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- collectionFormat: multi
|
|||
|
description: |-
|
|||
|
此过滤规则要应用的上下文。
|
|||
|
|
|||
|
示例: home, public
|
|||
|
enum:
|
|||
|
- home
|
|||
|
- notifications
|
|||
|
- public
|
|||
|
- thread
|
|||
|
- account
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
minItems: 1
|
|||
|
name: context[]
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
uniqueItems: true
|
|||
|
- description: |-
|
|||
|
此过滤规则的过期时间(秒)。如果省略,则过滤规则永不过期。
|
|||
|
|
|||
|
示例: 86400
|
|||
|
in: formData
|
|||
|
name: expires_in
|
|||
|
type: number
|
|||
|
- default: false
|
|||
|
description: |-
|
|||
|
被命中的条目是否应该从用户的时间线/视图中移除,而不是隐藏?目前不支持。
|
|||
|
|
|||
|
示例: false
|
|||
|
in: formData
|
|||
|
name: irreversible
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: |-
|
|||
|
此过滤规则是否应考虑单词边界(整词匹配)?
|
|||
|
|
|||
|
示例: true
|
|||
|
in: formData
|
|||
|
name: whole_word
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterV1'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户执行此操作
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: conflict (duplicate keyword)
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理 content
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 更新单个V1过滤规则
|
|||
|
description: 更新具有给定 ID 的单个过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v1/follow_requests:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取向你发起关注请求的账户数组。
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/follow_requests?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/follow_requests?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: getFollowRequests
|
|||
|
parameters:
|
|||
|
- description: '仅返回比给定的 max ID *旧* 的关注请求账户。具有指定 ID 的关注请求账户不会包含在响应中。注意:ID 是内部关注请求的 ID,而不是任何返回的账户的 ID。'
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: '仅返回比给定的 since ID *新* 的关注请求账户。具有指定 ID 的关注请求账户不会包含在响应中。注意:ID 是内部关注请求的 ID,而不是任何返回的账户的 ID。'
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: '仅返回比给定的 min ID *相邻且更新* 的关注请求账户。具有指定 ID 的关注请求账户不会包含在响应中。注意:ID 是内部关注请求的 ID,而不是任何返回的账户的 ID。'
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: 要返回的关注请求账户数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:follows
|
|||
|
summary: 获取关注请求列表
|
|||
|
tags:
|
|||
|
- follow_requests
|
|||
|
/api/v1/follow_requests/{account_id}/authorize:
|
|||
|
post:
|
|||
|
description: 接受/批准来自给定账户 ID 的关注请求,并将请求账户放入你的“粉丝”列表。
|
|||
|
operationId: authorizeFollowRequest
|
|||
|
parameters:
|
|||
|
- description: 要接受的账户的 ID。
|
|||
|
in: path
|
|||
|
name: account_id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此账户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:follows
|
|||
|
summary: 接受关注请求
|
|||
|
tags:
|
|||
|
- follow_requests
|
|||
|
/api/v1/follow_requests/{account_id}/reject:
|
|||
|
post:
|
|||
|
operationId: rejectFollowRequest
|
|||
|
parameters:
|
|||
|
- description: 要拒绝的账户的 ID。
|
|||
|
in: path
|
|||
|
name: account_id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 你与此账户的关系(relationship)。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/accountRelationship'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:follows
|
|||
|
summary: 拒绝关注请求
|
|||
|
description: 拒绝来自给定账户 ID 的关注请求。
|
|||
|
tags:
|
|||
|
- follow_requests
|
|||
|
/api/v1/followed_tags:
|
|||
|
get:
|
|||
|
operationId: getFollowedTags
|
|||
|
parameters:
|
|||
|
- description: '仅返回比给定的 max ID *旧* 的已关注话题标签。具有相应 max ID 的已关注话题标签不会包含在响应中。注意:ID 是已关注话题标签的内部 ID,而不是任何返回的话题标签的 ID。'
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: '仅返回比给定的 since ID *新* 的已关注话题标签。具有相应 since ID 的已关注话题标签不会包含在响应中。注意:ID 是已关注话题标签的内部 ID,而不是任何返回的话题标签的 ID。'
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: '仅返回比给定的 min ID *相邻且更新* 的已关注话题标签。具有相应 min ID 的已关注话题标签不会包含在响应中。注意:ID 是已关注话题标签的内部 ID,而不是任何返回的话题标签的 ID。'
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 100
|
|||
|
description: 要返回的已关注话题标签数量。
|
|||
|
in: query
|
|||
|
maximum: 200
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/tag'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:follows
|
|||
|
summary: 获取已关注话题标签
|
|||
|
description: 获取你当前关注的所有话题标签的数组。
|
|||
|
tags:
|
|||
|
- tags
|
|||
|
/api/v1/import:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: |-
|
|||
|
将 CSV 数据文件上传到你的账户。
|
|||
|
这可以用于从 Mastodon 兼容的 CSV 文件迁移数据到 GoToSocial 账户。
|
|||
|
|
|||
|
上传的数据将异步处理,并且可能不会处理所有条目,具体取决于实例屏蔽、用户级屏蔽、引用账户和状态的网络可用性等。
|
|||
|
operationId: importData
|
|||
|
parameters:
|
|||
|
- description: 要上传的 CSV 数据文件。
|
|||
|
in: formData
|
|||
|
name: data
|
|||
|
required: true
|
|||
|
type: file
|
|||
|
- description: |-
|
|||
|
此数据文件中包含的条目类型:
|
|||
|
- `following` - 要关注的账户。 - `blocks` - 要屏蔽的账户。
|
|||
|
in: formData
|
|||
|
name: type
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: merge
|
|||
|
description: |-
|
|||
|
根据数据文件创建对应的条目时使用的模式:
|
|||
|
- `merge` 将数据文件中的条目与现有条目合并。 - `overwrite` 用数据文件中的条目替换现有条目。
|
|||
|
in: formData
|
|||
|
name: mode
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: 上传的数据文件已被接受。
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 导入数据
|
|||
|
tags:
|
|||
|
- import-export
|
|||
|
/api/v1/instance:
|
|||
|
get:
|
|||
|
operationId: instanceGetV1
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 实例信息
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/instanceV1'
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal error
|
|||
|
summary: 查看实例信息
|
|||
|
tags:
|
|||
|
- instance
|
|||
|
patch:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: 更新实例信息和/或上传新的头像/横幅头图。此端点需要实例管理员权限。
|
|||
|
operationId: instanceUpdate
|
|||
|
parameters:
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 实例的标题。
|
|||
|
in: formData
|
|||
|
maxLength: 40
|
|||
|
name: title
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 联系账户的用户名。这必须是实例管理员的用户名。
|
|||
|
in: formData
|
|||
|
name: contact_username
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 实例联系邮箱。
|
|||
|
in: formData
|
|||
|
name: contact_email
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 实例的简短描述。
|
|||
|
in: formData
|
|||
|
maxLength: 500
|
|||
|
name: short_description
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 实例的详细描述。
|
|||
|
in: formData
|
|||
|
maxLength: 5000
|
|||
|
name: description
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 实例的条款和条件。
|
|||
|
in: formData
|
|||
|
maxLength: 5000
|
|||
|
name: terms
|
|||
|
type: string
|
|||
|
- description: 实例的缩略图。
|
|||
|
in: formData
|
|||
|
name: thumbnail
|
|||
|
type: file
|
|||
|
- description: 提交的实例缩略图的图像描述。
|
|||
|
in: formData
|
|||
|
name: thumbnail_description
|
|||
|
type: string
|
|||
|
- description: 实例的头部背景横幅。
|
|||
|
in: formData
|
|||
|
name: header
|
|||
|
type: file
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的实例信息。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/instanceV1'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 更新实例信息
|
|||
|
tags:
|
|||
|
- instance
|
|||
|
/api/v1/instance/peers:
|
|||
|
get:
|
|||
|
operationId: instancePeersGet
|
|||
|
parameters:
|
|||
|
- default: open
|
|||
|
description: |-
|
|||
|
要应用于结果的过滤规则列表,以逗号分隔。可被识别的过滤规则包括:
|
|||
|
- `open` -- 包括未被禁止或静音的同伴实例
|
|||
|
- `suspended` -- 包括已被禁止的同伴实例。
|
|||
|
|
|||
|
如果过滤规则是 `open`,则只会返回未被禁止或静音的实例。
|
|||
|
|
|||
|
如果过滤规则是 `suspended`,则只会显示已被禁止的实例。
|
|||
|
|
|||
|
如果过滤规则是 `open,suspended`,则将返回所有已知实例。
|
|||
|
|
|||
|
如果过滤规则是空字符串或未设置,则将默认为 `open`。
|
|||
|
in: query
|
|||
|
name: filter
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: |-
|
|||
|
如果未提供 filter 参数,或 filter 为空,则将返回一个遗留的、与 Mastodon-API 兼容的响应。这将仅包含一个类似 `["example.com", "example.org"]` 的字符串数组,对应于此实例的同伴实例的域名。
|
|||
|
|
|||
|
如果提供了 filter 参数,则将返回一个对象数组,每个对象都至少包含一个 `domain` 键。
|
|||
|
|
|||
|
被静音或被禁止的域名还将有一个包含 iso8601 date 格式字符串的 `suspended_at` 或 `silenced_at` 键。如果域名对象不包含这两个键,则它是开放的。在某些情况下,已被禁止的实例可能会被混淆,这意味着它们的一些字母将被 `*` 替换,以使恶意用户更难以针对实例进行骚扰。
|
|||
|
|
|||
|
无论返回的是扁平响应还是更详细的响应,域名都将按主机名字母顺序排序。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/domain'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
tags:
|
|||
|
- instance
|
|||
|
/api/v1/instance/rules:
|
|||
|
get:
|
|||
|
description: 实例规则将按顺序返回(按 Order 升序排序)。
|
|||
|
operationId: rules
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 本站实例的所有规则组成的数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/instanceRule'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
summary: 查看实例规则(公开)
|
|||
|
tags:
|
|||
|
- instance
|
|||
|
/api/v1/interaction_policies/defaults:
|
|||
|
get:
|
|||
|
operationId: policiesDefaultsGet
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 一个默认的策略对象,包含每种贴文可见性的互动规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/defaultPolicies'
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 获取默认互动规则
|
|||
|
description: 获取你创建的新贴文的默认互动规则。
|
|||
|
tags:
|
|||
|
- interaction_policies
|
|||
|
patch:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
- application/json
|
|||
|
description: |-
|
|||
|
为你创建的不同可见性级别的新贴文更新默认互动策略。
|
|||
|
|
|||
|
如果使用表单数据提交,请使用以下范式:
|
|||
|
|
|||
|
`VISIBILITY[INTERACTION_TYPE][CONDITION][INDEX]=Value`
|
|||
|
|
|||
|
例如:`public[can_reply][always][0]=author`
|
|||
|
|
|||
|
使用 `curl` 调用时可以为如下形式:
|
|||
|
|
|||
|
`curl -F 'public[can_reply][always][0]=author' -F 'public[can_reply][always][1]=followers'`
|
|||
|
|
|||
|
其 JSON 等效形式为:
|
|||
|
|
|||
|
`curl -H 'Content-Type: application/json' -d '{"public":{"can_reply":{"always":["author","followers"]}}}'`
|
|||
|
|
|||
|
请求体中未指定的任何可见性级别将被重置为默认值。
|
|||
|
|
|||
|
例如,在上面的示例中,“public” 将被更新,但“unlisted”、“private” 和“direct” 将被重置为默认值。
|
|||
|
|
|||
|
服务器将对提交的策略执行一些规范化,以免您提交完全无效的策略。
|
|||
|
operationId: policiesDefaultsUpdate
|
|||
|
parameters:
|
|||
|
- description: public.can_favourite.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: public[can_favourite][always][0]
|
|||
|
type: string
|
|||
|
- description: public.can_favourite.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: public[can_favourite][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: public.can_reply.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: public[can_reply][always][0]
|
|||
|
type: string
|
|||
|
- description: public.can_reply.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: public[can_reply][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: public.can_reblog.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: public[can_reblog][always][0]
|
|||
|
type: string
|
|||
|
- description: public.can_reblog.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: public[can_reblog][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: unlisted.can_favourite.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: unlisted[can_favourite][always][0]
|
|||
|
type: string
|
|||
|
- description: unlisted.can_favourite.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: unlisted[can_favourite][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: unlisted.can_reply.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: unlisted[can_reply][always][0]
|
|||
|
type: string
|
|||
|
- description: unlisted.can_reply.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: unlisted[can_reply][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: unlisted.can_reblog.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: unlisted[can_reblog][always][0]
|
|||
|
type: string
|
|||
|
- description: unlisted.can_reblog.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: unlisted[can_reblog][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: private.can_favourite.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: private[can_favourite][always][0]
|
|||
|
type: string
|
|||
|
- description: private.can_favourite.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: private[can_favourite][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: private.can_reply.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: private[can_reply][always][0]
|
|||
|
type: string
|
|||
|
- description: private.can_reply.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: private[can_reply][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: private.can_reblog.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: private[can_reblog][always][0]
|
|||
|
type: string
|
|||
|
- description: private.can_reblog.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: private[can_reblog][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: direct.can_favourite.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: direct[can_favourite][always][0]
|
|||
|
type: string
|
|||
|
- description: direct.can_favourite.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: direct[can_favourite][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: direct.can_reply.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: direct[can_reply][always][0]
|
|||
|
type: string
|
|||
|
- description: direct.can_reply.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: direct[can_reply][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: direct.can_reblog.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: direct[can_reblog][always][0]
|
|||
|
type: string
|
|||
|
- description: direct.can_reblog.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: direct[can_reblog][with_approval][0]
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的默认策略对象,包含每种贴文可见性的互动规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/defaultPolicies'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 更新默认互动规则
|
|||
|
tags:
|
|||
|
- interaction_policies
|
|||
|
/api/v1/interaction_requests:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取其他账户对你的贴文发起的,等待你批准的互动请求的数组。
|
|||
|
```
|
|||
|
<https://example.org/api/v1/interaction_requests?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/interaction_requests?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: getInteractionRequests
|
|||
|
parameters:
|
|||
|
- description: 若设置,则只有针对给定 status_id 的互动请求将包含在结果中。
|
|||
|
in: query
|
|||
|
name: status_id
|
|||
|
type: string
|
|||
|
- default: true
|
|||
|
description: 如果为 true 或未设置,则将在结果中包含待批准的点赞。favourites, replies 和 reblogs 中至少有一个必须为 true。
|
|||
|
in: query
|
|||
|
name: favourites
|
|||
|
type: boolean
|
|||
|
- default: true
|
|||
|
description: 如果为 true 或未设置,则将在结果中包含待批准的回复。favourites, replies 和 reblogs 中至少有一个必须为 true。
|
|||
|
in: query
|
|||
|
name: replies
|
|||
|
type: boolean
|
|||
|
- default: true
|
|||
|
description: 如果为 true 或未设置,则将在结果中包含待批准的转发。favourites, replies 和 reblogs 中至少有一个必须为 true。
|
|||
|
in: query
|
|||
|
name: reblogs
|
|||
|
type: boolean
|
|||
|
- description: 仅返回比给定的 max ID *旧* 的互动请求。具有指定 ID 的互动请求不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 since ID *新* 的互动请求。具有指定 ID 的互动请求不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 min ID *相邻且更新* 的互动请求。具有指定 ID 的互动请求不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: 要返回的互动请求数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/interactionRequest'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:notifications
|
|||
|
summary: 获取互动请求列表
|
|||
|
tags:
|
|||
|
- interaction_requests
|
|||
|
/api/v1/interaction_requests/{id}:
|
|||
|
get:
|
|||
|
operationId: getInteractionRequest
|
|||
|
parameters:
|
|||
|
- description: 对你发出的互动请求的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 互动请求。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/interactionRequest'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:notifications
|
|||
|
summary: 获取单个互动请求
|
|||
|
description: 获取具有给定 ID 的互动请求。
|
|||
|
tags:
|
|||
|
- interaction_requests
|
|||
|
/api/v1/interaction_requests/{id}/authorize:
|
|||
|
post:
|
|||
|
operationId: authorizeInteractionRequest
|
|||
|
parameters:
|
|||
|
- description: 对你发出的互动请求的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被批准后的互动请求。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/interactionRequest'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 接受互动请求
|
|||
|
description: 接受/授权/批准具有给定 ID 的互动请求。
|
|||
|
tags:
|
|||
|
- interaction_requests
|
|||
|
/api/v1/interaction_requests/{id}/reject:
|
|||
|
post:
|
|||
|
operationId: rejectInteractionRequest
|
|||
|
parameters:
|
|||
|
- description: 对你发出的互动请求的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被拒绝的互动请求。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/interactionRequest'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 拒绝互动请求
|
|||
|
description: 拒绝具有给定 ID 的互动请求。
|
|||
|
tags:
|
|||
|
- interaction_requests
|
|||
|
/api/v1/lists:
|
|||
|
get:
|
|||
|
operationId: lists
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 发起请求的用户拥有的所有列表的数组。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/list'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 获取所有列表
|
|||
|
description: 获取授权用户拥有的所有列表。
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: listCreate
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
列表的标题。
|
|||
|
示例: 大佬
|
|||
|
in: formData
|
|||
|
name: title
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Title
|
|||
|
- default: list
|
|||
|
description: |-
|
|||
|
此列表的回复策略。
|
|||
|
followed = 显示对任何关注的用户的回复
|
|||
|
list = 显示对列表成员的回复
|
|||
|
none = 不显示回复
|
|||
|
示例: list
|
|||
|
enum:
|
|||
|
- followed
|
|||
|
- list
|
|||
|
- none
|
|||
|
in: formData
|
|||
|
name: replies_policy
|
|||
|
type: string
|
|||
|
x-go-name: RepliesPolicy
|
|||
|
- default: false
|
|||
|
description: 将此列表的成员的贴文从你的主页时间线中隐藏。
|
|||
|
in: formData
|
|||
|
name: exclusive
|
|||
|
type: boolean
|
|||
|
x-go-name: Exclusive
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的列表。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/list'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:lists
|
|||
|
summary: 创建列表
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
/api/v1/lists/{id}:
|
|||
|
delete:
|
|||
|
operationId: listDelete
|
|||
|
parameters:
|
|||
|
- description: 列表的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 列表已删除
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:lists
|
|||
|
summary: 删除列表
|
|||
|
description: 删除具有给定 ID 的列表。
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
get:
|
|||
|
operationId: list
|
|||
|
parameters:
|
|||
|
- description: 列表的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的列表。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/list'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 获取列表
|
|||
|
description: 获取具有给定 ID 的列表。
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
put:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: listUpdate
|
|||
|
parameters:
|
|||
|
- description: 列表的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
列表的标题。
|
|||
|
示例: 大佬
|
|||
|
in: formData
|
|||
|
name: title
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
列表的回复展示规则。
|
|||
|
followed = 显示对任何关注的用户的回复
|
|||
|
list = 显示对列表成员的回复
|
|||
|
none = 不显示回复
|
|||
|
示例: list
|
|||
|
enum:
|
|||
|
- followed
|
|||
|
- list
|
|||
|
- none
|
|||
|
in: formData
|
|||
|
name: replies_policy
|
|||
|
type: string
|
|||
|
- description: 将此列表的成员的贴文从你的主页时间线中隐藏。
|
|||
|
in: formData
|
|||
|
name: exclusive
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的列表。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/list'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:lists
|
|||
|
summary: 更新列表
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
/api/v1/lists/{id}/accounts:
|
|||
|
delete:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: removeListAccounts
|
|||
|
parameters:
|
|||
|
- description: 列表的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- collectionFormat: multi
|
|||
|
description: 要编辑的账户 ID 数组。每个账户 ID 必须对应于一个发起请求的账户关注的账户。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: account_ids[]
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 列表账户已更新
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 从列表删除账户
|
|||
|
description: 从给定列表中删除一个或多个账户。
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
分页浏览给定列表中的账户。
|
|||
|
返回的 Link 标头可用于在时间线向上或向下滚动时生成上一个和下一个查询。
|
|||
|
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/list/01H0W619198FX7J54NF7EH1NG2/accounts?limit=20&max_id=01FC3GSQ8A3MMJ43BPZSGEG29M>; rel="next", <https://example.org/api/v1/list/01H0W619198FX7J54NF7EH1NG2/accounts?limit=20&min_id=01FC3KJW2GYXSDDRA6RWNDM46M>; rel="prev"
|
|||
|
````
|
|||
|
operationId: listAccounts
|
|||
|
parameters:
|
|||
|
- description: 列表的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 max ID *旧* 的列表条目。具有指定 ID 的列表条目对应的账户不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 since ID *新* 的列表条目。具有指定 ID 的列表条目对应的账户不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 min ID *相邻且更新* 的列表条目。具有指定 ID 的列表条目对应的账户不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: '要返回的账户数量。如果显式设置为 0,则列表中的所有账户将被返回,并且不会使用分页标头。这是针对 Mastodon API 的一个特殊情况的解决方法:https://docs.joinmastodon.org/methods/lists/#query-parameters。'
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 0
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 账户数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 查看列表中的账户
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: addListAccounts
|
|||
|
parameters:
|
|||
|
- description: 列表的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- collectionFormat: multi
|
|||
|
description: 要编辑的账户 ID 数组。每个账户 ID 必须对应于一个发起请求的账户关注的账户。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: account_ids[]
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 列表账户已更新
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 向列表添加账户
|
|||
|
description: 向给定列表中添加一个或多个账户。
|
|||
|
tags:
|
|||
|
- lists
|
|||
|
/api/v1/markers:
|
|||
|
get:
|
|||
|
description: 根据名称获取时间线标记
|
|||
|
operationId: markersGet
|
|||
|
parameters:
|
|||
|
- description: 要检索的时间线。
|
|||
|
in: query
|
|||
|
items:
|
|||
|
enum:
|
|||
|
- home
|
|||
|
- notifications
|
|||
|
type: string
|
|||
|
name: timeline
|
|||
|
type: array
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的标记
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/markers'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
tags:
|
|||
|
- markers
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- multipart/form-data
|
|||
|
description: 根据名称更新时间线标记
|
|||
|
operationId: markersPost
|
|||
|
parameters:
|
|||
|
- description: 在主页时间线上最后阅读的贴文 ID。
|
|||
|
in: formData
|
|||
|
name: home[last_read_id]
|
|||
|
type: string
|
|||
|
- description: 在通知时间线上最后阅读的通知 ID。
|
|||
|
in: formData
|
|||
|
name: notifications[last_read_id]
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的标记
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/markers'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"409":
|
|||
|
description: 冲突(当两个客户端尝试同时更新同一时间线时)
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
tags:
|
|||
|
- markers
|
|||
|
/api/v1/media/{id}:
|
|||
|
get:
|
|||
|
operationId: mediaGet
|
|||
|
parameters:
|
|||
|
- description: 附件的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的媒体附件。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/attachment'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:media
|
|||
|
summary: 获取单个媒体附件
|
|||
|
description: 获取一个你拥有的媒体附件。
|
|||
|
tags:
|
|||
|
- media
|
|||
|
put:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
你必须拥有这个媒体附件,并且这个附件还没有被附加到任何贴文上。
|
|||
|
|
|||
|
若 Content-Type 为 'application/json',则参数也可以在请求体中以 JSON 形式给出。
|
|||
|
若 Content-Type 为 'application/xml',则参数也可以在请求体中以 XML 形式给出。
|
|||
|
operationId: mediaUpdate
|
|||
|
parameters:
|
|||
|
- description: 要更新的附件的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
description: 图片或媒体描述,用作附件的 alt 文本。这对于使用屏幕阅读器的用户非常有用!根据实例设置,可能必填,也可能选填。
|
|||
|
in: formData
|
|||
|
name: description
|
|||
|
type: string
|
|||
|
- allowEmptyValue: true
|
|||
|
default: 0,0
|
|||
|
description: '媒体文件的焦点。如果存在,它应该是两个介于 -1 和 1 之间的逗号分隔的浮点数。例如:`-0.5,0.25`。'
|
|||
|
in: formData
|
|||
|
name: focus
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的媒体附件。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/attachment'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:media
|
|||
|
summary: 更新单个媒体附件
|
|||
|
tags:
|
|||
|
- media
|
|||
|
/api/v1/mutes:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取发起请求的账户静音的账户列表。
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/mutes?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/mutes?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: mutesGet
|
|||
|
parameters:
|
|||
|
- description: '仅返回比给定的 max ID *旧* 的被静音账户。具有指定 ID 的被静音账户不会包含在响应中。'
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: '仅返回比给定的 since ID *新* 的被静音账户。具有指定 ID 的被静音账户不会包含在响应中。'
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: '仅返回比给定的 min ID *相邻且更新* 的被静音账户。具有指定 ID 的被静音账户不会包含在响应中。'
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 40
|
|||
|
description: 要返回的被静音账户数量。
|
|||
|
in: query
|
|||
|
maximum: 80
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被静音账户的列表,包括他们的静音到期时间(如果适用)。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/mutedAccount'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:mutes
|
|||
|
summary: 获取静音账户列表
|
|||
|
tags:
|
|||
|
- mutes
|
|||
|
/api/v1/notification/{id}:
|
|||
|
get:
|
|||
|
operationId: notification
|
|||
|
parameters:
|
|||
|
- description: 通知的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的通知。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/notification'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:notifications
|
|||
|
summary: 获取单个通知
|
|||
|
description: 获取单个具有给定 ID 的通知。
|
|||
|
tags:
|
|||
|
- notifications
|
|||
|
/api/v1/notifications:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取当前授权用户的通知。
|
|||
|
通知将按照时间顺序(最新的在前)返回,具有连续的 ID(更大 = 更新)。
|
|||
|
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/notifications?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/notifications?limit=80&since_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: notifications
|
|||
|
parameters:
|
|||
|
- description: 仅返回比给定的 max ID *旧* 的通知。具有指定 ID 的通知不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 since ID *新* 的通知。具有指定 ID 的通知不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 since ID *相邻且更新* 的通知。具有指定 ID 的通知不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的通知数量。
|
|||
|
in: query
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- description: 要包含的通知类型。如果未提供,则将包含所有通知类型。
|
|||
|
in: query
|
|||
|
items:
|
|||
|
enum:
|
|||
|
- follow
|
|||
|
- follow_request
|
|||
|
- mention
|
|||
|
- reblog
|
|||
|
- favourite
|
|||
|
- poll
|
|||
|
- status
|
|||
|
- admin.sign_up
|
|||
|
type: string
|
|||
|
name: types[]
|
|||
|
type: array
|
|||
|
- description: 要排除的通知类型。
|
|||
|
in: query
|
|||
|
items:
|
|||
|
enum:
|
|||
|
- follow
|
|||
|
- follow_request
|
|||
|
- mention
|
|||
|
- reblog
|
|||
|
- favourite
|
|||
|
- poll
|
|||
|
- status
|
|||
|
- admin.sign_up
|
|||
|
type: string
|
|||
|
name: exclude_types[]
|
|||
|
type: array
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 通知数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/notification'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:notifications
|
|||
|
summary: 获取通知列表
|
|||
|
tags:
|
|||
|
- notifications
|
|||
|
/api/v1/notifications/clear:
|
|||
|
post:
|
|||
|
description: 清空/删除当前授权用户的所有通知。如果成功,将返回一个空对象 `{}`。
|
|||
|
operationId: clearNotifications
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
type: object
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:notifications
|
|||
|
summary: 清空通知
|
|||
|
tags:
|
|||
|
- notifications
|
|||
|
/api/v1/polls/{id}:
|
|||
|
get:
|
|||
|
operationId: poll
|
|||
|
parameters:
|
|||
|
- description: 目标投票 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的投票。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/poll'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 获取投票
|
|||
|
description: 获取具有给定 ID 的投票。
|
|||
|
tags:
|
|||
|
- polls
|
|||
|
/api/v1/polls/{id}/votes:
|
|||
|
post:
|
|||
|
operationId: pollVote
|
|||
|
parameters:
|
|||
|
- description: 目标投票 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 用户选择的投票项索引。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: integer
|
|||
|
name: choices
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的投票和用户投票选择。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/poll'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理 entity
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 参与投票
|
|||
|
description: 对给定投票进行投票。
|
|||
|
tags:
|
|||
|
- polls
|
|||
|
/api/v1/preferences:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
返回包含用户偏好设置的对象。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
{
|
|||
|
"posting:default:visibility": "public",
|
|||
|
"posting:default:sensitive": false,
|
|||
|
"posting:default:language": "en",
|
|||
|
"reading:expand:media": "default",
|
|||
|
"reading:expand:spoilers": false,
|
|||
|
"reading:autoplay:gifs": false
|
|||
|
}
|
|||
|
|
|||
|
````
|
|||
|
operationId: preferencesGet
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
type: object
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 获取用户偏好设置
|
|||
|
tags:
|
|||
|
- preferences
|
|||
|
/api/v1/profile/avatar:
|
|||
|
delete:
|
|||
|
description: 删除当前认证账户的头像。如果账户没有头像,调用也会成功。
|
|||
|
operationId: accountAvatarDelete
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的账户,包括个人资料源信息。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除头像
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/profile/header:
|
|||
|
delete:
|
|||
|
description: 删除当前认证账户的横幅背景头图。如果账户没有横幅背景头图,调用也会成功。
|
|||
|
operationId: accountHeaderDelete
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的账户,包括个人资料源信息。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 删除横幅背景
|
|||
|
tags:
|
|||
|
- accounts
|
|||
|
/api/v1/reports:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看发起请求的账户创建的举报。
|
|||
|
|
|||
|
举报将按时间顺序(最新的在前)返回,具有连续的 ID(更大 = 更新)。
|
|||
|
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/reports?limit=20&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/reports?limit=20&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
|
|||
|
````
|
|||
|
operationId: reports
|
|||
|
parameters:
|
|||
|
- description: 如果设置为 true,只返回已解决的举报。如果设置为 false,只返回未解决的举报。如果未设置,举报将不会根据其解决状态进行过滤。
|
|||
|
in: query
|
|||
|
name: resolved
|
|||
|
type: boolean
|
|||
|
- description: 仅返回针对目标账户 ID 的举报。
|
|||
|
in: query
|
|||
|
name: target_account_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 max ID *旧* 的举报。具有指定 ID 的举报不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 since ID *新* 的举报。具有指定 ID 的举报不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 仅返回比给定的 min ID *相邻且更新* 的举报。具有指定 ID 的举报不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的举报数量。
|
|||
|
in: query
|
|||
|
maximum: 100
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 举报的数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/report'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:reports
|
|||
|
summary: 获取举报列表
|
|||
|
tags:
|
|||
|
- reports
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: reportCreate
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
要举报的账户 ID。
|
|||
|
示例: 01GPE75FXSH2EGFBF85NXPH3KP
|
|||
|
in: formData
|
|||
|
name: account_id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: AccountID
|
|||
|
- description: |-
|
|||
|
要附加到举报中以提供额外上下文的贴文的 ID。
|
|||
|
示例: ["01GPE76N4SBVRZ8K24TW51ZZQ4","01GPE76WN9JZE62EPT3Q9FRRD4"]
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: status_ids
|
|||
|
type: array
|
|||
|
x-go-name: StatusIDs
|
|||
|
- description: |-
|
|||
|
举报的原因。默认最大 1000 个字符。
|
|||
|
示例: 未经允许公开他人隐私信息
|
|||
|
in: formData
|
|||
|
name: comment
|
|||
|
type: string
|
|||
|
x-go-name: Comment
|
|||
|
- default: false
|
|||
|
description: |-
|
|||
|
如果账户为外站账户,是否应将举报转发给外站管理员?
|
|||
|
示例: true
|
|||
|
in: formData
|
|||
|
name: forward
|
|||
|
type: boolean
|
|||
|
x-go-name: Forward
|
|||
|
- default: other
|
|||
|
description: |-
|
|||
|
指定举报属于骚扰、违反特定实例规则还是其他原因。
|
|||
|
目前仅支持 'other'。
|
|||
|
示例: other
|
|||
|
in: formData
|
|||
|
name: category
|
|||
|
type: string
|
|||
|
x-go-name: Category
|
|||
|
- description: |-
|
|||
|
举报人提供的被违反的实例规则的 ID。
|
|||
|
示例: ["01GPBN5YDY6JKBWE44H7YQBDCQ","01GPBN65PDWSBPWVDD0SQCFFY3"]
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: rule_ids
|
|||
|
type: array
|
|||
|
x-go-name: RuleIDs
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 创建的举报。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/report'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:reports
|
|||
|
summary: 创建举报
|
|||
|
description: 根据给定参数创建一个新的用户举报。
|
|||
|
tags:
|
|||
|
- reports
|
|||
|
/api/v1/reports/{id}:
|
|||
|
get:
|
|||
|
operationId: reportGet
|
|||
|
parameters:
|
|||
|
- description: 举报的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的举报。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/report'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:reports
|
|||
|
summary: 获取单条举报
|
|||
|
description: 获取具有给定 ID 的举报。
|
|||
|
tags:
|
|||
|
- reports
|
|||
|
/api/v1/statuses:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
按给定的表单字段参数创建一个新的贴文。
|
|||
|
若 Content-Type 为 'application/json',则参数也可以在请求体中以 JSON 形式给出。
|
|||
|
|
|||
|
`interaction_policy` 字段可用于为此贴文设置交互策略。
|
|||
|
|
|||
|
如果使用表单数据提交,请使用以下模式设置交互策略:
|
|||
|
|
|||
|
`interaction_policy[INTERACTION_TYPE][CONDITION][INDEX]=Value`
|
|||
|
|
|||
|
例如:`interaction_policy[can_reply][always][0]=author`
|
|||
|
|
|||
|
使用 `curl` 可以按如下所示:
|
|||
|
|
|||
|
`curl -F 'interaction_policy[can_reply][always][0]=author' -F 'interaction_policy[can_reply][always][1]=followers' [... other form fields ...]`
|
|||
|
|
|||
|
JSON 等效形式为:
|
|||
|
|
|||
|
`curl -H 'Content-Type: application/json' -d '{"interaction_policy":{"can_reply":{"always":["author","followers"]}} [... other json fields ...]}'`
|
|||
|
|
|||
|
服务器将对提交的策略执行一些规范化处理,以确保您无法提交完全无效的内容。
|
|||
|
operationId: statusCreate
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
贴文的文字内容。
|
|||
|
如果提供了 media_ids,此项变为可选。
|
|||
|
当提供贴文时,附加投票将变为可选。
|
|||
|
in: formData
|
|||
|
name: status
|
|||
|
type: string
|
|||
|
x-go-name: Status
|
|||
|
- description: |-
|
|||
|
要附加的媒体附件 ID 数组。
|
|||
|
如果提供了 media_ids,status 将变为可选,poll 不能使用。
|
|||
|
|
|||
|
如果贴文以表单形式提交,应使用的键为 'media_ids[]',但如果是 JSON 或 XML,则键为 'media_ids'。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: media_ids
|
|||
|
type: array
|
|||
|
x-go-name: MediaIDs
|
|||
|
- description: |-
|
|||
|
投票选项的数组。
|
|||
|
如果提供了投票选项,media_ids 将不能使用,poll[expires_in] 必须提供。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: poll[options][]
|
|||
|
type: array
|
|||
|
x-go-name: PollOptions
|
|||
|
- description: |-
|
|||
|
投票的开放时长,单位为秒。
|
|||
|
如果提供了此项,media_ids 不能使用,poll[options] 必须提供。
|
|||
|
format: int64
|
|||
|
in: formData
|
|||
|
name: poll[expires_in]
|
|||
|
type: integer
|
|||
|
x-go-name: PollExpiresIn
|
|||
|
- default: false
|
|||
|
description: 在此投票上允许多选。
|
|||
|
in: formData
|
|||
|
name: poll[multiple]
|
|||
|
type: boolean
|
|||
|
x-go-name: PollMultiple
|
|||
|
- default: true
|
|||
|
description: 在投票结束前隐藏投票计数。
|
|||
|
in: formData
|
|||
|
name: poll[hide_totals]
|
|||
|
type: boolean
|
|||
|
x-go-name: PollHideTotals
|
|||
|
- description: 被回复的贴文 ID(如果要发送的贴文是回复)。
|
|||
|
in: formData
|
|||
|
name: in_reply_to_id
|
|||
|
type: string
|
|||
|
x-go-name: InReplyToID
|
|||
|
- description: 贴文和附加媒体应标记为敏感。
|
|||
|
in: formData
|
|||
|
name: sensitive
|
|||
|
type: boolean
|
|||
|
x-go-name: Sensitive
|
|||
|
- description: |-
|
|||
|
在贴文内容之前显示的警告或主题文本。
|
|||
|
贴文通常被折叠在此字段身后。
|
|||
|
in: formData
|
|||
|
name: spoiler_text
|
|||
|
type: string
|
|||
|
x-go-name: SpoilerText
|
|||
|
- description: 贴文的可见性。
|
|||
|
enum:
|
|||
|
- public
|
|||
|
- unlisted
|
|||
|
- private
|
|||
|
- mutuals_only
|
|||
|
- direct
|
|||
|
in: formData
|
|||
|
name: visibility
|
|||
|
type: string
|
|||
|
x-go-name: Visibility
|
|||
|
- default: false
|
|||
|
description: 如果设置为 true,此状态将仅在本站可见,不会传播到本站以外的时间线。如果设置为 false(默认),此状态将传播到您的所有关注者,以及本站时间线外的时间线。
|
|||
|
in: formData
|
|||
|
name: local_only
|
|||
|
type: boolean
|
|||
|
x-go-name: LocalOnly
|
|||
|
- description: '***已弃用***。仅用于后向兼容。仅在 local_only 尚未设置且此字段被明确设置时使用。如果设置为 true,此贴文将在本站时间线之外传播。如果设置为 false,此贴文将不会在本站时间线之外传播。'
|
|||
|
in: formData
|
|||
|
name: federated
|
|||
|
type: boolean
|
|||
|
x-go-name: Federated
|
|||
|
- description: |-
|
|||
|
此贴文的计划发布时间,格式为 ISO 8601 Datetime。
|
|||
|
提供此参数将导致返回 ScheduledStatus 而不是 Status。
|
|||
|
必须至少在未来 5 分钟之后。
|
|||
|
|
|||
|
此功能尚未实现;尝试设置它将返回 501 Not Implemented。
|
|||
|
in: formData
|
|||
|
name: scheduled_at
|
|||
|
type: string
|
|||
|
x-go-name: ScheduledAt
|
|||
|
- description: 此贴文的 ISO 639 语言代码。
|
|||
|
in: formData
|
|||
|
name: language
|
|||
|
type: string
|
|||
|
x-go-name: Language
|
|||
|
- description: 解析此贴文时使用的内容类型。
|
|||
|
enum:
|
|||
|
- text/plain
|
|||
|
- text/markdown
|
|||
|
in: formData
|
|||
|
name: content_type
|
|||
|
type: string
|
|||
|
x-go-name: ContentType
|
|||
|
- description: interaction_policy.can_favourite.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: interaction_policy[can_favourite][always][0]
|
|||
|
type: string
|
|||
|
- description: interaction_policy.can_favourite.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: interaction_policy[can_favourite][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: interaction_policy.can_reply.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: interaction_policy[can_reply][always][0]
|
|||
|
type: string
|
|||
|
- description: interaction_policy.can_reply.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: interaction_policy[can_reply][with_approval][0]
|
|||
|
type: string
|
|||
|
- description: interaction_policy.can_reblog.always 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: interaction_policy[can_reblog][always][0]
|
|||
|
type: string
|
|||
|
- description: interaction_policy.can_reblog.with_approval 的第 N 个条目。
|
|||
|
in: formData
|
|||
|
name: interaction_policy[can_reblog][with_approval][0]
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新创建的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
"501":
|
|||
|
description: scheduled_at 被设置,但此功能尚未实现
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 创建新贴文
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}:
|
|||
|
delete:
|
|||
|
description: |-
|
|||
|
删除给定 ID 的贴文。贴文必须属于您。
|
|||
|
删除的贴文将在响应中返回。`text` 字段将包含贴文的原始文本,就像它被提交时一样。这在执行“删除并重新撰写”类型操作时很有用。
|
|||
|
operationId: statusDelete
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 刚刚被删除的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 删除贴文
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
get:
|
|||
|
operationId: statusGet
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 查看贴文
|
|||
|
description: 查看具有给定 ID 的贴文。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/bookmark:
|
|||
|
post:
|
|||
|
operationId: statusBookmark
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 对应的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 收藏贴文
|
|||
|
description: 收藏具有给定 ID 的贴文。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/context:
|
|||
|
get:
|
|||
|
description: 返回给定贴文的祖先和后代。返回的贴文将按贴文串结构排序,因此它们适合按返回顺序显示。
|
|||
|
operationId: threadContext
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 贴文串上下文对象。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/threadContext'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 查看贴文串上下文
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/favourite:
|
|||
|
post:
|
|||
|
operationId: statusFave
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被点赞的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 点赞贴文
|
|||
|
description: 点赞给定 ID 的贴文(如果允许)。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/favourited_by:
|
|||
|
get:
|
|||
|
operationId: statusFavedBy
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 查看贴文点赞列表
|
|||
|
description: 查看点赞给定 ID 的贴文的账户。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/history:
|
|||
|
get:
|
|||
|
description: '查看给定 ID 的贴文的编辑历史。 **未实现**:当前此端点将始终返回一个长度为 1 的数组,仅包含贴文的最新/当前版本。'
|
|||
|
operationId: statusHistoryGet
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/statusEdit'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 查看贴文编辑历史
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/mute:
|
|||
|
post:
|
|||
|
description: |-
|
|||
|
静音某条贴文的贴文串,防止未来串中的回复、点赞、转发等行为产生通知。
|
|||
|
|
|||
|
目标贴文必须属于您或提及了您。
|
|||
|
|
|||
|
贴文串静音和取消静音是幂等的。如果您已经静音了一个串,再次静音它只是意味着它保持静音,您将得到 200 OK 返回。
|
|||
|
operationId: statusMute
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被静音的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求; 你不是目标贴文串的参与者
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:mutes
|
|||
|
summary: 静音贴文串
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/pin:
|
|||
|
post:
|
|||
|
description: |-
|
|||
|
将贴文在个人资料页置顶,并将其添加到你的特色 ActivityPub 集合中。
|
|||
|
|
|||
|
你只能将原创贴文(非转发)固定到自己的个人资料上。
|
|||
|
|
|||
|
支持的固定贴文的隐私级别有 public、unlisted 和 private/followers-only,
|
|||
|
但只有公开贴文会出现在您个人资料的网页版本上。
|
|||
|
operationId: statusPin
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被固定的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 置顶贴文
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/reblog:
|
|||
|
post:
|
|||
|
description: |-
|
|||
|
转发给定 ID 的贴文。
|
|||
|
如果目标贴文是可转发的,它将被分享给您的粉丝。
|
|||
|
这相当于一个 ActivityPub 'Announce' 活动。
|
|||
|
operationId: statusReblog
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被转发的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 转发贴文
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/reblogged_by:
|
|||
|
get:
|
|||
|
operationId: statusBoostedBy
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/account'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:accounts
|
|||
|
summary: 查看贴文转发列表
|
|||
|
description: 查看转发给定 ID 的贴文的账户。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/source:
|
|||
|
get:
|
|||
|
operationId: statusSourceGet
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/statusSource'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 查看贴文源文本
|
|||
|
description: 查看给定 ID 的贴文的源文本。请求者必须拥有该贴文。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/unbookmark:
|
|||
|
post:
|
|||
|
operationId: statusUnbookmark
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 对应的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 取消收藏贴文
|
|||
|
description: 取消收藏给定 ID 的贴文。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/unfavourite:
|
|||
|
post:
|
|||
|
operationId: statusUnfave
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被取消点赞的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 取消点赞贴文
|
|||
|
description: 取消点赞给定 ID 的贴文。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/unmute:
|
|||
|
post:
|
|||
|
description: |-
|
|||
|
取消静音某条贴文的贴文串。这将重新启用串中未来回复、点赞、转发等行为的通知。
|
|||
|
|
|||
|
目标贴文必须属于您或提及了您。
|
|||
|
|
|||
|
贴文串静音和取消静音是幂等的。如果您已经取消静音了一个串,再次取消静音它只是意味着它保持取消静音,您将得到 200 OK 的返回状态。
|
|||
|
operationId: statusUnmute
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被取消静音的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求; 你不是目标贴文串的参与者
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:mutes
|
|||
|
summary: 取消静音贴文串
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/unpin:
|
|||
|
post:
|
|||
|
operationId: statusUnpin
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:accounts
|
|||
|
summary: 取消置顶贴文
|
|||
|
description: 取消置顶某条已经置顶的贴文。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/statuses/{id}/unreblog:
|
|||
|
post:
|
|||
|
operationId: statusUnreblog
|
|||
|
parameters:
|
|||
|
- description: 目标贴文 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 被取消转发的贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:statuses
|
|||
|
summary: 取消转发贴文
|
|||
|
description: 取消转发给定 ID 的贴文。
|
|||
|
tags:
|
|||
|
- statuses
|
|||
|
/api/v1/streaming:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
发起一个用于实时流式传输贴文和通知的 websocket 连接。
|
|||
|
使用的协议应始终为 `wss`。流式传输根路径可以在 `/api/v1/instance` 查看。
|
|||
|
|
|||
|
在成功连接时,将返回代码 `101`,表示正在将连接升级为安全的 websocket 连接。
|
|||
|
|
|||
|
只要连接保持打开状态,就会将各种消息类型流式传输到其中。
|
|||
|
|
|||
|
GoToSocial 将每 30 秒对连接进行 ping,以检查客户端是否仍在接收。
|
|||
|
|
|||
|
如果 ping 失败,或者在传输过程中发生其他问题,则连接将被断开,并且客户端将被要求重新启动。
|
|||
|
operationId: streamGet
|
|||
|
parameters:
|
|||
|
- description: 发起请求的账户的访问令牌。
|
|||
|
in: query
|
|||
|
name: access_token
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
请求的流类型。
|
|||
|
|
|||
|
可用选项有:
|
|||
|
|
|||
|
`user`: 接收账户的主页时间线更新。
|
|||
|
`public`: 接收公共时间线更新。
|
|||
|
`public:local`: 接收本站时间线更新。
|
|||
|
`hashtag`: 接收给定话题标签的更新。
|
|||
|
`hashtag:local`: 接收给定话题标签的本站更新。
|
|||
|
`list`: 接收一个列表中的账户的更新。
|
|||
|
`direct`: 接收私信的更新。
|
|||
|
in: query
|
|||
|
name: stream
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要订阅的列表的 ID。
|
|||
|
仅在流类型为 'list' 时使用。
|
|||
|
in: query
|
|||
|
name: list
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要订阅的话题标签的名称。
|
|||
|
仅在流类型为 'hashtag' 或 'hashtag:local' 时使用。
|
|||
|
in: query
|
|||
|
name: tag
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"101":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
properties:
|
|||
|
event:
|
|||
|
description: |-
|
|||
|
要接收的事件类型。
|
|||
|
|
|||
|
`update`:收到新贴文。
|
|||
|
`notification`:收到新通知。
|
|||
|
`delete`:贴文已被删除。
|
|||
|
`filters_changed`:过滤规则(包括关键字和贴文)已更改。
|
|||
|
enum:
|
|||
|
- update
|
|||
|
- notification
|
|||
|
- delete
|
|||
|
- filters_changed
|
|||
|
type: string
|
|||
|
payload:
|
|||
|
description: |-
|
|||
|
流式传输消息的有效负载。
|
|||
|
根据 `event` 类型不同而不同。
|
|||
|
|
|||
|
如果存在,应解析为字符串。
|
|||
|
|
|||
|
如果 `event` = `update`,则负载将是一个贴文的 JSON 字符串。
|
|||
|
如果 `event` = `notification`,则负载将是一个通知的 JSON 字符串。
|
|||
|
如果 `event` = `delete`,则负载将是一个贴文 ID。
|
|||
|
如果 `event` = `filters_changed`,则没有负载。
|
|||
|
example: '{"id":"01FC3TZ5CFG6H65GCKCJRKA669","created_at":"2021-08-02T16:25:52Z","sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"https://gts.superseriousbusiness.org/users/dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669","url":"https://gts.superseriousbusiness.org/@dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":fals…//gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/original/019036W043D8FXPJKSKCX7G965.png","header_static":"https://gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/small/019036W043D8FXPJKSKCX7G965.png","followers_count":33,"following_count":28,"statuses_count":126,"last_status_at":"2021-08-02T16:25:52Z","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null,"text":"a"}'
|
|||
|
type: string
|
|||
|
stream:
|
|||
|
items:
|
|||
|
enum:
|
|||
|
- user
|
|||
|
- public
|
|||
|
- public:local
|
|||
|
- hashtag
|
|||
|
- hashtag:local
|
|||
|
- list
|
|||
|
- direct
|
|||
|
type: string
|
|||
|
type: array
|
|||
|
type: object
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
schemes:
|
|||
|
- wss
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:streaming
|
|||
|
summary: 流式传输
|
|||
|
tags:
|
|||
|
- streaming
|
|||
|
/api/v1/tags/{tag_name}:
|
|||
|
get:
|
|||
|
description: 获取话题标签详情,包括您当前是否关注它。如果话题不存在,此方法不会在数据库中创建它。
|
|||
|
operationId: getTag
|
|||
|
parameters:
|
|||
|
- description: 话题标签的名称(不包含 `#`)。
|
|||
|
in: path
|
|||
|
name: tag_name
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 话题标签详情。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/tag'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:follows
|
|||
|
summary: 获取话题标签
|
|||
|
tags:
|
|||
|
- tags
|
|||
|
/api/v1/tags/{tag_name}/follow:
|
|||
|
post:
|
|||
|
description: '此端点是幂等的:如果您已经关注了话题标签,此调用仍将成功。'
|
|||
|
operationId: followTag
|
|||
|
parameters:
|
|||
|
- description: 话题标签的名称(不包含 `#`)。
|
|||
|
in: path
|
|||
|
name: tag_name
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 话题标签详情。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/tag'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:follows
|
|||
|
summary: 关注话题标签
|
|||
|
tags:
|
|||
|
- tags
|
|||
|
/api/v1/tags/{tag_name}/unfollow:
|
|||
|
post:
|
|||
|
description: '此端点是幂等的:如果您没有关注话题标签,此调用仍将成功。'
|
|||
|
operationId: unfollowTag
|
|||
|
parameters:
|
|||
|
- description: 话题标签的名称(不包含 `#`)。
|
|||
|
in: path
|
|||
|
name: tag_name
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 话题标签详情。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/tag'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: unauthorized 未授权
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:follows
|
|||
|
summary: 取消关注话题标签
|
|||
|
tags:
|
|||
|
- tags
|
|||
|
/api/v1/timelines/home:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看你关注的账户发布的贴文。
|
|||
|
贴文将按时间顺序(最新的在前)返回,带有连续的 ID(较大 = 较新)。
|
|||
|
|
|||
|
返回的 Link 标头可用于在时间线向上或向下滚动时生成上一个和下一个查询。
|
|||
|
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/timelines/home?limit=20&max_id=01FC3GSQ8A3MMJ43BPZSGEG29M>; rel="next", <https://example.org/api/v1/timelines/home?limit=20&min_id=01FC3KJW2GYXSDDRA6RWNDM46M>; rel="prev"
|
|||
|
````
|
|||
|
operationId: homeTimeline
|
|||
|
parameters:
|
|||
|
- description: 只返回早于给定的最大贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 只返回新于给定的最小贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 只返回比给定的最小贴文 ID **相邻且更新** 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的贴文数量。
|
|||
|
in: query
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- default: false
|
|||
|
description: 仅显示本站账户发布的贴文。
|
|||
|
in: query
|
|||
|
name: local
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 贴文数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 查看主页时间线
|
|||
|
tags:
|
|||
|
- timelines
|
|||
|
/api/v1/timelines/list/{id}:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看给定列表的时间线贴文。
|
|||
|
|
|||
|
贴文将按时间顺序(最新的在前)返回,带有连续的 ID(较大 = 较新)。
|
|||
|
|
|||
|
返回的 Link 标头可用于在时间线向上或向下滚动时生成上一个和下一个查询。
|
|||
|
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/timelines/list/01H0W619198FX7J54NF7EH1NG2?limit=20&max_id=01FC3GSQ8A3MMJ43BPZSGEG29M>; rel="next", <https://example.org/api/v1/timelines/list/01H0W619198FX7J54NF7EH1NG2?limit=20&min_id=01FC3KJW2GYXSDDRA6RWNDM46M>; rel="prev"
|
|||
|
````
|
|||
|
operationId: listTimeline
|
|||
|
parameters:
|
|||
|
- description: 列表的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 只返回早于给定的最大贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 只返回新于给定的最小贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 只返回比给定的最小贴文 ID **相邻且更新** 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的贴文数量。
|
|||
|
in: query
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 贴文数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:lists
|
|||
|
summary: 查看列表时间线
|
|||
|
tags:
|
|||
|
- timelines
|
|||
|
/api/v1/timelines/public:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看你所在的实例已知的公开贴文。
|
|||
|
|
|||
|
贴文将按时间顺序(最新的在前)返回,带有连续的 ID(较大 = 较新)。
|
|||
|
|
|||
|
返回的 Link 标头可用于在时间线向上或向下滚动时生成上一个和下一个查询。
|
|||
|
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/timelines/public?limit=20&max_id=01FC3GSQ8A3MMJ43BPZSGEG29M>; rel="next", <https://example.org/api/v1/timelines/public?limit=20&min_id=01FC3KJW2GYXSDDRA6RWNDM46M>; rel="prev"
|
|||
|
````
|
|||
|
operationId: publicTimeline
|
|||
|
parameters:
|
|||
|
- description: 只返回早于给定的最大贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 只返回新于给定的最小贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 只返回比给定的最小贴文 ID **相邻且更新** 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的贴文数量。
|
|||
|
in: query
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
- default: false
|
|||
|
description: 仅显示本站账户发布的贴文。
|
|||
|
in: query
|
|||
|
name: local
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 贴文数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 查看跨站时间线
|
|||
|
tags:
|
|||
|
- timelines
|
|||
|
/api/v1/timelines/tag/{tag_name}:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
查看给定话题标签的公开贴文 (不区分大小写)
|
|||
|
|
|||
|
贴文将按时间顺序(最新的在前)返回,带有连续的 ID(较大 = 较新)。
|
|||
|
|
|||
|
返回的 Link 标头可用于在时间线向上或向下滚动时生成上一个和下一个查询。
|
|||
|
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v1/timelines/tag/example?limit=20&max_id=01FC3GSQ8A3MMJ43BPZSGEG29M>; rel="next", <https://example.org/api/v1/timelines/tag/example?limit=20&min_id=01FC3KJW2GYXSDDRA6RWNDM46M>; rel="prev"
|
|||
|
````
|
|||
|
operationId: tagTimeline
|
|||
|
parameters:
|
|||
|
- description: Name of the tag
|
|||
|
in: path
|
|||
|
name: tag_name
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 只返回早于给定的最大贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: 只返回新于给定的最小贴文 ID 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: since_id
|
|||
|
type: string
|
|||
|
- description: 只返回比给定的最小贴文 ID **相邻且更新** 的贴文。具有指定 ID 的贴文不会包含在响应中。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 20
|
|||
|
description: 要返回的贴文数量。
|
|||
|
in: query
|
|||
|
maximum: 40
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 贴文数组。
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/status'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:statuses
|
|||
|
summary: 查看话题标签时间线
|
|||
|
tags:
|
|||
|
- timelines
|
|||
|
/api/v1/user:
|
|||
|
get:
|
|||
|
operationId: getUser
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的用户。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/user'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal error
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:user
|
|||
|
summary: 获取当前用户
|
|||
|
description: 获取自己的用户模型。
|
|||
|
tags:
|
|||
|
- user
|
|||
|
/api/v1/user/email_change:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: userEmailChange
|
|||
|
parameters:
|
|||
|
- description: 用户当前密码,用于验证。
|
|||
|
in: formData
|
|||
|
name: password
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: Password
|
|||
|
- description: 新邮箱地址。
|
|||
|
in: formData
|
|||
|
name: new_email
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: NewEmail
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"202":
|
|||
|
description: '已接受:正在处理邮箱更改;请检查您的收件箱以确认新地址。'
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/user'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: '冲突: 提供的邮箱地址已被使用'
|
|||
|
"500":
|
|||
|
description: internal error
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:user
|
|||
|
summary: 更改邮箱地址
|
|||
|
description: 请求更改当前用户的邮箱地址。
|
|||
|
tags:
|
|||
|
- user
|
|||
|
/api/v1/user/password_change:
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
修改当前用户的密码。
|
|||
|
若 Content-Type 为 'application/json',则参数也可以在请求体中以 JSON 形式给出。
|
|||
|
若 Content-Type 为 'application/xml',则参数也可以在请求体中以 XML 形式给出。
|
|||
|
operationId: userPasswordChange
|
|||
|
parameters:
|
|||
|
- description: 用户的旧密码。
|
|||
|
in: formData
|
|||
|
name: old_password
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: OldPassword
|
|||
|
- description: |-
|
|||
|
用户提供的新密码。
|
|||
|
如果密码的熵不够高,将被拒绝。
|
|||
|
参见 https://github.com/wagslane/go-password-validator
|
|||
|
in: formData
|
|||
|
name: new_password
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
x-go-name: NewPassword
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 密码更改成功
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"422":
|
|||
|
description: 无法处理请求,因为实例正在使用 OIDC 后端
|
|||
|
"500":
|
|||
|
description: internal error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:user
|
|||
|
summary: 更改密码
|
|||
|
tags:
|
|||
|
- user
|
|||
|
/api/v2/admin/accounts:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
按给定过滤规则查看并按页浏览已知账户。
|
|||
|
|
|||
|
返回的账户将按域名 + 用户名的字母顺序(a-z)排序。
|
|||
|
|
|||
|
下一个和上一个查询可以从返回的Link标头中解析。
|
|||
|
示例:
|
|||
|
|
|||
|
```
|
|||
|
<https://example.org/api/v2/admin/accounts?limit=80&max_id=example.org%2F%40someone>; rel="next", <https://example.org/api/v2/admin/accounts?limit=80&min_id=example.org%2F%40someone_else>; rel="prev"
|
|||
|
````
|
|||
|
operationId: adminAccountsGetV2
|
|||
|
parameters:
|
|||
|
- description: 针对 `local` 或 `remote` 类型的账户进行过滤。
|
|||
|
in: query
|
|||
|
name: origin
|
|||
|
type: string
|
|||
|
- description: 针对 `active`, `pending`, `disabled`, `silenced`, 或 `suspended` 类型的账户进行过滤。
|
|||
|
in: query
|
|||
|
name: status
|
|||
|
type: string
|
|||
|
- description: 针对具有站务权限(可以管理举报)的账户进行过滤。
|
|||
|
in: query
|
|||
|
name: permissions
|
|||
|
type: string
|
|||
|
- description: 针对具有对应身份组的账户进行过滤。
|
|||
|
in: query
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: role_ids[]
|
|||
|
type: array
|
|||
|
- description: 查找被对应 ID 的账户邀请的用户。
|
|||
|
in: query
|
|||
|
name: invited_by
|
|||
|
type: string
|
|||
|
- description: 搜索给定用户名。
|
|||
|
in: query
|
|||
|
name: username
|
|||
|
type: string
|
|||
|
- description: 搜索给定昵称。
|
|||
|
in: query
|
|||
|
name: display_name
|
|||
|
type: string
|
|||
|
- description: 针对给定实例域名进行过滤。
|
|||
|
in: query
|
|||
|
name: by_domain
|
|||
|
type: string
|
|||
|
- description: 查找具有给定电子邮箱的用户。
|
|||
|
in: query
|
|||
|
name: email
|
|||
|
type: string
|
|||
|
- description: 查找具有此 IP 地址的用户。
|
|||
|
in: query
|
|||
|
name: ip
|
|||
|
type: string
|
|||
|
- description: "`[domain]/@[username]` 形式的 max_id。返回的所有结果都将在 `[domain]/@[username]` 之后的字母顺序中。例如,如果 max_id = `example.org/@someone`,则返回的条目可能包含 `example.org/@someone_else`,`later.example.org/@someone` 等。本站账户 ID 使用空字符串作为 `[domain]` 部分,例如具有用户名 `someone` 的本站账户将是 `/@someone`。"
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
- description: "`[domain]/@[username]` 形式的 min_id。返回的所有结果都将在 `[domain]/@[username]` 之前的字母顺序中。例如,如果 min_id = `example.org/@someone`,则返回的条目可能包含 `example.org/@earlier_account`,`earlier.example.org/@someone` 等。本站账户 ID 使用空字符串作为 `[domain]` 部分,例如具有用户名 `someone` 的本站账户将是 `/@someone`。"
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- default: 50
|
|||
|
description: 返回的最大结果数量。
|
|||
|
in: query
|
|||
|
maximum: 200
|
|||
|
minimum: 1
|
|||
|
name: limit
|
|||
|
type: integer
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
headers:
|
|||
|
Link:
|
|||
|
description: 下一/上一查询的链接。
|
|||
|
type: string
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/adminAccountInfo'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- admin
|
|||
|
summary: 查看账户列表
|
|||
|
tags:
|
|||
|
- admin
|
|||
|
/api/v2/filters:
|
|||
|
get:
|
|||
|
operationId: filtersV2Get
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterV2'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取V2过滤规则
|
|||
|
description: 获取当前账户的所有V2过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: filterV2Post
|
|||
|
parameters:
|
|||
|
- description: |-
|
|||
|
过滤规则的名称。
|
|||
|
|
|||
|
示例: 挂人
|
|||
|
in: formData
|
|||
|
maxLength: 200
|
|||
|
minLength: 1
|
|||
|
name: title
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- collectionFormat: multi
|
|||
|
description: |-
|
|||
|
此过滤规则要应用的上下文。
|
|||
|
|
|||
|
示例: home, public
|
|||
|
enum:
|
|||
|
- home
|
|||
|
- notifications
|
|||
|
- public
|
|||
|
- thread
|
|||
|
- account
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
minItems: 1
|
|||
|
name: context[]
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
uniqueItems: true
|
|||
|
- description: |-
|
|||
|
此过滤规则的持续时间(以秒为单位)。若省略,则过滤规则永不过期。
|
|||
|
|
|||
|
示例:86400
|
|||
|
in: formData
|
|||
|
name: expires_in
|
|||
|
type: number
|
|||
|
- default: warn
|
|||
|
description: |-
|
|||
|
贴文命中过滤规则时的操作。
|
|||
|
|
|||
|
示例: warn
|
|||
|
enum:
|
|||
|
- warn
|
|||
|
- hide
|
|||
|
in: formData
|
|||
|
name: filter_action
|
|||
|
type: string
|
|||
|
- collectionFormat: multi
|
|||
|
description: 要添加 (如果不使用 id 参数) 或更新 (如果使用 id 参数) 的关键词。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: keywords_attributes[][keyword]
|
|||
|
type: array
|
|||
|
- collectionFormat: multi
|
|||
|
description: 匹配关键词时是否考虑单词边界 (整词匹配)?
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: boolean
|
|||
|
name: keywords_attributes[][whole_word]
|
|||
|
type: array
|
|||
|
- collectionFormat: multi
|
|||
|
description: 要添加到过滤规则的贴文(status)。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: statuses_attributes[][status_id]
|
|||
|
type: array
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterV2'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户执行此操作
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: conflict 冲突(重复的标题、关键词或贴文)
|
|||
|
"422":
|
|||
|
description: 无法处理的内容
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 创建V2过滤规则
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v2/filters/{id}:
|
|||
|
delete:
|
|||
|
operationId: filterV2Delete
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 过滤规则已删除
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 删除V2过滤规则
|
|||
|
description: 删除给定 ID 的单个V2过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
get:
|
|||
|
operationId: filterV2Get
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterV2'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取单个V2过滤规则
|
|||
|
description: 获取给定 ID 的单个V2过滤规则。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
put:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
description: |-
|
|||
|
更新具有给定 ID 的单个V2过滤规则。
|
|||
|
注意,这实际上更接近于 PATCH 操作:只有提供的字段将被更新,而省略的字段将保持为以前的值。
|
|||
|
operationId: filterV2Put
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID.
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
过滤规则的标题。
|
|||
|
|
|||
|
示例: 挂人
|
|||
|
in: formData
|
|||
|
maxLength: 200
|
|||
|
minLength: 1
|
|||
|
name: title
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- collectionFormat: multi
|
|||
|
description: 要添加到此过滤规则的关键词。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: keywords_attributes[][keyword]
|
|||
|
type: array
|
|||
|
- collectionFormat: multi
|
|||
|
description: 匹配关键词时是否考虑单词边界 (整词匹配)?
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: boolean
|
|||
|
name: keywords_attributes[][whole_word]
|
|||
|
type: array
|
|||
|
- collectionFormat: multi
|
|||
|
description: 要添加到过滤规则的贴文。
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
name: statuses_attributes[][status_id]
|
|||
|
type: array
|
|||
|
- collectionFormat: multi
|
|||
|
description: |-
|
|||
|
此过滤规则要应用的上下文。
|
|||
|
|
|||
|
示例: home, public
|
|||
|
enum:
|
|||
|
- home
|
|||
|
- notifications
|
|||
|
- public
|
|||
|
- thread
|
|||
|
- account
|
|||
|
in: formData
|
|||
|
items:
|
|||
|
type: string
|
|||
|
minItems: 1
|
|||
|
name: context[]
|
|||
|
required: true
|
|||
|
type: array
|
|||
|
uniqueItems: true
|
|||
|
- description: |-
|
|||
|
此过滤规则的持续时间(以秒为单位)。若省略,则过滤规则永不过期。
|
|||
|
|
|||
|
示例: 86400
|
|||
|
in: formData
|
|||
|
name: expires_in
|
|||
|
type: number
|
|||
|
- description: |-
|
|||
|
贴文命中过滤规则时的操作。
|
|||
|
|
|||
|
示例: warn
|
|||
|
enum:
|
|||
|
- warn
|
|||
|
- hide
|
|||
|
in: formData
|
|||
|
name: filter_action
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的过滤规则。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterV2'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户执行此操作
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: conflict 冲突(重复的标题、关键词或贴文)
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理的内容
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 更新V2过滤规则
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v2/filters/{id}/keywords:
|
|||
|
get:
|
|||
|
operationId: filterKeywordsGet
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则关键词
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterKeyword'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取过滤规则关键词
|
|||
|
description: 获取给定 ID 的过滤规则的所有关键词。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: filterKeywordPost
|
|||
|
parameters:
|
|||
|
- description: 要将贴文添加到的过滤规则的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要被过滤的文本
|
|||
|
|
|||
|
示例:挂人
|
|||
|
in: formData
|
|||
|
maxLength: 40
|
|||
|
minLength: 1
|
|||
|
name: keyword
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: |-
|
|||
|
此过滤规则是否应考虑单词边界(整词匹配)?
|
|||
|
|
|||
|
示例:true
|
|||
|
in: formData
|
|||
|
name: whole_word
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新的过滤规则关键词。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterKeyword'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户执行此操作
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: conflict 冲突(重复的关键词)
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理的内容
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 添加关键词
|
|||
|
description: 向给定 ID 的过滤规则添加关键词。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v2/filters/{id}/statuses:
|
|||
|
get:
|
|||
|
operationId: filterStatusesGet
|
|||
|
parameters:
|
|||
|
- description: 过滤规则的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则贴文。
|
|||
|
schema:
|
|||
|
items:
|
|||
|
$ref: '#/definitions/filterStatus'
|
|||
|
type: array
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取过滤规则贴文
|
|||
|
description: 获取给定过滤规则下的所有贴文。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
post:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: filterStatusPost
|
|||
|
parameters:
|
|||
|
- description: 要将贴文添加到的过滤规则的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要过滤的贴文的 ID。
|
|||
|
|
|||
|
示例:01HXA2NE0K8T1C70K90E74GYD0
|
|||
|
in: formData
|
|||
|
name: status_id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 新的过滤规则贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterStatus'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户执行此操作
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: conflict 冲突(重复的贴文)
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理的内容
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 添加贴文
|
|||
|
description: 向已有过滤规则添加一条贴文。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v2/filters/keywords/{id}:
|
|||
|
delete:
|
|||
|
operationId: filterKeywordDelete
|
|||
|
parameters:
|
|||
|
- description: 过滤规则关键词的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 过滤规则关键词已删除
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 删除过滤规则关键词
|
|||
|
description: 通过指定 ID 删除某个过滤规则关键词。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
get:
|
|||
|
operationId: filterKeywordGet
|
|||
|
parameters:
|
|||
|
- description: 过滤规则关键词的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则关键词。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterKeyword'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取过滤规则关键词
|
|||
|
description: 获取具有给定 ID 的单个过滤规则关键词。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v2/filters/keywords{id}:
|
|||
|
put:
|
|||
|
consumes:
|
|||
|
- application/json
|
|||
|
- application/xml
|
|||
|
- application/x-www-form-urlencoded
|
|||
|
operationId: filterKeywordPut
|
|||
|
parameters:
|
|||
|
- description: 要更新的过滤规则关键词的 ID。
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
要过滤的文本
|
|||
|
|
|||
|
示例:挂人
|
|||
|
in: formData
|
|||
|
maxLength: 40
|
|||
|
minLength: 1
|
|||
|
name: keyword
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: |-
|
|||
|
过滤时是否考虑单词边界(整词匹配)?
|
|||
|
|
|||
|
示例:true
|
|||
|
in: formData
|
|||
|
name: whole_word
|
|||
|
type: boolean
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 更新后的过滤关键词。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterKeyword'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: 禁止对已迁移的账户执行此操作
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"409":
|
|||
|
description: conflict 冲突(重复的关键词)
|
|||
|
"422":
|
|||
|
description: unprocessable 无法处理 content
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 更新过滤规则关键词
|
|||
|
description: 更新具有给定 ID 的单个过滤规则关键词。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v2/filters/statuses/{id}:
|
|||
|
delete:
|
|||
|
operationId: filterStatusDelete
|
|||
|
parameters:
|
|||
|
- description: 过滤规则贴文的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 过滤规则贴文已删除
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- write:filters
|
|||
|
summary: 删除过滤规则贴文
|
|||
|
description: 删除具有给定 ID 的单个过滤规则贴文。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
get:
|
|||
|
operationId: filterStatusGet
|
|||
|
parameters:
|
|||
|
- description: 过滤规则贴文的 ID
|
|||
|
in: path
|
|||
|
name: id
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 请求的过滤规则贴文。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/filterStatus'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal server error 服务器内部错误
|
|||
|
security:
|
|||
|
- OAuth2 Bearer:
|
|||
|
- read:filters
|
|||
|
summary: 获取过滤规则贴文
|
|||
|
description: 获取具有给定 ID 的单个过滤规则贴文。
|
|||
|
tags:
|
|||
|
- filters
|
|||
|
/api/v2/instance:
|
|||
|
get:
|
|||
|
operationId: instanceGetV2
|
|||
|
produces:
|
|||
|
- application/json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: 实例信息。
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/instanceV2'
|
|||
|
"406":
|
|||
|
description: not acceptable 不可接受
|
|||
|
"500":
|
|||
|
description: internal error
|
|||
|
summary: 查看实例信息
|
|||
|
tags:
|
|||
|
- instance
|
|||
|
/livez:
|
|||
|
get:
|
|||
|
operationId: liveGet
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: OK
|
|||
|
summary: 服务在线检测
|
|||
|
description: 若 GoToSocial 服务“在线” (即能够响应HTTP请求),则返回无响应体的 200 状态码。
|
|||
|
tags:
|
|||
|
- health
|
|||
|
head:
|
|||
|
operationId: liveHead
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: OK
|
|||
|
summary: 服务在线检测
|
|||
|
description: 若 GoToSocial 服务“在线” (即能够响应HTTP请求),则返回 200 状态码。
|
|||
|
tags:
|
|||
|
- health
|
|||
|
/nodeinfo/2.0:
|
|||
|
get:
|
|||
|
description: '对 nodeinfo 查询返回符合规范的 nodeinfo 响应。参见: https://nodeinfo.diaspora.software/schema.html'
|
|||
|
operationId: nodeInfoGet
|
|||
|
produces:
|
|||
|
- application/json; profile="http://nodeinfo.diaspora.software/ns/schema/2.0#"
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/nodeinfo'
|
|||
|
summary: NodeInfo 2.0
|
|||
|
tags:
|
|||
|
- nodeinfo
|
|||
|
/readyz:
|
|||
|
get:
|
|||
|
description: 若 GoToSocial 服务“就绪” (即能够连接到数据库后端并执行简单的 SELECT),则返回无响应体的 200 状态码。若 GtS 尚未准备就绪,则在日志中记录错误(但不返回给调用方,以避免泄露内部信息)。
|
|||
|
operationId: readyGet
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: OK
|
|||
|
"500":
|
|||
|
description: 尚未就绪。查看日志以获取错误信息。
|
|||
|
summary: 服务就绪检测
|
|||
|
tags:
|
|||
|
- health
|
|||
|
head:
|
|||
|
description: 若 GoToSocial 服务“就绪” (即能够连接到数据库后端并执行简单的 SELECT),则返回无响应体的 200 状态码。若 GtS 尚未准备就绪,则在日志中记录错误(但不返回给调用方,以避免泄露内部信息)。
|
|||
|
operationId: readyHead
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: OK
|
|||
|
summary: 服务就绪检测
|
|||
|
tags:
|
|||
|
- health
|
|||
|
/users/{username}/collections/featured:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取某个用户的精选集合(置顶贴文)。
|
|||
|
响应将包含 `items` 属性中的 Note URI 的有序集合。
|
|||
|
|
|||
|
由调用方决定是否解析提供的 Note URIs(如果它们已经缓存,则不解析)。
|
|||
|
|
|||
|
请求需要 HTTP 签名。
|
|||
|
operationId: s2sFeaturedCollectionGet
|
|||
|
parameters:
|
|||
|
- description: 用户的账户名
|
|||
|
in: path
|
|||
|
name: username
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/activity+json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/swaggerFeaturedCollection'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
summary: 获取用户精选集合
|
|||
|
tags:
|
|||
|
- s2s/federation
|
|||
|
/users/{username}/outbox:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取用户的公开发件箱集合。
|
|||
|
|
|||
|
注意,如果 `page` 为 `false`,则响应将是一个带有 `first` 页的 Collection,如下所示。
|
|||
|
|
|||
|
如果 `page` 为 `true`,则响应将是一个不带 `Collection` 包装的单个 `CollectionPage`。
|
|||
|
|
|||
|
请求需要 HTTP 签名。
|
|||
|
operationId: s2sOutboxGet
|
|||
|
parameters:
|
|||
|
- description: 账户的用户名。
|
|||
|
in: path
|
|||
|
name: username
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: 按 CollectionPage 返回响应。
|
|||
|
in: query
|
|||
|
name: page
|
|||
|
type: boolean
|
|||
|
- description: 下一贴文的最小 ID,用于分页。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
- description: 下一贴文的最大 ID,用于分页。
|
|||
|
in: query
|
|||
|
name: max_id
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/activity+json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/swaggerCollection'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
summary: 获取用户发件箱
|
|||
|
tags:
|
|||
|
- s2s/federation
|
|||
|
/users/{username}/statuses/{status}/replies:
|
|||
|
get:
|
|||
|
description: |-
|
|||
|
获取贴文的回复集合。
|
|||
|
|
|||
|
注意,如果 `page` 为 `false`,则响应将是一个带有 `first` 页的 Collection,如下所示。
|
|||
|
|
|||
|
如果 `page` 为 `true`,则响应将是一个不带 `Collection` 包装的单个 `CollectionPage`。
|
|||
|
|
|||
|
请求需要 HTTP 签名。
|
|||
|
operationId: s2sRepliesGet
|
|||
|
parameters:
|
|||
|
- description: 账户的用户名。
|
|||
|
in: path
|
|||
|
name: username
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- description: 贴文的 ID。
|
|||
|
in: path
|
|||
|
name: status
|
|||
|
required: true
|
|||
|
type: string
|
|||
|
- default: false
|
|||
|
description: 按 CollectionPage 返回响应。
|
|||
|
in: query
|
|||
|
name: page
|
|||
|
type: boolean
|
|||
|
- default: false
|
|||
|
description: 返回仅来自贴文所有者以外的账户的回复。
|
|||
|
in: query
|
|||
|
name: only_other_accounts
|
|||
|
type: boolean
|
|||
|
- description: 下一贴文的最小 ID,用于分页。
|
|||
|
in: query
|
|||
|
name: min_id
|
|||
|
type: string
|
|||
|
produces:
|
|||
|
- application/activity+json
|
|||
|
responses:
|
|||
|
"200":
|
|||
|
description: ""
|
|||
|
schema:
|
|||
|
$ref: '#/definitions/swaggerCollection'
|
|||
|
"400":
|
|||
|
description: bad request 无效请求
|
|||
|
"401":
|
|||
|
description: unauthorized 未授权
|
|||
|
"403":
|
|||
|
description: forbidden 禁止
|
|||
|
"404":
|
|||
|
description: not found 未找到
|
|||
|
summary: 获取贴文回复
|
|||
|
tags:
|
|||
|
- s2s/federation
|
|||
|
schemes:
|
|||
|
- https
|
|||
|
- http
|
|||
|
securityDefinitions:
|
|||
|
OAuth2 Application:
|
|||
|
flow: application
|
|||
|
scopes:
|
|||
|
write:accounts: grants write access to accounts 授予对账户的写入权限
|
|||
|
tokenUrl: https://example.org/oauth/token
|
|||
|
type: oauth2
|
|||
|
OAuth2 Bearer:
|
|||
|
authorizationUrl: https://example.org/oauth/authorize
|
|||
|
flow: accessCode
|
|||
|
scopes:
|
|||
|
admin: 授予对所有内容的管理权限
|
|||
|
admin:accounts: 授予对账户的管理权限
|
|||
|
read: 授予对所有内容的读取权限
|
|||
|
read:accounts: 授予对账户的读取权限
|
|||
|
read:blocks: 授予对屏蔽的读取权限
|
|||
|
read:custom_emojis: 授予对自定义表情的读取权限
|
|||
|
read:favourites: 授予对点赞的读取权限
|
|||
|
read:filters: 授予对过滤规则的读取权限
|
|||
|
read:follows: 授予对关注的读取权限
|
|||
|
read:lists: 授予对列表的读取权限
|
|||
|
read:media: 授予对媒体的读取权限
|
|||
|
read:mutes: 授予对静音的读取权限
|
|||
|
read:notifications: 授予对通知的读取权限
|
|||
|
read:search: 授予对搜索的读取权限
|
|||
|
read:statuses: 授予对贴文的读取权限
|
|||
|
read:streaming: 授予对流式 API 的读取权限
|
|||
|
read:user: 授予对用户级信息的读取权限
|
|||
|
write: 授予对所有内容的写入权限
|
|||
|
write:accounts: 授予对账户的写入权限
|
|||
|
write:blocks: 授予对屏蔽的写入权限
|
|||
|
write:filters: 授予对过滤规则的写入权限
|
|||
|
write:follows: 授予对关注的写入权限
|
|||
|
write:lists: 授予对列表的写入权限
|
|||
|
write:media: 授予对媒体的写入权限
|
|||
|
write:mutes: 授予对静音的写入权限
|
|||
|
write:statuses: 授予对贴文的写入权限
|
|||
|
write:user: 授予对用户级信息的写入权限
|
|||
|
tokenUrl: https://example.org/oauth/token
|
|||
|
type: oauth2
|
|||
|
swagger: "2.0"
|