QQ::weixin::work::wedoc::document
文档
编辑文档
编辑文档内容 最后更新:2022/12/10
https://developer.work.weixin.qq.com/document/path/97626
该接口可以对一个在线文档批量执行多个更新操作。
注意:
批量更新请求,若其中有一个操作报错则全部更新操作不生效。 单次批量更新操作数量 <= 30。
{ "docid": "DOCID", "verison": 10, "requests": [ { "insert_text": { "text": "text content", "location": { "index": 10 } } }, { "insert_table": { "rows": 2, "cols": 2, "location": { "index": 10 } } } ] }
参数 类型 是否必须 说明 access_token 是 调用接口凭证 docid string 是 文档的docid version uint32 否 操作的文档版本, 该参数可以通过获取文档内容接口获得。操作后文档版本将更新一版。要更新的文档版本与最新文档版本相差不能超过100个。 requests object[] 是 更新操作列表,详见 UpdateRequest
自建应用需配置到“可调用应用”列表中的应用secret所获取的accesstoken来调用(accesstoken如何获取?) 第三方应用需具有“文档”权限 代开发自建应用需具有“文档”权限
{ "errcode": 0, "errmsg": "ok" }
参数 类型 说明 errcode int32 错误码 errmsg string 错误码说明
https://developer.work.weixin.qq.com/document/path/97626#参数详细说明
获取文档数据
获取文档数据 最后更新:2023/10/19
https://developer.work.weixin.qq.com/document/path/97659
该接口用于获取文档数据
{ "docid": "DOCID" }
参数 类型 是否必须 说明 access_token 是 调用接口凭证 docid string 是 文档的docid
{ "errcode": 0, "errmsg": "ok", "version": 10, "document": { ... } }
参数 类型 说明 errcode int32 错误码 errmsg string 错误码说明 version uint32 文档版本 document object(Node) 文档内容根节点,详见Node
https://developer.work.weixin.qq.com/document/path/97659#参数详细说明
To install QQ::weixin::work, copy and paste the appropriate command in to your terminal.
cpanm
cpanm QQ::weixin::work
CPAN shell
perl -MCPAN -e shell install QQ::weixin::work
For more information on module installation, please visit the detailed CPAN module installation guide.