jpsclient 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jpsclient/api/category.rb +331 -0
- data/lib/jpsclient/api/cert.rb +4 -1
- data/lib/jpsclient/api/client.rb +68 -37
- data/lib/jpsclient/api/design.rb +123 -0
- data/lib/jpsclient/api/image_search.rb +74 -0
- data/lib/jpsclient/api/lark_card_message.rb +45 -0
- data/lib/jpsclient/api/lark_department.rb +44 -0
- data/lib/jpsclient/api/lark_file.rb +32 -0
- data/lib/jpsclient/api/lark_leave_approval.rb +47 -0
- data/lib/jpsclient/api/lark_message.rb +32 -0
- data/lib/jpsclient/api/nuget.rb +30 -0
- data/lib/jpsclient/api/permission.rb +137 -0
- data/lib/jpsclient/api/tag.rb +267 -45
- data/lib/jpsclient/api/template.rb +216 -0
- data/lib/jpsclient/auth/auth.rb +1 -1
- data/lib/jpsclient/http/http_client.rb +24 -4
- data/lib/jpsclient/upload/upload_client.rb +1 -1
- data/lib/jpsclient/version.rb +1 -1
- metadata +57 -18
- /data/lib/jpsclient/api/{app_resource_version.rb → archived_outdated/app_resource_version.rb} +0 -0
- /data/lib/jpsclient/api/{application_category.rb → archived_outdated/application_category.rb} +0 -0
- /data/lib/jpsclient/api/{application_design.rb → archived_outdated/application_design.rb} +0 -0
- /data/lib/jpsclient/api/{assets_category.rb → archived_outdated/assets_category.rb} +0 -0
- /data/lib/jpsclient/api/{experience.rb → archived_outdated/experience.rb} +0 -0
- /data/lib/jpsclient/api/{experience_category.rb → archived_outdated/experience_category.rb} +0 -0
- /data/lib/jpsclient/api/{icon_and_snapshot.rb → archived_outdated/icon_and_snapshot.rb} +0 -0
- /data/lib/jpsclient/api/{publisher_category.rb → archived_outdated/publisher_category.rb} +0 -0
- /data/lib/jpsclient/api/{publisher_group_category.rb → archived_outdated/publisher_group_category.rb} +0 -0
- /data/lib/jpsclient/api/{requirements_category.rb → archived_outdated/requirements_category.rb} +0 -0
- /data/lib/jpsclient/api/{resource_category.rb → archived_outdated/resource_category.rb} +0 -0
- /data/lib/jpsclient/api/{sketch_category.rb → archived_outdated/sketch_category.rb} +0 -0
- /data/lib/jpsclient/api/{survey_category.rb → archived_outdated/survey_category.rb} +0 -0
- /data/lib/jpsclient/api/{tool_category.rb → archived_outdated/tool_category.rb} +0 -0
- /data/lib/jpsclient/api/{jssdk.rb → js_sdk.rb} +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# ImageSearch 相关 API
|
|
4
|
+
# 处理图片搜索相关接口
|
|
5
|
+
module ImageSearch
|
|
6
|
+
|
|
7
|
+
# 通过文本搜索相似图片
|
|
8
|
+
#
|
|
9
|
+
# @param query [String] 搜索关键词(必需)
|
|
10
|
+
# @param limit [Integer] 返回结果数量(可选,默认10)
|
|
11
|
+
# @param offset [Integer] 偏移量,用于分页(可选)
|
|
12
|
+
# @return [Hash] API响应
|
|
13
|
+
def search_image_by_text(query:, limit: 10, offset: 0)
|
|
14
|
+
config = @request_config && @request_config["image_search_by_text"]
|
|
15
|
+
raise JPSClient::ExceptionError, "Missing config for image_search_by_text" unless config && config["url"]
|
|
16
|
+
|
|
17
|
+
path = config["url"]
|
|
18
|
+
params = {
|
|
19
|
+
query: query,
|
|
20
|
+
limit: limit,
|
|
21
|
+
offset: offset
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
response = @http_client.get(path, params: params)
|
|
25
|
+
result = JPSClient::Response.new(response)
|
|
26
|
+
|
|
27
|
+
if result.need_login?
|
|
28
|
+
do_login(force_login: true)
|
|
29
|
+
response = @http_client.get(path, params: params)
|
|
30
|
+
result = JPSClient::Response.new(response)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
return result.to_h
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# 通过图片搜索相似图片(以图搜图)
|
|
37
|
+
#
|
|
38
|
+
# @param image_url [String] 图片URL(与image_data二选一)
|
|
39
|
+
# @param image_data [String] Base64编码的图片数据(与image_url二选一)
|
|
40
|
+
# @param limit [Integer] 返回结果数量(可选,默认10)
|
|
41
|
+
# @param threshold [Float] 相似度阈值,0-1之间(可选,默认0.7)
|
|
42
|
+
# @return [Hash] API响应
|
|
43
|
+
def search_image_by_image(image_url: nil, image_data: nil, limit: 10, threshold: 0.7)
|
|
44
|
+
config = @request_config && @request_config["image_search_by_image"]
|
|
45
|
+
raise JPSClient::ExceptionError, "Missing config for image_search_by_image" unless config && config["url"]
|
|
46
|
+
|
|
47
|
+
# 验证参数
|
|
48
|
+
unless image_url || image_data
|
|
49
|
+
raise JPSClient::ExceptionError, "Either image_url or image_data must be provided"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
path = config["url"]
|
|
53
|
+
params = {
|
|
54
|
+
limit: limit,
|
|
55
|
+
threshold: threshold
|
|
56
|
+
}
|
|
57
|
+
params[:image_url] = image_url if image_url
|
|
58
|
+
params[:image_data] = image_data if image_data
|
|
59
|
+
|
|
60
|
+
response = @http_client.get(path, params: params)
|
|
61
|
+
result = JPSClient::Response.new(response)
|
|
62
|
+
|
|
63
|
+
if result.need_login?
|
|
64
|
+
do_login(force_login: true)
|
|
65
|
+
response = @http_client.get(path, params: params)
|
|
66
|
+
result = JPSClient::Response.new(response)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
return result.to_h
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# LarkCardMessage 相关 API
|
|
4
|
+
# 处理飞书卡片消息相关接口
|
|
5
|
+
module LarkCardMessage
|
|
6
|
+
|
|
7
|
+
# 获取飞书卡片消息发送历史记录
|
|
8
|
+
#
|
|
9
|
+
# @param page [Integer] 页码(可选,默认1)
|
|
10
|
+
# @param page_size [Integer] 每页数量(可选,默认20)
|
|
11
|
+
# @param chat_id [String] 群组ID(可选)
|
|
12
|
+
# @param user_id [String] 用户ID(可选)
|
|
13
|
+
# @param start_time [String] 开始时间(可选)
|
|
14
|
+
# @param end_time [String] 结束时间(可选)
|
|
15
|
+
# @return [Hash] API响应
|
|
16
|
+
def get_lark_card_message_history(page: 1, page_size: 20, chat_id: nil, user_id: nil, start_time: nil, end_time: nil)
|
|
17
|
+
config = @request_config && @request_config["lark_card_message_history_list"]
|
|
18
|
+
raise JPSClient::ExceptionError, "Missing config for lark_card_message_history_list" unless config && config["url"]
|
|
19
|
+
|
|
20
|
+
path = config["url"]
|
|
21
|
+
|
|
22
|
+
params = {
|
|
23
|
+
page: page,
|
|
24
|
+
pageSize: page_size
|
|
25
|
+
}
|
|
26
|
+
params[:chatId] = chat_id if chat_id
|
|
27
|
+
params[:userId] = user_id if user_id
|
|
28
|
+
params[:startTime] = start_time if start_time
|
|
29
|
+
params[:endTime] = end_time if end_time
|
|
30
|
+
|
|
31
|
+
response = @http_client.get(path, params: params)
|
|
32
|
+
result = JPSClient::Response.new(response)
|
|
33
|
+
|
|
34
|
+
if result.need_login?
|
|
35
|
+
do_login(force_login: true)
|
|
36
|
+
response = @http_client.get(path, params: params)
|
|
37
|
+
result = JPSClient::Response.new(response)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
return result.to_h
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# LarkDepartment 相关 API
|
|
4
|
+
# 处理飞书部门管理相关接口
|
|
5
|
+
module LarkDepartment
|
|
6
|
+
|
|
7
|
+
# 获取飞书部门列表
|
|
8
|
+
#
|
|
9
|
+
# @param parent_department_id [String] 父部门ID(可选,不填则获取所有部门)
|
|
10
|
+
# @param fetch_child [Boolean] 是否递归获取子部门(可选,默认true)
|
|
11
|
+
# @param page_size [Integer] 分页大小(可选,默认50,最大50)
|
|
12
|
+
# @param page_token [String] 分页标记(可选)
|
|
13
|
+
# @return [Hash] API响应
|
|
14
|
+
def get_lark_department_list(parent_department_id: nil, fetch_child: true, page_size: 50, page_token: nil)
|
|
15
|
+
config = @request_config && @request_config["lark_department_all"]
|
|
16
|
+
raise JPSClient::ExceptionError, "Missing config for lark_department_all" unless config && config["url"]
|
|
17
|
+
|
|
18
|
+
path = config["url"]
|
|
19
|
+
|
|
20
|
+
params = {
|
|
21
|
+
fetch_child: fetch_child,
|
|
22
|
+
page_size: page_size
|
|
23
|
+
}
|
|
24
|
+
params[:parent_department_id] = parent_department_id if parent_department_id
|
|
25
|
+
params[:page_token] = page_token if page_token
|
|
26
|
+
|
|
27
|
+
response = @http_client.get(path, params: params)
|
|
28
|
+
result = JPSClient::Response.new(response)
|
|
29
|
+
|
|
30
|
+
if result.need_login?
|
|
31
|
+
do_login(force_login: true)
|
|
32
|
+
response = @http_client.get(path, params: params)
|
|
33
|
+
result = JPSClient::Response.new(response)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
return result.to_h
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# 获取所有部门(别名方法)
|
|
40
|
+
alias get_all_lark_departments get_lark_department_list
|
|
41
|
+
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# LarkFile 相关 API
|
|
4
|
+
# 处理飞书文件和图片相关接口
|
|
5
|
+
module LarkFile
|
|
6
|
+
|
|
7
|
+
# 通过图片 key 获取下载链接
|
|
8
|
+
#
|
|
9
|
+
# @param image_key [String] 图片的唯一标识 key(必需)
|
|
10
|
+
# @return [Hash] API响应
|
|
11
|
+
def get_lark_file_url_by_image_key(image_key:)
|
|
12
|
+
config = @request_config && @request_config["lark_file_url_by_image_key"]
|
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for lark_file_url_by_image_key" unless config && config["url"]
|
|
14
|
+
|
|
15
|
+
path = config["url"]
|
|
16
|
+
params = { image_key: image_key }
|
|
17
|
+
|
|
18
|
+
response = @http_client.get(path, params: params)
|
|
19
|
+
result = JPSClient::Response.new(response)
|
|
20
|
+
|
|
21
|
+
if result.need_login?
|
|
22
|
+
do_login(force_login: true)
|
|
23
|
+
response = @http_client.get(path, params: params)
|
|
24
|
+
result = JPSClient::Response.new(response)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
return result.to_h
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# LarkLeaveApproval 相关 API
|
|
4
|
+
# 处理飞书请假审批相关接口
|
|
5
|
+
module LarkLeaveApproval
|
|
6
|
+
|
|
7
|
+
# 获取请假审批日历
|
|
8
|
+
#
|
|
9
|
+
# @param start_time [String] 开始时间,格式:YYYY-MM-DD(可选)
|
|
10
|
+
# @param end_time [String] 结束时间,格式:YYYY-MM-DD(可选)
|
|
11
|
+
# @param user_ids [Array<String>, String] 用户ID列表(可选,支持数组或逗号分隔的字符串)
|
|
12
|
+
# @param department_id [String] 部门ID(可选)
|
|
13
|
+
# @param status [String] 审批状态(可选)
|
|
14
|
+
# @return [Hash] API响应
|
|
15
|
+
def get_lark_leave_approval_calendar(start_time: nil, end_time: nil, user_ids: nil, department_id: nil, status: nil)
|
|
16
|
+
config = @request_config && @request_config["lark_leave_approval_calendar"]
|
|
17
|
+
raise JPSClient::ExceptionError, "Missing config for lark_leave_approval_calendar" unless config && config["url"]
|
|
18
|
+
|
|
19
|
+
path = config["url"]
|
|
20
|
+
|
|
21
|
+
params = {}
|
|
22
|
+
params[:start_time] = start_time if start_time
|
|
23
|
+
params[:end_time] = end_time if end_time
|
|
24
|
+
|
|
25
|
+
# 处理 user_ids,支持数组或字符串
|
|
26
|
+
if user_ids
|
|
27
|
+
params[:user_ids] = user_ids.is_a?(Array) ? user_ids.join(',') : user_ids
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
params[:department_id] = department_id if department_id
|
|
31
|
+
params[:status] = status if status
|
|
32
|
+
|
|
33
|
+
response = @http_client.get(path, params: params)
|
|
34
|
+
result = JPSClient::Response.new(response)
|
|
35
|
+
|
|
36
|
+
if result.need_login?
|
|
37
|
+
do_login(force_login: true)
|
|
38
|
+
response = @http_client.get(path, params: params)
|
|
39
|
+
result = JPSClient::Response.new(response)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
return result.to_h
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# LarkMessage 相关 API
|
|
4
|
+
# 处理飞书消息相关接口
|
|
5
|
+
module LarkMessage
|
|
6
|
+
|
|
7
|
+
# 获取飞书消息详情
|
|
8
|
+
#
|
|
9
|
+
# @param message_id [String] 消息ID(必需)
|
|
10
|
+
# @return [Hash] API响应
|
|
11
|
+
def get_lark_message_detail(message_id:)
|
|
12
|
+
config = @request_config && @request_config["lark_message_detail"]
|
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for lark_message_detail" unless config && config["url"]
|
|
14
|
+
|
|
15
|
+
path = config["url"]
|
|
16
|
+
params = { message_id: message_id }
|
|
17
|
+
|
|
18
|
+
response = @http_client.get(path, params: params)
|
|
19
|
+
result = JPSClient::Response.new(response)
|
|
20
|
+
|
|
21
|
+
if result.need_login?
|
|
22
|
+
do_login(force_login: true)
|
|
23
|
+
response = @http_client.get(path, params: params)
|
|
24
|
+
result = JPSClient::Response.new(response)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
return result.to_h
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# NuGet 相关 API
|
|
4
|
+
# 处理 NuGet 包管理服务相关接口
|
|
5
|
+
module NuGet
|
|
6
|
+
|
|
7
|
+
# 获取 NuGet v3 服务索引
|
|
8
|
+
#
|
|
9
|
+
# @return [Hash] NuGet 服务索引信息
|
|
10
|
+
def get_nuget_service_index
|
|
11
|
+
config = @request_config && @request_config["nuget_service_index"]
|
|
12
|
+
raise JPSClient::ExceptionError, "Missing config for nuget_service_index" unless config && config["url"]
|
|
13
|
+
|
|
14
|
+
path = config["url"]
|
|
15
|
+
|
|
16
|
+
response = @http_client.get(path)
|
|
17
|
+
result = JPSClient::Response.new(response)
|
|
18
|
+
|
|
19
|
+
if result.need_login?
|
|
20
|
+
do_login(force_login: true)
|
|
21
|
+
response = @http_client.get(path)
|
|
22
|
+
result = JPSClient::Response.new(response)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
return result.to_h
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# Permission 相关 API
|
|
4
|
+
# 处理权限管理相关接口
|
|
5
|
+
module Permission
|
|
6
|
+
|
|
7
|
+
# 获取权限列表
|
|
8
|
+
#
|
|
9
|
+
# @param params [Hash] 请求参数(可选)
|
|
10
|
+
# @return [Hash] API响应
|
|
11
|
+
def get_permission_list(params: {})
|
|
12
|
+
config = @request_config && @request_config["permission_list"]
|
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for permission_list" unless config && config["url"]
|
|
14
|
+
|
|
15
|
+
path = config["url"]
|
|
16
|
+
|
|
17
|
+
response = @http_client.get(path, params: params)
|
|
18
|
+
result = JPSClient::Response.new(response)
|
|
19
|
+
|
|
20
|
+
if result.need_login?
|
|
21
|
+
do_login(force_login: true)
|
|
22
|
+
response = @http_client.get(path, params: params)
|
|
23
|
+
result = JPSClient::Response.new(response)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
return result.to_h
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# 获取权限详情
|
|
30
|
+
#
|
|
31
|
+
# @param id [String, Integer] 权限ID(必需)
|
|
32
|
+
# @return [Hash] API响应
|
|
33
|
+
def get_permission_detail(id:)
|
|
34
|
+
config = @request_config && @request_config["permission_detail"]
|
|
35
|
+
raise JPSClient::ExceptionError, "Missing config for permission_detail" unless config && config["url"]
|
|
36
|
+
|
|
37
|
+
path = config["url"]
|
|
38
|
+
params = { id: id }
|
|
39
|
+
|
|
40
|
+
response = @http_client.get(path, params: params)
|
|
41
|
+
result = JPSClient::Response.new(response)
|
|
42
|
+
|
|
43
|
+
if result.need_login?
|
|
44
|
+
do_login(force_login: true)
|
|
45
|
+
response = @http_client.get(path, params: params)
|
|
46
|
+
result = JPSClient::Response.new(response)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
return result.to_h
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# 创建权限
|
|
53
|
+
#
|
|
54
|
+
# @param name [String] 权限名称(必需)
|
|
55
|
+
# @param code [String] 权限代码(必需)
|
|
56
|
+
# @param description [String] 权限描述(可选)
|
|
57
|
+
# @return [Hash] API响应
|
|
58
|
+
def create_permission(name:, code:, description: nil)
|
|
59
|
+
config = @request_config && @request_config["permission_create"]
|
|
60
|
+
raise JPSClient::ExceptionError, "Missing config for permission_create" unless config && config["url"]
|
|
61
|
+
|
|
62
|
+
path = config["url"]
|
|
63
|
+
|
|
64
|
+
body = {
|
|
65
|
+
name: name,
|
|
66
|
+
code: code
|
|
67
|
+
}
|
|
68
|
+
body[:description] = description if description
|
|
69
|
+
|
|
70
|
+
response = @http_client.post(path, body: body)
|
|
71
|
+
result = JPSClient::Response.new(response)
|
|
72
|
+
|
|
73
|
+
if result.need_login?
|
|
74
|
+
do_login(force_login: true)
|
|
75
|
+
response = @http_client.post(path, body: body)
|
|
76
|
+
result = JPSClient::Response.new(response)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
return result.to_h
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# 更新权限
|
|
83
|
+
#
|
|
84
|
+
# @param id [String, Integer] 权限ID(必需)
|
|
85
|
+
# @param name [String] 权限名称(可选)
|
|
86
|
+
# @param code [String] 权限代码(可选)
|
|
87
|
+
# @param description [String] 权限描述(可选)
|
|
88
|
+
# @return [Hash] API响应
|
|
89
|
+
def update_permission(id:, name: nil, code: nil, description: nil)
|
|
90
|
+
config = @request_config && @request_config["permission_update"]
|
|
91
|
+
raise JPSClient::ExceptionError, "Missing config for permission_update" unless config && config["url"]
|
|
92
|
+
|
|
93
|
+
path = config["url"]
|
|
94
|
+
|
|
95
|
+
body = { id: id }
|
|
96
|
+
body[:name] = name if name
|
|
97
|
+
body[:code] = code if code
|
|
98
|
+
body[:description] = description if description
|
|
99
|
+
|
|
100
|
+
response = @http_client.post(path, body: body)
|
|
101
|
+
result = JPSClient::Response.new(response)
|
|
102
|
+
|
|
103
|
+
if result.need_login?
|
|
104
|
+
do_login(force_login: true)
|
|
105
|
+
response = @http_client.post(path, body: body)
|
|
106
|
+
result = JPSClient::Response.new(response)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
return result.to_h
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# 删除权限
|
|
113
|
+
#
|
|
114
|
+
# @param id [String, Integer] 权限ID(必需)
|
|
115
|
+
# @return [Hash] API响应
|
|
116
|
+
def delete_permission(id:)
|
|
117
|
+
config = @request_config && @request_config["permission_delete"]
|
|
118
|
+
raise JPSClient::ExceptionError, "Missing config for permission_delete" unless config && config["url"]
|
|
119
|
+
|
|
120
|
+
path = config["url"]
|
|
121
|
+
body = { id: id }
|
|
122
|
+
|
|
123
|
+
response = @http_client.post(path, body: body)
|
|
124
|
+
result = JPSClient::Response.new(response)
|
|
125
|
+
|
|
126
|
+
if result.need_login?
|
|
127
|
+
do_login(force_login: true)
|
|
128
|
+
response = @http_client.post(path, body: body)
|
|
129
|
+
result = JPSClient::Response.new(response)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
return result.to_h
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|