Mikiacg

社交

关注、私信和频道相关接口。


关注

POST/api/trpc/follow.follow需登录social:write
参数类型必填说明
userIdstring目标用户 ID
POST/api/trpc/follow.unfollow需登录social:write
参数类型必填说明
userIdstring目标用户 ID
POST/api/trpc/follow.isFollowing需登录social:read
参数类型必填说明
userIdstring目标用户 ID

粉丝 / 关注列表

POST/api/trpc/follow.followers公开
参数类型必填说明
userIdstring用户 ID
cursorstring分页游标
limitnumber每页数量
POST/api/trpc/follow.following公开
参数类型必填说明
userIdstring用户 ID
cursorstring分页游标
limitnumber每页数量
POST/api/trpc/follow.counts公开
参数类型必填说明
userIdstring用户 ID

私信

会话列表

POST/api/trpc/message.conversations需登录social:read
参数类型必填说明
cursorstring分页游标
limitnumber每页数量

获取或创建会话

POST/api/trpc/message.getOrCreate需登录social:write
参数类型必填说明
userIdstring目标用户 ID

获取消息列表

POST/api/trpc/message.messages需登录social:read
参数类型必填说明
conversationIdstring会话 ID
cursorstring分页游标
limitnumber每页数量

发送消息

POST/api/trpc/message.send需登录social:write
参数类型必填说明
conversationIdstring会话 ID
contentstring消息内容
typestring消息类型:TEXT / IMAGE / FILE / STICKER
metadataobject附加数据

频道

频道列表

POST/api/trpc/channel.list公开
参数类型必填说明
cursorstring分页游标
limitnumber每页数量

按 slug 获取频道

POST/api/trpc/channel.getBySlug公开
参数类型必填说明
slugstring频道 slug

创建频道

POST/api/trpc/channel.create需登录social:write
参数类型必填说明
namestring频道名称
slugstring频道 slug(URL 标识)
descriptionstring描述
typestring类型:PUBLIC / PRIVATE

加入 / 离开频道

POST/api/trpc/channel.join需登录social:write
参数类型必填说明
channelIdstring频道 ID
POST/api/trpc/channel.leave需登录social:write
参数类型必填说明
channelIdstring频道 ID

发送频道消息

POST/api/trpc/channel.send需登录social:write
参数类型必填说明
channelIdstring频道 ID
contentstring消息内容
typestring消息类型
replyToIdstring回复的消息 ID

命令面板

快速导航和操作