Module: JPSClient::API::LarkDepartment
- Included in:
- Client
- Defined in:
- lib/jpsclient/api/lark_department.rb
Overview
LarkDepartment 相关 API 处理飞书部门管理相关接口
Instance Method Summary collapse
-
#get_lark_department_list(parent_department_id: nil, fetch_child: true, page_size: 50, page_token: nil) ⇒ Hash
(also: #get_all_lark_departments)
获取飞书部门列表.
Instance Method Details
#get_lark_department_list(parent_department_id: nil, fetch_child: true, page_size: 50, page_token: nil) ⇒ Hash Also known as: get_all_lark_departments
获取飞书部门列表
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jpsclient/api/lark_department.rb', line 14 def get_lark_department_list(parent_department_id: nil, fetch_child: true, page_size: 50, page_token: nil) config = @request_config && @request_config["lark_department_all"] raise JPSClient::ExceptionError, "Missing config for lark_department_all" unless config && config["url"] path = config["url"] params = { fetch_child: fetch_child, page_size: page_size } params[:parent_department_id] = parent_department_id if parent_department_id params[:page_token] = page_token if page_token return request_with_auth(:get, path, params: params) end |