jpsclient 2.1.0 → 2.2.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/project.rb +23 -0
- data/lib/jpsclient/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0a18334b609f763fcec9fd3f539912ff6a55871839fc452f821ecb6a431a6903
|
|
4
|
+
data.tar.gz: 2ba15cc0c728e2fd105887b248314fd775bdcbf7bb9662275427dd23db03a694
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06cfeca05acec4f0fd00585e6eab9f68ae262ea204065a48ddeb01bb4ee9b7a197dfb4e4dc250fe8d6e765094f86b882cb4e13725ab303e6d73cc1a0419ba056
|
|
7
|
+
data.tar.gz: 4f973ab975fb1065e63cddc767c86af9b7a9c7a95c783e3f29b065389092e58784d87a3de6524ac5b8349712dabdf8fe884f46a55cda81d85056ee69b89930e5
|
|
@@ -40,6 +40,29 @@ module JPSClient
|
|
|
40
40
|
return response_data
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
+
# 获取项目详情
|
|
44
|
+
# @param project_id [String] 项目ID
|
|
45
|
+
# @param project_name [String] 项目名称(可选)
|
|
46
|
+
# @return [Hash] 响应数据
|
|
47
|
+
def get_project_detail(project_id:, project_name: nil)
|
|
48
|
+
config = @request_config && @request_config["project_detail"]
|
|
49
|
+
raise JPSClient::ExceptionError, "Missing config for project_detail" unless config && config["url"]
|
|
50
|
+
path = config["url"]
|
|
51
|
+
|
|
52
|
+
get_params = { projectId: project_id }
|
|
53
|
+
get_params[:projectName] = project_name if project_name
|
|
54
|
+
|
|
55
|
+
response = @http_client.get(path, params: get_params)
|
|
56
|
+
result = JPSClient::Response.new(response)
|
|
57
|
+
|
|
58
|
+
if result.need_login?
|
|
59
|
+
do_login(force_login: true)
|
|
60
|
+
response = @http_client.get(path, params: get_params)
|
|
61
|
+
result = JPSClient::Response.new(response)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
return result.to_h
|
|
65
|
+
end
|
|
43
66
|
|
|
44
67
|
end
|
|
45
68
|
end
|
data/lib/jpsclient/version.rb
CHANGED