| 限定符和类型 | 方法和说明 |
|---|---|
CreateImageResp |
create(CreateImageReq req)
上传图片,上传图片接口,支持上传 JPEG、PNG、WEBP、GIF、TIFF、BMP、ICO格式图片。
|
CreateImageResp |
create(CreateImageReq req,
RequestOptions reqOptions)
上传图片,上传图片接口,支持上传 JPEG、PNG、WEBP、GIF、TIFF、BMP、ICO格式图片。
|
GetImageResp |
get(GetImageReq req)
下载图片,下载图片资源,只能下载当前应用所上传且图片类型为message的图片。
|
GetImageResp |
get(GetImageReq req,
RequestOptions reqOptions)
下载图片,下载图片资源,只能下载当前应用所上传且图片类型为message的图片。
|
public Image(Config config)
public CreateImageResp create(CreateImageReq req, RequestOptions reqOptions) throws Exception
注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 图片大小不得超过10M,且不支持上传大小为0的图片 ;
官网API文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create ;
Exceptionpublic CreateImageResp create(CreateImageReq req) throws Exception
注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 图片大小不得超过10M,且不支持上传大小为0的图片 ;
官网API文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create ;
Exceptionpublic GetImageResp get(GetImageReq req, RequestOptions reqOptions) throws Exception
注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 只能下载机器人自己上传且图片类型为message的图片,avatar类型暂不支持下载;- 下载用户发送的资源,请使用[获取消息中的资源文件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get)接口 ;
官网API文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/get ;
Exceptionpublic GetImageResp get(GetImageReq req) throws Exception
注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 只能下载机器人自己上传且图片类型为message的图片,avatar类型暂不支持下载;- 下载用户发送的资源,请使用[获取消息中的资源文件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get)接口 ;
官网API文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/get ;
ExceptionCopyright © 2022. All rights reserved.