跳到主要内容

ApiComment

表示批注的类。

属性​

名称类型描述
AuthorNamestring返回或设置批注作者的姓名。
Idstring返回当前批注 ID。
QuoteTextstring返回当前批注的引用文本。
RepliesCountNumber返回批注回复的数量。
Solvedboolean检查批注是否已解决或将批注标记为已解决。
Textstring返回或设置批注文本。
Timenumber | string返回或设置当前时区格式的批注创建时间戳。
TimeUTCnumber | string返回或设置 UTC 格式的批注创建时间戳。
UserIdstring返回或设置批注作者的用户 ID。

方法​

下表列出了可用的方法。

方法返回值描述
AddReply无向批注添加回复。
Deleteboolean删除 ApiComment 对象。
GetAuthorNamestring返回批注作者的姓名。
GetClassType"comment"返回 ApiComment 类的类型。
GetIdstring返回当前批注 ID。
GetQuoteTextString | null返回当前批注的引用文本。
GetRepliesCountNumber返回批注回复的数量。
GetReplyApiCommentReply返回指定的批注回复。
GetTextstring返回批注文本。
GetTimeNumber返回批注创建时间戳(当前时区格式)。
GetTimeUTCNumber返回批注创建时间戳(UTC 格式)。
GetUserIdstring返回批注作者的用户 ID。
IsSolvedboolean检查批注是否已解决。
RemoveReplies无删除指定的批注回复。
SetAuthorName无设置批注作者的姓名。
SetSolved无将批注标记为已解决。
SetText无设置批注文本。
SetTime无设置批注创建时间戳(当前时区格式)。
SetTimeUTC无设置批注创建时间戳(UTC 格式)。
SetUserId无设置批注作者的用户 ID。