jpsclient 1.9.0 → 2.0.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/apple_bundle_id.rb +41 -0
- data/lib/jpsclient/api/apple_cert.rb +47 -0
- data/lib/jpsclient/api/apple_profile.rb +47 -0
- data/lib/jpsclient/base/client.rb +6 -0
- data/lib/jpsclient/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2cb55abc5e7b33b8be8921945b41ec0aaddf3fe07a4ecc30bfaeee72ee8027b4
|
|
4
|
+
data.tar.gz: 8fcc0a3bb24bdbb3b3d815fcf4a1f74f0b37270ec78f4d777488f7154f30d7b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e1f7da044d1670975cdb8da2cca04b364f41e5d9863afffd0b15591dcc556cdd3a5f975a404d8ff078ca82ad06638605eee7214c3734bbc9e333644ec7822e2
|
|
7
|
+
data.tar.gz: 54c5c0a31999afcfd885e95eb302deea981d1ccaeaf862702ab2761ed97ca6dee1a16bb8eeb60b7b29c085af2a2ab5925e87952857d20f995ec6389676a62b29
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# AppleBundleId 相关 API
|
|
4
|
+
# 处理苹果 Bundle ID 相关接口
|
|
5
|
+
module AppleBundleId
|
|
6
|
+
|
|
7
|
+
# Get Apple Bundle ID List
|
|
8
|
+
# 获取苹果 Bundle ID 列表
|
|
9
|
+
#
|
|
10
|
+
# @param apple_dev_account [String] 苹果开发者账号(可选)
|
|
11
|
+
# @param page_no [Integer] 当前页数(必填)
|
|
12
|
+
# @param page_size [Integer] 每页记录数(必填)
|
|
13
|
+
# @return [Hash] API响应,包含 appleBundleIds 数组和 total 总数
|
|
14
|
+
def get_apple_bundle_id_list(apple_dev_account: nil, page_no:, page_size:)
|
|
15
|
+
config = @request_config && @request_config["apple_bundle_id_list"]
|
|
16
|
+
raise JPSClient::ExceptionError, "Missing config for apple_bundle_id_list" unless config && config["url"]
|
|
17
|
+
|
|
18
|
+
path = config["url"]
|
|
19
|
+
|
|
20
|
+
# 构建请求参数
|
|
21
|
+
params = {
|
|
22
|
+
pageNo: page_no,
|
|
23
|
+
pageSize: page_size
|
|
24
|
+
}
|
|
25
|
+
params[:appleDevAccount] = apple_dev_account if apple_dev_account
|
|
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
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# AppleCert 相关 API
|
|
4
|
+
# 处理苹果证书相关接口
|
|
5
|
+
module AppleCert
|
|
6
|
+
|
|
7
|
+
# Get Apple Cert List
|
|
8
|
+
# 获取苹果证书列表
|
|
9
|
+
#
|
|
10
|
+
# @param apple_dev_account [String] 苹果开发者账号(可选)
|
|
11
|
+
# @param bundle_id [String] Bundle ID(可选)
|
|
12
|
+
# @param platform [String] 平台类型(可选): IOS, MAC_OS
|
|
13
|
+
# @param profile_type [String] 描述文件类型(可选): IOS_APP_DEVELOPMENT, MAC_APP_DEVELOPMENT, IOS_APP_ADHOC, IOS_APP_STORE, MAC_APP_DIRECT
|
|
14
|
+
# @param page_no [Integer] 当前页数(必填)
|
|
15
|
+
# @param page_size [Integer] 每页记录数(必填)
|
|
16
|
+
# @return [Hash] API响应,包含 appleCerts 数组和 total 总数
|
|
17
|
+
def get_apple_cert_list(apple_dev_account: nil, bundle_id: nil, platform: nil, profile_type: nil, page_no:, page_size:)
|
|
18
|
+
config = @request_config && @request_config["apple_cert_list"]
|
|
19
|
+
raise JPSClient::ExceptionError, "Missing config for apple_cert_list" unless config && config["url"]
|
|
20
|
+
|
|
21
|
+
path = config["url"]
|
|
22
|
+
|
|
23
|
+
# 构建请求参数
|
|
24
|
+
params = {
|
|
25
|
+
pageNo: page_no,
|
|
26
|
+
pageSize: page_size
|
|
27
|
+
}
|
|
28
|
+
params[:appleDevAccount] = apple_dev_account if apple_dev_account
|
|
29
|
+
params[:bundleId] = bundle_id if bundle_id
|
|
30
|
+
params[:platform] = platform if platform
|
|
31
|
+
params[:profileType] = profile_type if profile_type
|
|
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
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module JPSClient
|
|
2
|
+
module API
|
|
3
|
+
# AppleProfile 相关 API
|
|
4
|
+
# 处理苹果描述文件相关接口
|
|
5
|
+
module AppleProfile
|
|
6
|
+
|
|
7
|
+
# Get Apple Profile List
|
|
8
|
+
# 获取苹果描述文件列表
|
|
9
|
+
#
|
|
10
|
+
# @param apple_dev_account [String] 苹果开发者账号(可选)
|
|
11
|
+
# @param platform [String] 描述文件所属平台(可选): IOS, MAC_OS
|
|
12
|
+
# @param bundle_ids [Array<String>] 描述文件关联bundleId的identifier数组,例如: ["com.xxx.xxx", "com.yyy.yyy"](可选)
|
|
13
|
+
# @param profile_type [String] 描述文件类型(可选): IOS_APP_DEVELOPMENT, MAC_APP_DEVELOPMENT, IOS_APP_ADHOC, IOS_APP_STORE, MAC_APP_DIRECT
|
|
14
|
+
# @param page_no [Integer] 当前页数(必填)
|
|
15
|
+
# @param page_size [Integer] 每页记录数(必填)
|
|
16
|
+
# @return [Hash] API响应,包含 appleProfiles 数组和 total 总数
|
|
17
|
+
def get_apple_profile_list(apple_dev_account: nil, platform: nil, bundle_ids: nil, profile_type: nil, page_no:, page_size:)
|
|
18
|
+
config = @request_config && @request_config["apple_profile_list"]
|
|
19
|
+
raise JPSClient::ExceptionError, "Missing config for apple_profile_list" unless config && config["url"]
|
|
20
|
+
|
|
21
|
+
path = config["url"]
|
|
22
|
+
|
|
23
|
+
# 构建请求参数
|
|
24
|
+
params = {
|
|
25
|
+
pageNo: page_no,
|
|
26
|
+
pageSize: page_size
|
|
27
|
+
}
|
|
28
|
+
params[:appleDevAccount] = apple_dev_account if apple_dev_account
|
|
29
|
+
params[:platform] = platform if platform
|
|
30
|
+
params[:bundleIds] = bundle_ids if bundle_ids
|
|
31
|
+
params[:profileType] = profile_type if profile_type
|
|
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
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -13,6 +13,9 @@ require 'jpsclient/api/app_level'
|
|
|
13
13
|
require 'jpsclient/api/app_resource'
|
|
14
14
|
# require 'jpsclient/api/app_resource_version' # 已移除 - API不存在
|
|
15
15
|
require 'jpsclient/api/apple_account'
|
|
16
|
+
require 'jpsclient/api/apple_cert'
|
|
17
|
+
require 'jpsclient/api/apple_profile'
|
|
18
|
+
require 'jpsclient/api/apple_bundle_id'
|
|
16
19
|
require 'jpsclient/api/application'
|
|
17
20
|
# require 'jpsclient/api/application_category' # 已移除 - API不存在
|
|
18
21
|
require 'jpsclient/api/design' # 替代 application_design
|
|
@@ -99,6 +102,9 @@ module JPSClient
|
|
|
99
102
|
include API::AppResource
|
|
100
103
|
# include API::AppResourceVersion # 已移除 - API不存在
|
|
101
104
|
include API::AppleAccount
|
|
105
|
+
include API::AppleCert
|
|
106
|
+
include API::AppleProfile
|
|
107
|
+
include API::AppleBundleId
|
|
102
108
|
include API::Application
|
|
103
109
|
# include API::ApplicationCategory # 已移除 - API不存在
|
|
104
110
|
include API::Design # 替代 ApplicationDesign
|
data/lib/jpsclient/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jpsclient
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Your Name
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|
|
@@ -170,6 +170,9 @@ files:
|
|
|
170
170
|
- lib/jpsclient/api/app_level.rb
|
|
171
171
|
- lib/jpsclient/api/app_resource.rb
|
|
172
172
|
- lib/jpsclient/api/apple_account.rb
|
|
173
|
+
- lib/jpsclient/api/apple_bundle_id.rb
|
|
174
|
+
- lib/jpsclient/api/apple_cert.rb
|
|
175
|
+
- lib/jpsclient/api/apple_profile.rb
|
|
173
176
|
- lib/jpsclient/api/application.rb
|
|
174
177
|
- lib/jpsclient/api/application_income.rb
|
|
175
178
|
- lib/jpsclient/api/application_sales.rb
|
|
@@ -283,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
283
286
|
- !ruby/object:Gem::Version
|
|
284
287
|
version: '0'
|
|
285
288
|
requirements: []
|
|
286
|
-
rubygems_version:
|
|
289
|
+
rubygems_version: 4.0.3
|
|
287
290
|
specification_version: 4
|
|
288
291
|
summary: JPS Platform API Client with Full API Support
|
|
289
292
|
test_files: []
|