jpsclient 2.2.0 → 2.3.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.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jpsclient/api/android_jks.rb +7 -70
  3. data/lib/jpsclient/api/app_level.rb +6 -60
  4. data/lib/jpsclient/api/app_resource.rb +7 -70
  5. data/lib/jpsclient/api/apple_account.rb +6 -60
  6. data/lib/jpsclient/api/apple_bundle_id.rb +1 -11
  7. data/lib/jpsclient/api/apple_cert.rb +1 -11
  8. data/lib/jpsclient/api/apple_profile.rb +1 -11
  9. data/lib/jpsclient/api/application.rb +12 -121
  10. data/lib/jpsclient/api/application_income.rb +2 -20
  11. data/lib/jpsclient/api/application_sales.rb +2 -20
  12. data/lib/jpsclient/api/application_version.rb +3 -30
  13. data/lib/jpsclient/api/archived_outdated/app_resource_version.rb +2 -20
  14. data/lib/jpsclient/api/archived_outdated/application_category.rb +5 -50
  15. data/lib/jpsclient/api/archived_outdated/application_design.rb +5 -50
  16. data/lib/jpsclient/api/archived_outdated/assets_category.rb +5 -50
  17. data/lib/jpsclient/api/archived_outdated/experience.rb +6 -60
  18. data/lib/jpsclient/api/archived_outdated/experience_category.rb +4 -40
  19. data/lib/jpsclient/api/archived_outdated/icon_and_snapshot.rb +2 -20
  20. data/lib/jpsclient/api/archived_outdated/publisher_category.rb +6 -60
  21. data/lib/jpsclient/api/archived_outdated/publisher_group_category.rb +5 -50
  22. data/lib/jpsclient/api/archived_outdated/requirements_category.rb +4 -40
  23. data/lib/jpsclient/api/archived_outdated/resource_category.rb +5 -50
  24. data/lib/jpsclient/api/archived_outdated/sketch_category.rb +4 -40
  25. data/lib/jpsclient/api/archived_outdated/survey_category.rb +4 -40
  26. data/lib/jpsclient/api/archived_outdated/tool_category.rb +5 -50
  27. data/lib/jpsclient/api/bug.rb +6 -60
  28. data/lib/jpsclient/api/category.rb +6 -60
  29. data/lib/jpsclient/api/cert.rb +1 -12
  30. data/lib/jpsclient/api/collect.rb +2 -20
  31. data/lib/jpsclient/api/collection.rb +7 -70
  32. data/lib/jpsclient/api/commit_log.rb +5 -52
  33. data/lib/jpsclient/api/creative.rb +2 -20
  34. data/lib/jpsclient/api/custom_application.rb +10 -100
  35. data/lib/jpsclient/api/custom_application_web.rb +2 -20
  36. data/lib/jpsclient/api/design.rb +5 -50
  37. data/lib/jpsclient/api/document_text.rb +1 -10
  38. data/lib/jpsclient/api/fgui_export.rb +2 -20
  39. data/lib/jpsclient/api/file.rb +4 -41
  40. data/lib/jpsclient/api/game_assets.rb +6 -60
  41. data/lib/jpsclient/api/healthy.rb +1 -10
  42. data/lib/jpsclient/api/idea.rb +5 -50
  43. data/lib/jpsclient/api/image_search.rb +2 -20
  44. data/lib/jpsclient/api/js_sdk.rb +1 -10
  45. data/lib/jpsclient/api/lark_bitable.rb +1 -10
  46. data/lib/jpsclient/api/lark_card_message.rb +1 -10
  47. data/lib/jpsclient/api/lark_chat_group.rb +1 -10
  48. data/lib/jpsclient/api/lark_comment.rb +5 -50
  49. data/lib/jpsclient/api/lark_department.rb +1 -10
  50. data/lib/jpsclient/api/lark_file.rb +1 -10
  51. data/lib/jpsclient/api/lark_leave_approval.rb +1 -10
  52. data/lib/jpsclient/api/lark_message.rb +1 -10
  53. data/lib/jpsclient/api/lark_task.rb +6 -60
  54. data/lib/jpsclient/api/lark_task_list.rb +5 -50
  55. data/lib/jpsclient/api/lark_task_section.rb +3 -30
  56. data/lib/jpsclient/api/lark_user.rb +1 -10
  57. data/lib/jpsclient/api/lark_wiki_node.rb +1 -10
  58. data/lib/jpsclient/api/lark_wiki_space.rb +1 -10
  59. data/lib/jpsclient/api/lazy_client.rb +39 -39
  60. data/lib/jpsclient/api/login.rb +4 -40
  61. data/lib/jpsclient/api/m3u8.rb +1 -10
  62. data/lib/jpsclient/api/menu.rb +6 -60
  63. data/lib/jpsclient/api/modular_client.rb +38 -38
  64. data/lib/jpsclient/api/nuget.rb +1 -10
  65. data/lib/jpsclient/api/permission.rb +5 -50
  66. data/lib/jpsclient/api/project.rb +2 -22
  67. data/lib/jpsclient/api/project_package.rb +9 -121
  68. data/lib/jpsclient/api/publisher.rb +7 -70
  69. data/lib/jpsclient/api/publisher_group.rb +5 -50
  70. data/lib/jpsclient/api/requirements.rb +6 -60
  71. data/lib/jpsclient/api/role.rb +7 -70
  72. data/lib/jpsclient/api/simple_search.rb +7 -70
  73. data/lib/jpsclient/api/sketch.rb +3 -30
  74. data/lib/jpsclient/api/sov.rb +1 -10
  75. data/lib/jpsclient/api/statistics.rb +1 -10
  76. data/lib/jpsclient/api/store.rb +1 -10
  77. data/lib/jpsclient/api/survey.rb +6 -60
  78. data/lib/jpsclient/api/tag.rb +6 -60
  79. data/lib/jpsclient/api/template.rb +5 -50
  80. data/lib/jpsclient/api/tool.rb +5 -50
  81. data/lib/jpsclient/api/trending.rb +1 -10
  82. data/lib/jpsclient/api/ud_id.rb +5 -50
  83. data/lib/jpsclient/api/user.rb +4 -40
  84. data/lib/jpsclient/api/util.rb +1 -10
  85. data/lib/jpsclient/api/video_cover.rb +1 -10
  86. data/lib/jpsclient/api/webhook.rb +5 -50
  87. data/lib/jpsclient/api/workflow.rb +5 -50
  88. data/lib/jpsclient/auth/auth.rb +21 -31
  89. data/lib/jpsclient/auth/token.rb +49 -95
  90. data/lib/jpsclient/base/client.rb +43 -38
  91. data/lib/jpsclient/http/http_client.rb +18 -2
  92. data/lib/jpsclient/version.rb +1 -1
  93. metadata +15 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a18334b609f763fcec9fd3f539912ff6a55871839fc452f821ecb6a431a6903
4
- data.tar.gz: 2ba15cc0c728e2fd105887b248314fd775bdcbf7bb9662275427dd23db03a694
3
+ metadata.gz: dcf80dbe6ac3bdcecdd9c846c92db864f7c5fb74f8c971e924bf66ede9886241
4
+ data.tar.gz: 9b116b8d64d779d222b42c973d91574d136cf35e702ff2a2e2650d57f38a4793
5
5
  SHA512:
6
- metadata.gz: 06cfeca05acec4f0fd00585e6eab9f68ae262ea204065a48ddeb01bb4ee9b7a197dfb4e4dc250fe8d6e765094f86b882cb4e13725ab303e6d73cc1a0419ba056
7
- data.tar.gz: 4f973ab975fb1065e63cddc767c86af9b7a9c7a95c783e3f29b065389092e58784d87a3de6524ac5b8349712dabdf8fe884f46a55cda81d85056ee69b89930e5
6
+ metadata.gz: 6662bd22dd54b5f0e2f33db3595c6325ab9dcb18226dc8b8ab8b00576d8bb8f409a140bee259b62e6ad33521fda550d620ba1c0a115584a617135d3421092f19
7
+ data.tar.gz: de147cfce55eb03891cbde55b1c138e6c4ca1ead93ae0d7767ffd4f5f23728a46ab0ddb5df09ff34218b79ca3c7fc514109d0bfcb3a59d6ce7313ffcd25727cd
@@ -41,16 +41,7 @@ module JPSClient
41
41
  body_params[:projectId] = project_id if project_id
42
42
  body_params[:remark] = remark if remark
43
43
 
44
- response = @http_client.post(path, body: body_params)
45
- result = JPSClient::Response.new(response)
46
-
47
- if result.need_login?
48
- do_login(force_login: true)
49
- response = @http_client.post(path, body: body_params)
50
- result = JPSClient::Response.new(response)
51
- end
52
-
53
- return result.to_h
44
+ return request_with_auth(:post, path, body: body_params)
54
45
  end
55
46
 
56
47
  # 更新 Android JKS 证书信息
@@ -72,16 +63,7 @@ module JPSClient
72
63
  body_params[:projectId] = project_id if project_id
73
64
  body_params[:remark] = remark if remark
74
65
 
75
- response = @http_client.post(path, body: body_params)
76
- result = JPSClient::Response.new(response)
77
-
78
- if result.need_login?
79
- do_login(force_login: true)
80
- response = @http_client.post(path, body: body_params)
81
- result = JPSClient::Response.new(response)
82
- end
83
-
84
- return result.to_h
66
+ return request_with_auth(:post, path, body: body_params)
85
67
  end
86
68
 
87
69
  # 删除 Android JKS 证书
@@ -95,16 +77,7 @@ module JPSClient
95
77
 
96
78
  body_params = { id: id }
97
79
 
98
- response = @http_client.post(path, body: body_params)
99
- result = JPSClient::Response.new(response)
100
-
101
- if result.need_login?
102
- do_login(force_login: true)
103
- response = @http_client.post(path, body: body_params)
104
- result = JPSClient::Response.new(response)
105
- end
106
-
107
- return result.to_h
80
+ return request_with_auth(:post, path, body: body_params)
108
81
  end
109
82
 
110
83
  # 获取 Android JKS 证书列表
@@ -125,16 +98,7 @@ module JPSClient
125
98
  get_params[:googleAccount] = google_account if google_account
126
99
  get_params[:projectId] = project_id if project_id
127
100
 
128
- response = @http_client.get(path, params: get_params)
129
- result = JPSClient::Response.new(response)
130
-
131
- if result.need_login?
132
- do_login(force_login: true)
133
- response = @http_client.get(path, params: get_params)
134
- result = JPSClient::Response.new(response)
135
- end
136
-
137
- return result.to_h
101
+ return request_with_auth(:get, path, params: get_params)
138
102
  end
139
103
 
140
104
  # 获取 Android JKS 证书详情
@@ -148,16 +112,7 @@ module JPSClient
148
112
 
149
113
  get_params = { bundleId: bundle_id }
150
114
 
151
- response = @http_client.get(path, params: get_params)
152
- result = JPSClient::Response.new(response)
153
-
154
- if result.need_login?
155
- do_login(force_login: true)
156
- response = @http_client.get(path, params: get_params)
157
- result = JPSClient::Response.new(response)
158
- end
159
-
160
- return result.to_h
115
+ return request_with_auth(:get, path, params: get_params)
161
116
  end
162
117
 
163
118
  # 重命名 Android JKS 证书(异步接口)
@@ -177,16 +132,7 @@ module JPSClient
177
132
  newStorePassword: new_store_password
178
133
  }
179
134
 
180
- response = @http_client.post(path, body: body_params)
181
- result = JPSClient::Response.new(response)
182
-
183
- if result.need_login?
184
- do_login(force_login: true)
185
- response = @http_client.post(path, body: body_params)
186
- result = JPSClient::Response.new(response)
187
- end
188
-
189
- return result.to_h
135
+ return request_with_auth(:post, path, body: body_params)
190
136
  end
191
137
 
192
138
  # APK 重签名(异步接口)
@@ -215,16 +161,7 @@ module JPSClient
215
161
  body_params[:useAapt2] = use_aapt2 unless use_aapt2.nil?
216
162
  body_params[:skipVerify] = skip_verify unless skip_verify.nil?
217
163
 
218
- response = @http_client.post(path, body: body_params)
219
- result = JPSClient::Response.new(response)
220
-
221
- if result.need_login?
222
- do_login(force_login: true)
223
- response = @http_client.post(path, body: body_params)
224
- result = JPSClient::Response.new(response)
225
- end
226
-
227
- return result.to_h
164
+ return request_with_auth(:post, path, body: body_params)
228
165
  end
229
166
 
230
167
  end
@@ -15,16 +15,7 @@ module JPSClient
15
15
 
16
16
  path = config["url"].gsub("{resourceId}", resourceId.to_s)
17
17
 
18
- response = @http_client.put(path, body: params)
19
- result = JPSClient::Response.new(response)
20
-
21
- if result.need_login?
22
- do_login(force_login: true)
23
- response = @http_client.put(path, body: params)
24
- result = JPSClient::Response.new(response)
25
- end
26
-
27
- return result.to_h
18
+ return request_with_auth(:put, path, body: params)
28
19
  end
29
20
 
30
21
  # 删除关卡
@@ -37,16 +28,7 @@ module JPSClient
37
28
 
38
29
  path = config["url"].gsub("{resourceId}", resourceId.to_s)
39
30
 
40
- response = @http_client.delete(path)
41
- result = JPSClient::Response.new(response)
42
-
43
- if result.need_login?
44
- do_login(force_login: true)
45
- response = @http_client.delete(path)
46
- result = JPSClient::Response.new(response)
47
- end
48
-
49
- return result.to_h
31
+ return request_with_auth(:delete, path)
50
32
  end
51
33
 
52
34
  # 获取关卡列表
@@ -58,16 +40,7 @@ module JPSClient
58
40
  raise JPSClient::ExceptionError, "Missing config for app_levels_list" unless config && config["url"]
59
41
  path = config["url"]
60
42
 
61
- response = @http_client.post(path, body: params)
62
- result = JPSClient::Response.new(response)
63
-
64
- if result.need_login?
65
- do_login(force_login: true)
66
- response = @http_client.post(path, body: params)
67
- result = JPSClient::Response.new(response)
68
- end
69
-
70
- return result.to_h
43
+ return request_with_auth(:post, path, body: params)
71
44
  end
72
45
 
73
46
  # 创建关卡
@@ -79,16 +52,7 @@ module JPSClient
79
52
  raise JPSClient::ExceptionError, "Missing config for app_level_create" unless config && config["url"]
80
53
  path = config["url"]
81
54
 
82
- response = @http_client.post(path, body: params)
83
- result = JPSClient::Response.new(response)
84
-
85
- if result.need_login?
86
- do_login(force_login: true)
87
- response = @http_client.post(path, body: params)
88
- result = JPSClient::Response.new(response)
89
- end
90
-
91
- return result.to_h
55
+ return request_with_auth(:post, path, body: params)
92
56
  end
93
57
 
94
58
  # 上传关卡压缩包
@@ -100,16 +64,7 @@ module JPSClient
100
64
  raise JPSClient::ExceptionError, "Missing config for app_level_zip_upload" unless config && config["url"]
101
65
  path = config["url"]
102
66
 
103
- response = @http_client.post(path, body: params)
104
- result = JPSClient::Response.new(response)
105
-
106
- if result.need_login?
107
- do_login(force_login: true)
108
- response = @http_client.post(path, body: params)
109
- result = JPSClient::Response.new(response)
110
- end
111
-
112
- return result.to_h
67
+ return request_with_auth(:post, path, body: params)
113
68
  end
114
69
 
115
70
  # 获取所有分类的关卡
@@ -121,16 +76,7 @@ module JPSClient
121
76
  raise JPSClient::ExceptionError, "Missing config for category_all_levels" unless config && config["url"]
122
77
  path = config["url"]
123
78
 
124
- response = @http_client.post(path, body: params)
125
- result = JPSClient::Response.new(response)
126
-
127
- if result.need_login?
128
- do_login(force_login: true)
129
- response = @http_client.post(path, body: params)
130
- result = JPSClient::Response.new(response)
131
- end
132
-
133
- return result.to_h
79
+ return request_with_auth(:post, path, body: params)
134
80
  end
135
81
 
136
82
  end
@@ -15,16 +15,7 @@ module JPSClient
15
15
 
16
16
  path = config["url"].gsub("{resourceId}", resourceId.to_s)
17
17
 
18
- response = @http_client.put(path, body: params)
19
- result = JPSClient::Response.new(response)
20
-
21
- if result.need_login?
22
- do_login(force_login: true)
23
- response = @http_client.put(path, body: params)
24
- result = JPSClient::Response.new(response)
25
- end
26
-
27
- return result.to_h
18
+ return request_with_auth(:put, path, body: params)
28
19
  end
29
20
 
30
21
  # 删除素材
@@ -37,16 +28,7 @@ module JPSClient
37
28
 
38
29
  path = config["url"].gsub("{resourceId}", resourceId.to_s)
39
30
 
40
- response = @http_client.delete(path)
41
- result = JPSClient::Response.new(response)
42
-
43
- if result.need_login?
44
- do_login(force_login: true)
45
- response = @http_client.delete(path)
46
- result = JPSClient::Response.new(response)
47
- end
48
-
49
- return result.to_h
31
+ return request_with_auth(:delete, path)
50
32
  end
51
33
 
52
34
  # 应用详情下发素材列表
@@ -59,16 +41,7 @@ module JPSClient
59
41
 
60
42
  path = config["url"]
61
43
 
62
- response = @http_client.post(path, body: params)
63
- result = JPSClient::Response.new(response)
64
-
65
- if result.need_login?
66
- do_login(force_login: true)
67
- response = @http_client.post(path, body: params)
68
- result = JPSClient::Response.new(response)
69
- end
70
-
71
- return result.to_h
44
+ return request_with_auth(:post, path, body: params)
72
45
  end
73
46
 
74
47
  # 素材库下发素材列表
@@ -81,16 +54,7 @@ module JPSClient
81
54
 
82
55
  path = config["url"]
83
56
 
84
- response = @http_client.post(path, body: params)
85
- result = JPSClient::Response.new(response)
86
-
87
- if result.need_login?
88
- do_login(force_login: true)
89
- response = @http_client.post(path, body: params)
90
- result = JPSClient::Response.new(response)
91
- end
92
-
93
- return result.to_h
57
+ return request_with_auth(:post, path, body: params)
94
58
  end
95
59
 
96
60
  # 新增素材
@@ -103,16 +67,7 @@ module JPSClient
103
67
 
104
68
  path = config["url"]
105
69
 
106
- response = @http_client.post(path, body: params)
107
- result = JPSClient::Response.new(response)
108
-
109
- if result.need_login?
110
- do_login(force_login: true)
111
- response = @http_client.post(path, body: params)
112
- result = JPSClient::Response.new(response)
113
- end
114
-
115
- return result.to_h
70
+ return request_with_auth(:post, path, body: params)
116
71
  end
117
72
 
118
73
  # 批量新增素材(通过ZIP)
@@ -125,16 +80,7 @@ module JPSClient
125
80
 
126
81
  path = config["url"]
127
82
 
128
- response = @http_client.post(path, body: params)
129
- result = JPSClient::Response.new(response)
130
-
131
- if result.need_login?
132
- do_login(force_login: true)
133
- response = @http_client.post(path, body: params)
134
- result = JPSClient::Response.new(response)
135
- end
136
-
137
- return result.to_h
83
+ return request_with_auth(:post, path, body: params)
138
84
  end
139
85
 
140
86
  # 移动或复制素材
@@ -147,16 +93,7 @@ module JPSClient
147
93
 
148
94
  path = config["url"]
149
95
 
150
- response = @http_client.post(path, body: params)
151
- result = JPSClient::Response.new(response)
152
-
153
- if result.need_login?
154
- do_login(force_login: true)
155
- response = @http_client.post(path, body: params)
156
- result = JPSClient::Response.new(response)
157
- end
158
-
159
- return result.to_h
96
+ return request_with_auth(:post, path, body: params)
160
97
  end
161
98
 
162
99
  end
@@ -14,16 +14,7 @@ module JPSClient
14
14
 
15
15
  path = config["url"]
16
16
 
17
- response = @http_client.post(path, body: params)
18
- result = JPSClient::Response.new(response)
19
-
20
- if result.need_login?
21
- do_login(force_login: true)
22
- response = @http_client.post(path, body: params)
23
- result = JPSClient::Response.new(response)
24
- end
25
-
26
- return result.to_h
17
+ return request_with_auth(:post, path, body: params)
27
18
  end
28
19
 
29
20
  # Create Delete
@@ -36,16 +27,7 @@ module JPSClient
36
27
 
37
28
  path = config["url"]
38
29
 
39
- response = @http_client.post(path, body: params)
40
- result = JPSClient::Response.new(response)
41
-
42
- if result.need_login?
43
- do_login(force_login: true)
44
- response = @http_client.post(path, body: params)
45
- result = JPSClient::Response.new(response)
46
- end
47
-
48
- return result.to_h
30
+ return request_with_auth(:post, path, body: params)
49
31
  end
50
32
 
51
33
  # Create Create
@@ -58,16 +40,7 @@ module JPSClient
58
40
 
59
41
  path = config["url"]
60
42
 
61
- response = @http_client.post(path, body: params)
62
- result = JPSClient::Response.new(response)
63
-
64
- if result.need_login?
65
- do_login(force_login: true)
66
- response = @http_client.post(path, body: params)
67
- result = JPSClient::Response.new(response)
68
- end
69
-
70
- return result.to_h
43
+ return request_with_auth(:post, path, body: params)
71
44
  end
72
45
 
73
46
  # Create Bind
@@ -80,16 +53,7 @@ module JPSClient
80
53
 
81
54
  path = config["url"]
82
55
 
83
- response = @http_client.post(path, body: params)
84
- result = JPSClient::Response.new(response)
85
-
86
- if result.need_login?
87
- do_login(force_login: true)
88
- response = @http_client.post(path, body: params)
89
- result = JPSClient::Response.new(response)
90
- end
91
-
92
- return result.to_h
56
+ return request_with_auth(:post, path, body: params)
93
57
  end
94
58
 
95
59
  # Get List
@@ -102,16 +66,7 @@ module JPSClient
102
66
 
103
67
  path = config["url"]
104
68
 
105
- response = @http_client.get(path, params: params)
106
- result = JPSClient::Response.new(response)
107
-
108
- if result.need_login?
109
- do_login(force_login: true)
110
- response = @http_client.get(path, params: params)
111
- result = JPSClient::Response.new(response)
112
- end
113
-
114
- return result.to_h
69
+ return request_with_auth(:get, path, params: params)
115
70
  end
116
71
 
117
72
  # Get Detail
@@ -124,16 +79,7 @@ module JPSClient
124
79
 
125
80
  path = config["url"]
126
81
 
127
- response = @http_client.get(path, params: params)
128
- result = JPSClient::Response.new(response)
129
-
130
- if result.need_login?
131
- do_login(force_login: true)
132
- response = @http_client.get(path, params: params)
133
- result = JPSClient::Response.new(response)
134
- end
135
-
136
- return result.to_h
82
+ return request_with_auth(:get, path, params: params)
137
83
  end
138
84
  end
139
85
  end
@@ -24,17 +24,7 @@ module JPSClient
24
24
  }
25
25
  params[:appleDevAccount] = apple_dev_account if apple_dev_account
26
26
 
27
- response = @http_client.get(path, params: params)
28
- result = JPSClient::Response.new(response)
29
-
30
- # 401 重试机制
31
- if result.need_login?
32
- do_login(force_login: true)
33
- response = @http_client.get(path, params: params)
34
- result = JPSClient::Response.new(response)
35
- end
36
-
37
- return result.to_h
27
+ return request_with_auth(:get, path, params: params)
38
28
  end
39
29
  end
40
30
  end
@@ -30,17 +30,7 @@ module JPSClient
30
30
  params[:platform] = platform if platform
31
31
  params[:profileType] = profile_type if profile_type
32
32
 
33
- response = @http_client.get(path, params: params)
34
- result = JPSClient::Response.new(response)
35
-
36
- # 401 重试机制
37
- if result.need_login?
38
- do_login(force_login: true)
39
- response = @http_client.get(path, params: params)
40
- result = JPSClient::Response.new(response)
41
- end
42
-
43
- return result.to_h
33
+ return request_with_auth(:get, path, params: params)
44
34
  end
45
35
  end
46
36
  end
@@ -30,17 +30,7 @@ module JPSClient
30
30
  params[:bundleIds] = bundle_ids if bundle_ids
31
31
  params[:profileType] = profile_type if profile_type
32
32
 
33
- response = @http_client.get(path, params: params)
34
- result = JPSClient::Response.new(response)
35
-
36
- # 401 重试机制
37
- if result.need_login?
38
- do_login(force_login: true)
39
- response = @http_client.get(path, params: params)
40
- result = JPSClient::Response.new(response)
41
- end
42
-
43
- return result.to_h
33
+ return request_with_auth(:get, path, params: params)
44
34
  end
45
35
  end
46
36
  end