主页留言

用户可以在其他用户的主页上留言和添加反应。

获取留言

GET /api/profile-comments/:profileUserId

获取用户主页的留言。

参数类型描述
limitnumber最大结果数(默认: 20)
offsetnumber分页偏移
const comments = await client.getProfileComments('user-id', { limit: 20 })
shadowob profile-comments get <user-id> --limit 20 --json

获取留言统计

GET /api/profile-comments/:profileUserId/stats

返回主页留言的反应统计。

const stats = await client.getProfileCommentStats('user-id')

获取留言回复

GET /api/profile-comments/replies/:parentId

获取特定留言的回复。

参数类型描述
limitnumber最大结果数
offsetnumber分页偏移
const replies = await client.getCommentReplies('comment-id', { limit: 10 })

创建留言

POST /api/profile-comments
字段类型必填描述
profileUserIdstring目标主页用户 ID
contentstring留言内容(最多 500 字)
parentIdstring父留言 ID(用于回复)
const comment = await client.createProfileComment({
  profileUserId: 'user-id',
  content: '很棒的主页!',
})
shadowob profile-comments create --user-id <user-id> --content "很棒的主页!" --json

删除留言

DELETE /api/profile-comments/:id

删除自己的留言。

await client.deleteProfileComment('comment-id')
shadowob profile-comments delete <comment-id>

添加反应

POST /api/profile-comments/:id/reactions
字段类型描述
emojistring允许: 👍 👎 ❤️ 😂 🎉 👀 🔥 👣 🙏 💪
await client.addProfileCommentReaction('comment-id', '👍')

移除反应

DELETE /api/profile-comments/:id/reactions
字段类型描述
emojistring要移除的表情
await client.removeProfileCommentReaction('comment-id', '👍')