jpsclient 0.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 +7 -0
- data/LICENSE +21 -0
- data/bin/jpsclient +28 -0
- data/lib/jpsclient/api/app_level.rb +138 -0
- data/lib/jpsclient/api/app_resource.rb +164 -0
- data/lib/jpsclient/api/app_resource_version.rb +52 -0
- data/lib/jpsclient/api/apple_account.rb +140 -0
- data/lib/jpsclient/api/application.rb +268 -0
- data/lib/jpsclient/api/application_category.rb +120 -0
- data/lib/jpsclient/api/application_design.rb +118 -0
- data/lib/jpsclient/api/application_income.rb +54 -0
- data/lib/jpsclient/api/application_sales.rb +52 -0
- data/lib/jpsclient/api/application_version.rb +77 -0
- data/lib/jpsclient/api/assets_category.rb +120 -0
- data/lib/jpsclient/api/bug.rb +140 -0
- data/lib/jpsclient/api/cert.rb +27 -0
- data/lib/jpsclient/api/client.rb +268 -0
- data/lib/jpsclient/api/collect.rb +52 -0
- data/lib/jpsclient/api/collection.rb +162 -0
- data/lib/jpsclient/api/commit_log.rb +104 -0
- data/lib/jpsclient/api/creative.rb +52 -0
- data/lib/jpsclient/api/custom_application.rb +230 -0
- data/lib/jpsclient/api/custom_application_web.rb +52 -0
- data/lib/jpsclient/api/document_text.rb +30 -0
- data/lib/jpsclient/api/experience.rb +143 -0
- data/lib/jpsclient/api/experience_category.rb +97 -0
- data/lib/jpsclient/api/fgui_export.rb +52 -0
- data/lib/jpsclient/api/file.rb +84 -0
- data/lib/jpsclient/api/game_assets.rb +140 -0
- data/lib/jpsclient/api/healthy.rb +30 -0
- data/lib/jpsclient/api/icon_and_snapshot.rb +54 -0
- data/lib/jpsclient/api/idea.rb +121 -0
- data/lib/jpsclient/api/jssdk.rb +30 -0
- data/lib/jpsclient/api/lark_bitable.rb +30 -0
- data/lib/jpsclient/api/lark_chat_group.rb +30 -0
- data/lib/jpsclient/api/lark_comment.rb +118 -0
- data/lib/jpsclient/api/lark_task.rb +140 -0
- data/lib/jpsclient/api/lark_task_list.rb +118 -0
- data/lib/jpsclient/api/lark_task_section.rb +74 -0
- data/lib/jpsclient/api/lark_user.rb +30 -0
- data/lib/jpsclient/api/lark_wiki_node.rb +30 -0
- data/lib/jpsclient/api/lark_wiki_space.rb +30 -0
- data/lib/jpsclient/api/lazy_client.rb +290 -0
- data/lib/jpsclient/api/login.rb +96 -0
- data/lib/jpsclient/api/m3u8.rb +30 -0
- data/lib/jpsclient/api/menu.rb +143 -0
- data/lib/jpsclient/api/modular_client.rb +228 -0
- data/lib/jpsclient/api/project.rb +46 -0
- data/lib/jpsclient/api/project_package.rb +249 -0
- data/lib/jpsclient/api/publisher.rb +165 -0
- data/lib/jpsclient/api/publisher_category.rb +142 -0
- data/lib/jpsclient/api/publisher_group.rb +118 -0
- data/lib/jpsclient/api/publisher_group_category.rb +120 -0
- data/lib/jpsclient/api/requirements.rb +143 -0
- data/lib/jpsclient/api/requirements_category.rb +97 -0
- data/lib/jpsclient/api/resource_category.rb +120 -0
- data/lib/jpsclient/api/role.rb +165 -0
- data/lib/jpsclient/api/simple_search.rb +162 -0
- data/lib/jpsclient/api/sketch.rb +74 -0
- data/lib/jpsclient/api/sketch_category.rb +97 -0
- data/lib/jpsclient/api/sov.rb +30 -0
- data/lib/jpsclient/api/statistics.rb +30 -0
- data/lib/jpsclient/api/store.rb +30 -0
- data/lib/jpsclient/api/survey.rb +143 -0
- data/lib/jpsclient/api/survey_category.rb +97 -0
- data/lib/jpsclient/api/tag.rb +142 -0
- data/lib/jpsclient/api/tool.rb +121 -0
- data/lib/jpsclient/api/tool_category.rb +120 -0
- data/lib/jpsclient/api/trending.rb +30 -0
- data/lib/jpsclient/api/ud_id.rb +118 -0
- data/lib/jpsclient/api/user.rb +99 -0
- data/lib/jpsclient/api/util.rb +30 -0
- data/lib/jpsclient/api/video_cover.rb +30 -0
- data/lib/jpsclient/api/webhook.rb +118 -0
- data/lib/jpsclient/api/workflow.rb +118 -0
- data/lib/jpsclient/auth/auth.rb +676 -0
- data/lib/jpsclient/auth/token.rb +209 -0
- data/lib/jpsclient/base/api_config.rb +225 -0
- data/lib/jpsclient/base/exception.rb +5 -0
- data/lib/jpsclient/http/http_client.rb +148 -0
- data/lib/jpsclient/upload/upload_client.rb +334 -0
- data/lib/jpsclient/upload/upload_config.rb +128 -0
- data/lib/jpsclient/upload/upload_progress.rb +73 -0
- data/lib/jpsclient/utils/aes.rb +49 -0
- data/lib/jpsclient/utils/logger.rb +38 -0
- data/lib/jpsclient/version.rb +3 -0
- data/lib/jpsclient.rb +34 -0
- metadata +269 -0
@@ -0,0 +1,268 @@
|
|
1
|
+
module JPSClient
|
2
|
+
module API
|
3
|
+
# 应用管理相关 API
|
4
|
+
# 处理 /api/application/* 路径的所有接口
|
5
|
+
module Application
|
6
|
+
|
7
|
+
# 获取应用详情
|
8
|
+
#
|
9
|
+
# @param applicationId [Integer] 应用ID(必需)
|
10
|
+
# @return [Hash] API响应
|
11
|
+
def get_application_detail(applicationId:)
|
12
|
+
config = @request_config && @request_config["application_detail"]
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for application_detail" unless config && config["url"]
|
14
|
+
|
15
|
+
# 构建路径,替换路径参数
|
16
|
+
path = config["url"].gsub("{applicationId}", applicationId.to_s)
|
17
|
+
|
18
|
+
response = @http_client.get(path)
|
19
|
+
result = JPSClient::Response.new(response)
|
20
|
+
|
21
|
+
# 处理 401 错误,自动重新登录
|
22
|
+
if result.need_login?
|
23
|
+
do_login(force_login: true)
|
24
|
+
response = @http_client.get(path)
|
25
|
+
result = JPSClient::Response.new(response)
|
26
|
+
end
|
27
|
+
|
28
|
+
return result.to_h
|
29
|
+
end
|
30
|
+
|
31
|
+
# 更新应用信息
|
32
|
+
#
|
33
|
+
# @param applicationId [Integer] 应用ID(必需)
|
34
|
+
# @param params [Hash] 更新参数
|
35
|
+
# @return [Hash] API响应
|
36
|
+
def update_application(applicationId:, params: {})
|
37
|
+
config = @request_config && @request_config["application_update"]
|
38
|
+
raise JPSClient::ExceptionError, "Missing config for application_update" unless config && config["url"]
|
39
|
+
|
40
|
+
path = config["url"].gsub("{applicationId}", applicationId.to_s)
|
41
|
+
|
42
|
+
response = @http_client.put(path, body: params)
|
43
|
+
result = JPSClient::Response.new(response)
|
44
|
+
|
45
|
+
if result.need_login?
|
46
|
+
do_login(force_login: true)
|
47
|
+
response = @http_client.put(path, body: params)
|
48
|
+
result = JPSClient::Response.new(response)
|
49
|
+
end
|
50
|
+
|
51
|
+
return result.to_h
|
52
|
+
end
|
53
|
+
|
54
|
+
# 删除应用
|
55
|
+
#
|
56
|
+
# @param applicationId [Integer] 应用ID(必需)
|
57
|
+
# @return [Hash] API响应
|
58
|
+
def delete_application(applicationId:)
|
59
|
+
config = @request_config && @request_config["application_delete"]
|
60
|
+
raise JPSClient::ExceptionError, "Missing config for application_delete" unless config && config["url"]
|
61
|
+
|
62
|
+
path = config["url"].gsub("{applicationId}", applicationId.to_s)
|
63
|
+
|
64
|
+
response = @http_client.delete(path)
|
65
|
+
result = JPSClient::Response.new(response)
|
66
|
+
|
67
|
+
if result.need_login?
|
68
|
+
do_login(force_login: true)
|
69
|
+
response = @http_client.delete(path)
|
70
|
+
result = JPSClient::Response.new(response)
|
71
|
+
end
|
72
|
+
|
73
|
+
return result.to_h
|
74
|
+
end
|
75
|
+
|
76
|
+
# 刷新应用
|
77
|
+
#
|
78
|
+
# @param applicationId [Integer] 应用ID(必需)
|
79
|
+
# @return [Hash] API响应
|
80
|
+
def refresh_application(applicationId:)
|
81
|
+
config = @request_config && @request_config["application_refresh"]
|
82
|
+
raise JPSClient::ExceptionError, "Missing config for application_refresh" unless config && config["url"]
|
83
|
+
|
84
|
+
path = config["url"].gsub("{applicationId}", applicationId.to_s)
|
85
|
+
|
86
|
+
response = @http_client.put(path)
|
87
|
+
result = JPSClient::Response.new(response)
|
88
|
+
|
89
|
+
if result.need_login?
|
90
|
+
do_login(force_login: true)
|
91
|
+
response = @http_client.put(path)
|
92
|
+
result = JPSClient::Response.new(response)
|
93
|
+
end
|
94
|
+
|
95
|
+
return result.to_h
|
96
|
+
end
|
97
|
+
|
98
|
+
# 获取分类下的应用列表
|
99
|
+
#
|
100
|
+
# @param categoryIdStr [String] 分类ID字符串(必需)
|
101
|
+
# @param params [Hash] 查询参数
|
102
|
+
# @return [Hash] API响应
|
103
|
+
def get_category_applications(categoryIdStr:, params: {})
|
104
|
+
config = @request_config && @request_config["category_applications"]
|
105
|
+
raise JPSClient::ExceptionError, "Missing config for category_applications" unless config && config["url"]
|
106
|
+
|
107
|
+
path = config["url"].gsub("{categoryIdStr}", categoryIdStr.to_s)
|
108
|
+
|
109
|
+
response = @http_client.post(path, body: params)
|
110
|
+
result = JPSClient::Response.new(response)
|
111
|
+
|
112
|
+
if result.need_login?
|
113
|
+
do_login(force_login: true)
|
114
|
+
response = @http_client.post(path, body: params)
|
115
|
+
result = JPSClient::Response.new(response)
|
116
|
+
end
|
117
|
+
|
118
|
+
return result.to_h
|
119
|
+
end
|
120
|
+
|
121
|
+
# 创建应用
|
122
|
+
#
|
123
|
+
# @param params [Hash] 应用信息参数
|
124
|
+
# @return [Hash] API响应
|
125
|
+
def create_application(params: {})
|
126
|
+
config = @request_config && @request_config["application_create"]
|
127
|
+
raise JPSClient::ExceptionError, "Missing config for application_create" unless config && config["url"]
|
128
|
+
path = config["url"]
|
129
|
+
|
130
|
+
response = @http_client.post(path, body: params)
|
131
|
+
result = JPSClient::Response.new(response)
|
132
|
+
|
133
|
+
if result.need_login?
|
134
|
+
do_login(force_login: true)
|
135
|
+
response = @http_client.post(path, body: params)
|
136
|
+
result = JPSClient::Response.new(response)
|
137
|
+
end
|
138
|
+
|
139
|
+
return result.to_h
|
140
|
+
end
|
141
|
+
|
142
|
+
# 更新应用权重
|
143
|
+
#
|
144
|
+
# @param params [Hash] 权重更新参数
|
145
|
+
# @return [Hash] API响应
|
146
|
+
def update_application_weights(params: {})
|
147
|
+
config = @request_config && @request_config["application_weights"]
|
148
|
+
raise JPSClient::ExceptionError, "Missing config for application_weights" unless config && config["url"]
|
149
|
+
path = config["url"]
|
150
|
+
|
151
|
+
response = @http_client.post(path, body: params)
|
152
|
+
result = JPSClient::Response.new(response)
|
153
|
+
|
154
|
+
if result.need_login?
|
155
|
+
do_login(force_login: true)
|
156
|
+
response = @http_client.post(path, body: params)
|
157
|
+
result = JPSClient::Response.new(response)
|
158
|
+
end
|
159
|
+
|
160
|
+
return result.to_h
|
161
|
+
end
|
162
|
+
|
163
|
+
# 获取应用排名
|
164
|
+
#
|
165
|
+
# @param params [Hash] 查询参数
|
166
|
+
# @return [Hash] API响应
|
167
|
+
def get_application_rankings(params: {})
|
168
|
+
config = @request_config && @request_config["application_rankings"]
|
169
|
+
raise JPSClient::ExceptionError, "Missing config for application_rankings" unless config && config["url"]
|
170
|
+
path = config["url"]
|
171
|
+
|
172
|
+
response = @http_client.post(path, body: params)
|
173
|
+
result = JPSClient::Response.new(response)
|
174
|
+
|
175
|
+
if result.need_login?
|
176
|
+
do_login(force_login: true)
|
177
|
+
response = @http_client.post(path, body: params)
|
178
|
+
result = JPSClient::Response.new(response)
|
179
|
+
end
|
180
|
+
|
181
|
+
return result.to_h
|
182
|
+
end
|
183
|
+
|
184
|
+
# 快速绑定应用
|
185
|
+
#
|
186
|
+
# @param params [Hash] 绑定参数
|
187
|
+
# @return [Hash] API响应
|
188
|
+
def fast_bind_application(params: {})
|
189
|
+
config = @request_config && @request_config["application_fast_bind"]
|
190
|
+
raise JPSClient::ExceptionError, "Missing config for application_fast_bind" unless config && config["url"]
|
191
|
+
path = config["url"]
|
192
|
+
|
193
|
+
response = @http_client.post(path, body: params)
|
194
|
+
result = JPSClient::Response.new(response)
|
195
|
+
|
196
|
+
if result.need_login?
|
197
|
+
do_login(force_login: true)
|
198
|
+
response = @http_client.post(path, body: params)
|
199
|
+
result = JPSClient::Response.new(response)
|
200
|
+
end
|
201
|
+
|
202
|
+
return result.to_h
|
203
|
+
end
|
204
|
+
|
205
|
+
# 获取 Lark 任务应用列表
|
206
|
+
#
|
207
|
+
# @param params [Hash] 查询参数
|
208
|
+
# @return [Hash] API响应
|
209
|
+
def get_lark_task_apps_list(params: {})
|
210
|
+
config = @request_config && @request_config["lark_task_apps_list"]
|
211
|
+
raise JPSClient::ExceptionError, "Missing config for lark_task_apps_list" unless config && config["url"]
|
212
|
+
path = config["url"]
|
213
|
+
|
214
|
+
response = @http_client.get(path, params: params)
|
215
|
+
result = JPSClient::Response.new(response)
|
216
|
+
|
217
|
+
if result.need_login?
|
218
|
+
do_login(force_login: true)
|
219
|
+
response = @http_client.get(path, params: params)
|
220
|
+
result = JPSClient::Response.new(response)
|
221
|
+
end
|
222
|
+
|
223
|
+
return result.to_h
|
224
|
+
end
|
225
|
+
|
226
|
+
# 获取设计师列表
|
227
|
+
#
|
228
|
+
# @return [Hash] API响应
|
229
|
+
def get_designers
|
230
|
+
config = @request_config && @request_config["designers_list"]
|
231
|
+
raise JPSClient::ExceptionError, "Missing config for designers_list" unless config && config["url"]
|
232
|
+
path = config["url"]
|
233
|
+
|
234
|
+
response = @http_client.get(path)
|
235
|
+
result = JPSClient::Response.new(response)
|
236
|
+
|
237
|
+
if result.need_login?
|
238
|
+
do_login(force_login: true)
|
239
|
+
response = @http_client.get(path)
|
240
|
+
result = JPSClient::Response.new(response)
|
241
|
+
end
|
242
|
+
|
243
|
+
return result.to_h
|
244
|
+
end
|
245
|
+
|
246
|
+
# 获取应用商店分类
|
247
|
+
#
|
248
|
+
# @return [Hash] API响应
|
249
|
+
def get_appstore_categories
|
250
|
+
config = @request_config && @request_config["appstore_categories"]
|
251
|
+
raise JPSClient::ExceptionError, "Missing config for appstore_categories" unless config && config["url"]
|
252
|
+
path = config["url"]
|
253
|
+
|
254
|
+
response = @http_client.get(path)
|
255
|
+
result = JPSClient::Response.new(response)
|
256
|
+
|
257
|
+
if result.need_login?
|
258
|
+
do_login(force_login: true)
|
259
|
+
response = @http_client.get(path)
|
260
|
+
result = JPSClient::Response.new(response)
|
261
|
+
end
|
262
|
+
|
263
|
+
return result.to_h
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
module JPSClient
|
2
|
+
module API
|
3
|
+
# ApplicationCategory 相关 API
|
4
|
+
# 自动生成的模块,处理 application_category 相关接口
|
5
|
+
module ApplicationCategory
|
6
|
+
|
7
|
+
# Update Application Category
|
8
|
+
#
|
9
|
+
# @param params [Hash] 请求参数
|
10
|
+
# @return [Hash] API响应
|
11
|
+
def update_application_category(categoryId:, params: {})
|
12
|
+
config = @request_config && @request_config["application_category_application_category"]
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for application_category_application_category" unless config && config["url"]
|
14
|
+
|
15
|
+
path = config["url"]
|
16
|
+
path = path.gsub("{categoryId}", categoryId.to_s)
|
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
|
28
|
+
end
|
29
|
+
|
30
|
+
# Create Application Category
|
31
|
+
#
|
32
|
+
# @param params [Hash] 请求参数
|
33
|
+
# @return [Hash] API响应
|
34
|
+
def create_application_category(params: {})
|
35
|
+
config = @request_config && @request_config["application_category_application_category"]
|
36
|
+
raise JPSClient::ExceptionError, "Missing config for application_category_application_category" unless config && config["url"]
|
37
|
+
|
38
|
+
path = config["url"]
|
39
|
+
|
40
|
+
response = @http_client.post(path, body: params)
|
41
|
+
result = JPSClient::Response.new(response)
|
42
|
+
|
43
|
+
if result.need_login?
|
44
|
+
do_login(force_login: true)
|
45
|
+
response = @http_client.post(path, body: params)
|
46
|
+
result = JPSClient::Response.new(response)
|
47
|
+
end
|
48
|
+
|
49
|
+
return result.to_h
|
50
|
+
end
|
51
|
+
|
52
|
+
# Create Weights
|
53
|
+
#
|
54
|
+
# @param params [Hash] 请求参数
|
55
|
+
# @return [Hash] API响应
|
56
|
+
def create_weights(params: {})
|
57
|
+
config = @request_config && @request_config["application_category_weights"]
|
58
|
+
raise JPSClient::ExceptionError, "Missing config for application_category_weights" unless config && config["url"]
|
59
|
+
|
60
|
+
path = config["url"]
|
61
|
+
|
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
|
72
|
+
end
|
73
|
+
|
74
|
+
# Create Application Categories
|
75
|
+
#
|
76
|
+
# @param params [Hash] 请求参数
|
77
|
+
# @return [Hash] API响应
|
78
|
+
def create_application_categories(params: {})
|
79
|
+
config = @request_config && @request_config["application_category_application_categories"]
|
80
|
+
raise JPSClient::ExceptionError, "Missing config for application_category_application_categories" unless config && config["url"]
|
81
|
+
|
82
|
+
path = config["url"]
|
83
|
+
|
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
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete Application Category
|
97
|
+
#
|
98
|
+
# @param params [Hash] 请求参数
|
99
|
+
# @return [Hash] API响应
|
100
|
+
def delete_application_category(categoryId:, params: {})
|
101
|
+
config = @request_config && @request_config["application_category_application_category"]
|
102
|
+
raise JPSClient::ExceptionError, "Missing config for application_category_application_category" unless config && config["url"]
|
103
|
+
|
104
|
+
path = config["url"]
|
105
|
+
path = path.gsub("{categoryId}", categoryId.to_s)
|
106
|
+
|
107
|
+
response = @http_client.delete(path)
|
108
|
+
result = JPSClient::Response.new(response)
|
109
|
+
|
110
|
+
if result.need_login?
|
111
|
+
do_login(force_login: true)
|
112
|
+
response = @http_client.delete(path)
|
113
|
+
result = JPSClient::Response.new(response)
|
114
|
+
end
|
115
|
+
|
116
|
+
return result.to_h
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
module JPSClient
|
2
|
+
module API
|
3
|
+
# ApplicationDesign 相关 API
|
4
|
+
# 自动生成的模块,处理 application_design 相关接口
|
5
|
+
module ApplicationDesign
|
6
|
+
|
7
|
+
# Create Import
|
8
|
+
#
|
9
|
+
# @param params [Hash] 请求参数
|
10
|
+
# @return [Hash] API响应
|
11
|
+
def create_import(params: {})
|
12
|
+
config = @request_config && @request_config["application_design_import"]
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for application_design_import" unless config && config["url"]
|
14
|
+
|
15
|
+
path = config["url"]
|
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
|
27
|
+
end
|
28
|
+
|
29
|
+
# Create Check
|
30
|
+
#
|
31
|
+
# @param params [Hash] 请求参数
|
32
|
+
# @return [Hash] API响应
|
33
|
+
def create_check(params: {})
|
34
|
+
config = @request_config && @request_config["application_design_check"]
|
35
|
+
raise JPSClient::ExceptionError, "Missing config for application_design_check" unless config && config["url"]
|
36
|
+
|
37
|
+
path = config["url"]
|
38
|
+
|
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
|
49
|
+
end
|
50
|
+
|
51
|
+
# Create Designs
|
52
|
+
#
|
53
|
+
# @param params [Hash] 请求参数
|
54
|
+
# @return [Hash] API响应
|
55
|
+
def create_designs(params: {})
|
56
|
+
config = @request_config && @request_config["application_design_designs"]
|
57
|
+
raise JPSClient::ExceptionError, "Missing config for application_design_designs" unless config && config["url"]
|
58
|
+
|
59
|
+
path = config["url"]
|
60
|
+
|
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
|
71
|
+
end
|
72
|
+
|
73
|
+
# Create Versions
|
74
|
+
#
|
75
|
+
# @param params [Hash] 请求参数
|
76
|
+
# @return [Hash] API响应
|
77
|
+
def create_versions(params: {})
|
78
|
+
config = @request_config && @request_config["application_design_versions"]
|
79
|
+
raise JPSClient::ExceptionError, "Missing config for application_design_versions" unless config && config["url"]
|
80
|
+
|
81
|
+
path = config["url"]
|
82
|
+
|
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
|
93
|
+
end
|
94
|
+
|
95
|
+
# Create Designs
|
96
|
+
#
|
97
|
+
# @param params [Hash] 请求参数
|
98
|
+
# @return [Hash] API响应
|
99
|
+
def create_designs(params: {})
|
100
|
+
config = @request_config && @request_config["application_design_designs"]
|
101
|
+
raise JPSClient::ExceptionError, "Missing config for application_design_designs" unless config && config["url"]
|
102
|
+
|
103
|
+
path = config["url"]
|
104
|
+
|
105
|
+
response = @http_client.post(path, body: params)
|
106
|
+
result = JPSClient::Response.new(response)
|
107
|
+
|
108
|
+
if result.need_login?
|
109
|
+
do_login(force_login: true)
|
110
|
+
response = @http_client.post(path, body: params)
|
111
|
+
result = JPSClient::Response.new(response)
|
112
|
+
end
|
113
|
+
|
114
|
+
return result.to_h
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module JPSClient
|
2
|
+
module API
|
3
|
+
# ApplicationIncome 相关 API
|
4
|
+
# 自动生成的模块,处理 application_income 相关接口
|
5
|
+
module ApplicationIncome
|
6
|
+
|
7
|
+
# Get Income Download Detail
|
8
|
+
#
|
9
|
+
# @param params [Hash] 请求参数
|
10
|
+
# @return [Hash] API响应
|
11
|
+
def get_income_download_detail(applicationId:, params: {})
|
12
|
+
config = @request_config && @request_config["application_income_income_download_detail"]
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for application_income_income_download_detail" unless config && config["url"]
|
14
|
+
|
15
|
+
path = config["url"]
|
16
|
+
path = path.gsub("{applicationId}", applicationId.to_s)
|
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
|
+
# Create Income Download
|
31
|
+
#
|
32
|
+
# @param params [Hash] 请求参数
|
33
|
+
# @return [Hash] API响应
|
34
|
+
def create_income_download(applicationId:, params: {})
|
35
|
+
config = @request_config && @request_config["application_income_income_download"]
|
36
|
+
raise JPSClient::ExceptionError, "Missing config for application_income_income_download" unless config && config["url"]
|
37
|
+
|
38
|
+
path = config["url"]
|
39
|
+
path = path.gsub("{applicationId}", applicationId.to_s)
|
40
|
+
|
41
|
+
response = @http_client.post(path, body: params)
|
42
|
+
result = JPSClient::Response.new(response)
|
43
|
+
|
44
|
+
if result.need_login?
|
45
|
+
do_login(force_login: true)
|
46
|
+
response = @http_client.post(path, body: params)
|
47
|
+
result = JPSClient::Response.new(response)
|
48
|
+
end
|
49
|
+
|
50
|
+
return result.to_h
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module JPSClient
|
2
|
+
module API
|
3
|
+
# ApplicationSales 相关 API
|
4
|
+
# 自动生成的模块,处理 application_sales 相关接口
|
5
|
+
module ApplicationSales
|
6
|
+
|
7
|
+
# Get Sales
|
8
|
+
#
|
9
|
+
# @param params [Hash] 请求参数
|
10
|
+
# @return [Hash] API响应
|
11
|
+
def get_sales(params: {})
|
12
|
+
config = @request_config && @request_config["application_sales_sales"]
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for application_sales_sales" 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
|
+
# Get Range
|
30
|
+
#
|
31
|
+
# @param params [Hash] 请求参数
|
32
|
+
# @return [Hash] API响应
|
33
|
+
def get_range(params: {})
|
34
|
+
config = @request_config && @request_config["application_sales_range"]
|
35
|
+
raise JPSClient::ExceptionError, "Missing config for application_sales_range" unless config && config["url"]
|
36
|
+
|
37
|
+
path = config["url"]
|
38
|
+
|
39
|
+
response = @http_client.get(path, params: params)
|
40
|
+
result = JPSClient::Response.new(response)
|
41
|
+
|
42
|
+
if result.need_login?
|
43
|
+
do_login(force_login: true)
|
44
|
+
response = @http_client.get(path, params: params)
|
45
|
+
result = JPSClient::Response.new(response)
|
46
|
+
end
|
47
|
+
|
48
|
+
return result.to_h
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module JPSClient
|
2
|
+
module API
|
3
|
+
# ApplicationVersion 相关 API
|
4
|
+
# 自动生成的模块,处理 application_version 相关接口
|
5
|
+
module ApplicationVersion
|
6
|
+
|
7
|
+
# Create Appversions
|
8
|
+
#
|
9
|
+
# @param params [Hash] 请求参数
|
10
|
+
# @return [Hash] API响应
|
11
|
+
def create_appversions(categoryIdStr:, params: {})
|
12
|
+
config = @request_config && @request_config["application_version_appversions"]
|
13
|
+
raise JPSClient::ExceptionError, "Missing config for application_version_appversions" unless config && config["url"]
|
14
|
+
|
15
|
+
path = config["url"]
|
16
|
+
path = path.gsub("{categoryIdStr}", categoryIdStr.to_s)
|
17
|
+
|
18
|
+
response = @http_client.post(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.post(path, body: params)
|
24
|
+
result = JPSClient::Response.new(response)
|
25
|
+
end
|
26
|
+
|
27
|
+
return result.to_h
|
28
|
+
end
|
29
|
+
|
30
|
+
# Get History Version Detail
|
31
|
+
#
|
32
|
+
# @param params [Hash] 请求参数
|
33
|
+
# @return [Hash] API响应
|
34
|
+
def get_history_version_detail(applicationId:, params: {})
|
35
|
+
config = @request_config && @request_config["application_version_history_version_detail"]
|
36
|
+
raise JPSClient::ExceptionError, "Missing config for application_version_history_version_detail" unless config && config["url"]
|
37
|
+
|
38
|
+
path = config["url"]
|
39
|
+
path = path.gsub("{applicationId}", applicationId.to_s)
|
40
|
+
|
41
|
+
response = @http_client.get(path, params: params)
|
42
|
+
result = JPSClient::Response.new(response)
|
43
|
+
|
44
|
+
if result.need_login?
|
45
|
+
do_login(force_login: true)
|
46
|
+
response = @http_client.get(path, params: params)
|
47
|
+
result = JPSClient::Response.new(response)
|
48
|
+
end
|
49
|
+
|
50
|
+
return result.to_h
|
51
|
+
end
|
52
|
+
|
53
|
+
# Get Change Record Detail
|
54
|
+
#
|
55
|
+
# @param params [Hash] 请求参数
|
56
|
+
# @return [Hash] API响应
|
57
|
+
def get_change_record_detail(applicationId:, params: {})
|
58
|
+
config = @request_config && @request_config["application_version_change_record_detail"]
|
59
|
+
raise JPSClient::ExceptionError, "Missing config for application_version_change_record_detail" unless config && config["url"]
|
60
|
+
|
61
|
+
path = config["url"]
|
62
|
+
path = path.gsub("{applicationId}", applicationId.to_s)
|
63
|
+
|
64
|
+
response = @http_client.get(path, params: params)
|
65
|
+
result = JPSClient::Response.new(response)
|
66
|
+
|
67
|
+
if result.need_login?
|
68
|
+
do_login(force_login: true)
|
69
|
+
response = @http_client.get(path, params: params)
|
70
|
+
result = JPSClient::Response.new(response)
|
71
|
+
end
|
72
|
+
|
73
|
+
return result.to_h
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|