app_store_dev_api 0.3.0 → 0.3.1
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/.DS_Store +0 -0
- data/.claude/settings.local.json +2 -19
- data/Gemfile +5 -0
- data/Gemfile.lock +6 -0
- data/docs/bundle_id_capabilities.md +382 -0
- data/docs/bundle_ids.md +417 -0
- data/docs/creating_api_keys.md +137 -0
- data/docs/generating_tokens.md +189 -0
- data/docs/openapi.oas4.3.json +230597 -0
- data/docs/pindo_usage_reference.md +234 -0
- data/docs/revoking_api_keys.md +118 -0
- data/install_local.sh +73 -62
- data/lib/.DS_Store +0 -0
- data/lib/app_store_dev_api/client/builder.rb +1 -1
- data/lib/app_store_dev_api/client/options.rb +1 -1
- data/lib/app_store_dev_api/client.rb +1 -1
- data/lib/app_store_dev_api/version.rb +1 -1
- data/lib/config/{schema_v4.2.json → schema_v4.3.json} +0 -10
- data/push_all.sh +6 -0
- data/release_remote.sh +27 -8
- data/scripts/comprehensive_validation.rb +1 -1
- data/scripts/final_validation_report.rb +1 -1
- data/test_library.rb +160 -0
- metadata +13 -4
data/test_library.rb
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'app_store_dev_api'
|
|
6
|
+
require 'json'
|
|
7
|
+
|
|
8
|
+
puts "=" * 60
|
|
9
|
+
puts "App Store Connect API Library Verification"
|
|
10
|
+
puts "=" * 60
|
|
11
|
+
puts
|
|
12
|
+
|
|
13
|
+
# 1. 验证库版本
|
|
14
|
+
puts "✅ Library Version: #{AppStoreDevApi::VERSION}"
|
|
15
|
+
puts
|
|
16
|
+
|
|
17
|
+
# 2. 验证Schema加载
|
|
18
|
+
begin
|
|
19
|
+
schema_path = File.join(File.dirname(__FILE__), 'lib', 'config', 'schema.json')
|
|
20
|
+
schema = AppStoreDevApi::Schema.new(schema_path)
|
|
21
|
+
|
|
22
|
+
puts "✅ Schema loaded successfully"
|
|
23
|
+
puts " - Web Service Endpoints: #{schema.web_service_endpoints.count}"
|
|
24
|
+
puts " - Object Definitions: #{schema.objects.count if schema.objects}"
|
|
25
|
+
puts " - Type Definitions: #{schema.types.count if schema.types}"
|
|
26
|
+
puts
|
|
27
|
+
rescue => e
|
|
28
|
+
puts "❌ Schema loading failed: #{e.message}"
|
|
29
|
+
puts
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# 3. 验证Client类存在和方法
|
|
33
|
+
begin
|
|
34
|
+
# 检查Client类是否存在
|
|
35
|
+
client_class = AppStoreDevApi::Client
|
|
36
|
+
puts "✅ Client class loaded"
|
|
37
|
+
|
|
38
|
+
# 统计生成的方法数量
|
|
39
|
+
public_methods = client_class.instance_methods(false)
|
|
40
|
+
puts " - Generated API methods: #{public_methods.count}"
|
|
41
|
+
|
|
42
|
+
# 列出一些示例方法
|
|
43
|
+
sample_methods = public_methods.take(10)
|
|
44
|
+
puts " - Sample methods:"
|
|
45
|
+
sample_methods.each do |method|
|
|
46
|
+
puts " • #{method}"
|
|
47
|
+
end
|
|
48
|
+
puts
|
|
49
|
+
rescue => e
|
|
50
|
+
puts "❌ Client class verification failed: #{e.message}"
|
|
51
|
+
puts
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# 4. 验证JWT Authorization
|
|
55
|
+
begin
|
|
56
|
+
auth_class = AppStoreDevApi::Client::Authorization
|
|
57
|
+
puts "✅ Authorization class loaded"
|
|
58
|
+
|
|
59
|
+
# 测试JWT生成(使用假密钥)
|
|
60
|
+
test_private_key = <<~KEY
|
|
61
|
+
-----BEGIN PRIVATE KEY-----
|
|
62
|
+
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQg4KANTE/K4xVIBSyo
|
|
63
|
+
ooq2XkJp0bJmZGwO0mi3Oys1tUygCgYIKoZIzj0DAQehRANCAARAWO+i8lqV6HhP
|
|
64
|
+
c7k4km4A9m0p7Cz3h5K3RfJo/eYsRAH3P6AzFxnbdAiPPPLv07s5IV9rEi0J9Xs2
|
|
65
|
+
O3/TpH1P
|
|
66
|
+
-----END PRIVATE KEY-----
|
|
67
|
+
KEY
|
|
68
|
+
|
|
69
|
+
auth = auth_class.new(
|
|
70
|
+
key_id: 'TEST_KEY_ID',
|
|
71
|
+
issuer_id: 'TEST_ISSUER_ID',
|
|
72
|
+
private_key: test_private_key
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
token = auth.token
|
|
76
|
+
puts " - JWT token generation: Success"
|
|
77
|
+
puts " - Token length: #{token.length} characters"
|
|
78
|
+
|
|
79
|
+
# 验证JWT结构
|
|
80
|
+
parts = token.split('.')
|
|
81
|
+
if parts.length == 3
|
|
82
|
+
puts " - JWT structure: Valid (header.payload.signature)"
|
|
83
|
+
else
|
|
84
|
+
puts " - JWT structure: Invalid"
|
|
85
|
+
end
|
|
86
|
+
puts
|
|
87
|
+
rescue => e
|
|
88
|
+
puts "❌ Authorization verification failed: #{e.message}"
|
|
89
|
+
puts
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# 5. 验证Request类
|
|
93
|
+
begin
|
|
94
|
+
request_modules = {
|
|
95
|
+
'V1::AppStoreVersion::Create' => AppStoreDevApi::Requests::V1::AppStoreVersion::Create,
|
|
96
|
+
'V1::Build::Update' => AppStoreDevApi::Requests::V1::Build::Update,
|
|
97
|
+
'V1::AppEvent::Create' => AppStoreDevApi::Requests::V1::AppEvent::Create,
|
|
98
|
+
'V1::AppScreenshot::Create' => AppStoreDevApi::Requests::V1::AppScreenshot::Create
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
puts "✅ Request classes verification:"
|
|
102
|
+
request_modules.each do |name, klass|
|
|
103
|
+
if defined?(klass)
|
|
104
|
+
puts " ✓ #{name}"
|
|
105
|
+
else
|
|
106
|
+
puts " ✗ #{name} not found"
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
puts
|
|
110
|
+
rescue => e
|
|
111
|
+
puts "❌ Request classes verification failed: #{e.message}"
|
|
112
|
+
puts
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# 6. 验证新添加的API端点
|
|
116
|
+
begin
|
|
117
|
+
schema_path = File.join(File.dirname(__FILE__), 'lib', 'config', 'schema.json')
|
|
118
|
+
schema_data = JSON.parse(File.read(schema_path))
|
|
119
|
+
|
|
120
|
+
new_endpoints = [
|
|
121
|
+
'get_app_perf_power_metrics',
|
|
122
|
+
'get_build_perf_power_metrics',
|
|
123
|
+
'create_app_event',
|
|
124
|
+
'create_app_event_video_clip',
|
|
125
|
+
'create_app_screenshot',
|
|
126
|
+
'create_routing_app_coverage'
|
|
127
|
+
]
|
|
128
|
+
|
|
129
|
+
existing_endpoints = schema_data['web_service_endpoints'].map { |e| e['alias'] }
|
|
130
|
+
|
|
131
|
+
puts "✅ New API endpoints verification:"
|
|
132
|
+
new_endpoints.each do |endpoint|
|
|
133
|
+
if existing_endpoints.include?(endpoint)
|
|
134
|
+
puts " ✓ #{endpoint}"
|
|
135
|
+
else
|
|
136
|
+
puts " ✗ #{endpoint} not found"
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
puts
|
|
140
|
+
rescue => e
|
|
141
|
+
puts "❌ New endpoints verification failed: #{e.message}"
|
|
142
|
+
puts
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# 总结
|
|
146
|
+
puts "=" * 60
|
|
147
|
+
puts "Verification Summary"
|
|
148
|
+
puts "=" * 60
|
|
149
|
+
puts "✅ Library is functional and ready to use!"
|
|
150
|
+
puts " - Version: #{AppStoreDevApi::VERSION}"
|
|
151
|
+
puts " - Ruby: #{RUBY_VERSION}"
|
|
152
|
+
puts " - Platform: #{RUBY_PLATFORM}"
|
|
153
|
+
puts
|
|
154
|
+
puts "To use the library:"
|
|
155
|
+
puts " client = AppStoreDevApi::Client.new("
|
|
156
|
+
puts " key_id: 'YOUR_KEY_ID',"
|
|
157
|
+
puts " issuer_id: 'YOUR_ISSUER_ID',"
|
|
158
|
+
puts " private_key: File.read('path/to/key.p8')"
|
|
159
|
+
puts " )"
|
|
160
|
+
puts
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: app_store_dev_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- wade
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-03-27 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -282,7 +282,14 @@ files:
|
|
|
282
282
|
- bin/.DS_Store
|
|
283
283
|
- bin/console
|
|
284
284
|
- bin/setup
|
|
285
|
+
- docs/bundle_id_capabilities.md
|
|
286
|
+
- docs/bundle_ids.md
|
|
287
|
+
- docs/creating_api_keys.md
|
|
288
|
+
- docs/generating_tokens.md
|
|
285
289
|
- docs/openapi.oas4.2.json
|
|
290
|
+
- docs/openapi.oas4.3.json
|
|
291
|
+
- docs/pindo_usage_reference.md
|
|
292
|
+
- docs/revoking_api_keys.md
|
|
286
293
|
- install_local.bat
|
|
287
294
|
- install_local.sh
|
|
288
295
|
- install_local_fixed.sh
|
|
@@ -590,7 +597,7 @@ files:
|
|
|
590
597
|
- lib/app_store_dev_api/specification/component/schema.rb
|
|
591
598
|
- lib/app_store_dev_api/version.rb
|
|
592
599
|
- lib/config/schema_backup.json
|
|
593
|
-
- lib/config/schema_v4.
|
|
600
|
+
- lib/config/schema_v4.3.json
|
|
594
601
|
- lib/tasks/build.rake
|
|
595
602
|
- lib/tasks/bundle.rake
|
|
596
603
|
- lib/tasks/changelog.rake
|
|
@@ -599,6 +606,7 @@ files:
|
|
|
599
606
|
- lib/tasks/push.rake
|
|
600
607
|
- lib/tasks/release.rake
|
|
601
608
|
- lib/tasks/version.rake
|
|
609
|
+
- push_all.sh
|
|
602
610
|
- release_remote.sh
|
|
603
611
|
- scripts/README.md
|
|
604
612
|
- scripts/cleanup_scripts.sh
|
|
@@ -609,6 +617,7 @@ files:
|
|
|
609
617
|
- scripts/test_request_body_classes.rb
|
|
610
618
|
- scripts/validate_requests.rb
|
|
611
619
|
- sig/app_store_connect_api.rbs
|
|
620
|
+
- test_library.rb
|
|
612
621
|
homepage: https://github.com/wade0317/app_store_dev_api.git.
|
|
613
622
|
licenses:
|
|
614
623
|
- MIT
|
|
@@ -630,7 +639,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
630
639
|
- !ruby/object:Gem::Version
|
|
631
640
|
version: '0'
|
|
632
641
|
requirements: []
|
|
633
|
-
rubygems_version:
|
|
642
|
+
rubygems_version: 3.6.3
|
|
634
643
|
specification_version: 4
|
|
635
644
|
summary: easy work for app_store_dev_api work
|
|
636
645
|
test_files: []
|