目录

创建文件评论

请求

HTTP请求

POST
https://drive.cloud.hicloud.com/drive/v1/files/{fileId}/comments

参数

*仅对必填项做特别说明。

parametertype
description
fileIdstringpath必填,文件ID。
fieldsstringquery必填,采用[Partial-response格式]。
formstringquery媒体格式。
prettyPrintbooleanquery是否以美观格式输出。
quotaIdstringquery用户标识,小于40个字符。用于限制单个用户的API访问数量。
callbackstringqueryJSONP的callback函数。
x-hw-trace-idstringheader业务跟踪id。
x-hw-app-idstringheader应用的appid。
versionstringheadersdk版本。
x-hw-terminalstringheader终端型号。
x-hw-osstringheader终端操作系统类型。
unionIDstringheader开放的用户id。
User-Agentstringheader应用版本号/appid。

请求体

在请求正文中,提供具有以下结构的数据:

idstring一个唯一ID,标识这个订阅通道。
descriptionstring必填,评论的内容。
quotedContent.mimiTypestring内容类型。
quotedContent.contentstring引用的内容。
positionstring位置,JSON格式,JSON按Anchor类型的定义校验。

响应

如果成功,此方法将返回具有以下结构的响应正文:

  1. {
  2.            "category": "drive#comment",
  3.            "id": "string",
  4.            "createdTime": "2020-02-19T14:44:40.660Z",
  5.            "editedTime": "2020-02-19T14:44:40.661Z",
  6.            "creator": {
  7.                "category": "drive#user",
  8.                "displayName": "string",
  9.                "profilePhotoLink": "string",
  10.                "me": true,
  11.                "permissionId": "string",
  12.                "userAccount": "string"
  13.            },
  14.            "description": "string",
  15.            "htmlDescription": "string",
  16.            "deleted": true,
  17.            "resolved": true,
  18.            "quotedContent": {
  19.                "mimeType": "string",
  20.                "content": "string"
  21.            },
  22.            "position": "string",
  23.            "replies": [
  24.            {
  25.                "category": "drive#reply",
  26.                "id": "string",
  27.                "createdTime": "2020-02-19T14:44:40.661Z",
  28.                "editedTime": "2020-02-19T14:44:40.661Z",
  29.                "creator": {
  30.                    "category": "drive#user",
  31.                    "displayName": "string",
  32.                    "profilePhotoLink": "string",
  33.                    "me": true,
  34.                    "permissionId": "string",
  35.                    "userAccount": "string"
  36.                },
  37.                "htmlDescription": "string",
  38.                "description": "string",
  39.                "deleted": true,
  40.                "operate": "string"
  41.            }
  42.            ]
  43. }
categorystring资源类型,固定为api#channel。
categorystring类型,固定为drive#comment。
idstring评论id。
createdTimestring评论创建时间。
editedTimestring评论修改时间。
creator.category
string类型,固定为drive#user。
creator.dispalyNamestring用户显示名。
creator.profilepPhotoLinkstring用户头像链接(默认不返回)。
creator.meboolean是否是我。
creator.permissionIdstring权限id。
creator.userAccountstring账号名称(默认不返回)。
descriptionstring评论描述。
htmlDescriptionstringHTML评论描述。
deletedboolean是否已删除。
resolvedboolean是否已解决。
quotedContent.mimeTypestring内容类型。
quotedContent.contentstring引用的内容。
positionstring位置。
replies[]list回复列表。
replies.categorystring类型,固定为drive#reply。
replies.id
string回复id。
replies.createdTimestring回复创建时间。
replies.editedTimestring回复修改时间。
replies.creator.categorystring类型,固定为drive#user。
replies.creator.displayNamestring用户显示名。
replies.creator.profilePhotoLinkstring用户头像链接(默认不返回)。
replies.creator.meboolean是否是我。
replies.creator.permissionIdstring权限id。
replies.creator.userAccountstring账号名称(默认不返回)。
replies.htmlDescriptionstringhtml内容。
replies.description
string内容。
replies.deletedboolean是否已删除。
replies.operatestring操作。