Module: JPSClient::API::LarkFile

Included in:
Client
Defined in:
lib/jpsclient/api/lark_file.rb

Overview

LarkFile 相关 API 处理飞书文件和图片相关接口

Instance Method Summary collapse

Instance Method Details

#get_lark_file_url_by_image_key(image_key:) ⇒ Hash

通过图片 key 获取下载链接

Parameters:

  • image_key (String)

    图片的唯一标识 key(必需)

Returns:

  • (Hash)

    API响应

Raises:



11
12
13
14
15
16
17
18
19
# File 'lib/jpsclient/api/lark_file.rb', line 11

def get_lark_file_url_by_image_key(image_key:)
  config = @request_config && @request_config["lark_file_url_by_image_key"]
  raise JPSClient::ExceptionError, "Missing config for lark_file_url_by_image_key" unless config && config["url"]

  path = config["url"]
  params = { image_key: image_key }

  return request_with_auth(:get, path, params: params)
end