app_store_connect 0.27.0 → 0.29.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45425b434a35955966a6cd767f068b456b461973b7b3f02a7b9ea45ee23bd062
4
- data.tar.gz: 56488bb97676d975e67e5051e48e89e5db42a53ef4abae1c48dd05f02e978da8
3
+ metadata.gz: b78497fdd27700d7861fd0c5e2e938bff62ee593d3ef05f65d37a1eda82d0312
4
+ data.tar.gz: 3a9dc6414f7a7bc6ac53f71a5fd94baeba7018e4ed37909adfd1e480cd171204
5
5
  SHA512:
6
- metadata.gz: b8a15f4694d9352aa2ebee78ca9cb6b92d334e75fb5727fdf7ba8021d88c4be99ad877eccb54a1d980accb843e949249935e48f4dcbbeb7830959c13acdacaef
7
- data.tar.gz: ebba0fb270d092834e23392d4009b28ab134053e11fd59273276bac296934d54765f583e8636c2d9faa6f7b83c1510dd6fed5f537d43dc8035f259eb3e71f102
6
+ metadata.gz: 1a7ea18cca34409facbc377959a21243226dd7e53be5cf28db001cc0271b902b054c9c6b82494ac38217a28995dba93ac957e5ac928de72bcf8798c4bf8c198f
7
+ data.tar.gz: 18d57653aa3a0c14d7a15017cdab703cfb9bb853788c2bd6b84f1a3036afb8ee2c67d1d0d61f15cdd026a8289b576c2e9a194bea19aa22532bb54ca0709e718f
@@ -0,0 +1,3 @@
1
+ ---
2
+
3
+ github: kyledecot
@@ -143,7 +143,7 @@ jobs:
143
143
  - name: Upload Release Asset
144
144
  uses: actions/upload-release-asset@v1
145
145
  env:
146
- GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKENt }}
146
+ GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
147
147
  with:
148
148
  upload_url: ${{ steps.create_release.outputs.upload_url }}
149
149
  asset_path: app_store_connect-${{ env.APP_STORE_CONNECT_VERSION }}.gem
data/README.md CHANGED
@@ -7,25 +7,29 @@ A Ruby interface to the [App Store Connect API](https://developer.apple.com/app-
7
7
 
8
8
  Add this line to your application's Gemfile:
9
9
 
10
- ```ruby
10
+ ```Ruby
11
11
  gem 'app_store_connect'
12
12
  ```
13
13
 
14
14
  And then execute:
15
15
 
16
- $ bundle
16
+ ```Bash
17
+ $ bundle
18
+ ```
17
19
 
18
20
  Or install it yourself as:
19
21
 
20
- $ gem install app_store_connect
22
+ ```Bash
23
+ $ gem install app_store_connect
24
+ ```
21
25
 
22
26
  ## Usage
23
27
 
24
- ```ruby
28
+ ```ruby
25
29
  AppStoreConnect.config = {
26
- issuer_id: issuer_id,
27
- key_id: key_id,
28
- private_key: private_key
30
+ issuer_id: 'issuer_id',
31
+ key_id: 'key_id',
32
+ private_key: File.read(File.new("/Path/AuthKey.p8"))
29
33
  }
30
34
 
31
35
  app_store_connect = AppStoreConnect::Client.new
@@ -58,6 +62,60 @@ app_store_connect.sales_reports(
58
62
  )
59
63
  ```
60
64
 
65
+ ### Fetch All Devices
66
+
67
+ ```ruby
68
+
69
+ fetchAllDevices = app_store_connect.devices
70
+ puts JSON.pretty_generate(fetchAllDevice)
71
+
72
+ ```
73
+
74
+ ### Register a New Device
75
+
76
+ ```ruby
77
+ result = app_store_connect.create_device(
78
+ name: 'name',
79
+ platform: 'IOS',
80
+ udid: 'udid'
81
+ )
82
+
83
+ puts JSON.pretty_generate(result)
84
+ ```
85
+
86
+ ### Update an App Store Version
87
+
88
+ ```ruby
89
+ app_store_connect.update_app_store_version id: '<app-store-version-id>', version_string: '1.0'
90
+ ```
91
+
92
+ ### Link a Build to an App Store Version
93
+
94
+ ```ruby
95
+ app_store_connect.update_app_store_version_build id: '<app-store-version-id>', build_id: '<build-id>'
96
+ ```
97
+
98
+ ### Create a Review Submission Item
99
+
100
+ ```ruby
101
+ app_store_connect.create_review_submission_item relationships: {reviewSubmission: {data: {id: '<review-submission-id>', type: 'reviewSubmissions'}},
102
+ appStoreVersion: {data: {id: '<app-store-version-id>', type: 'appStoreVersions'}}}
103
+ ```
104
+
105
+ ## Q&A
106
+
107
+ ### How to understand the `devices, sales_reports, create_bundle_id` keyword seen in the demo?
108
+
109
+ It's function key from `schema.json` file.
110
+
111
+ ### How to understand `()` in the demo, and when should use it? eg: `create_bundle_id()`, `sales_reports()`
112
+
113
+ `()` is mean: you have mapped to `http_body_type` in file `schema.json`
114
+
115
+ ### How to set this content in `()`
116
+
117
+ `http_body_type` have a value type. Based on this value, we can find the definition of the relevant configuration in the source code of ruby.
118
+
61
119
  ## Development
62
120
 
63
121
  After checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests. You can also run `rake console` for an interactive prompt that will allow you to experiment.
@@ -25,7 +25,6 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_runtime_dependency 'activesupport', '>= 6.0.0'
27
27
  spec.add_runtime_dependency 'jwt', '>= 1.4', '<= 2.5.0'
28
- spec.add_runtime_dependency 'mixpanel-ruby', '<= 2.2.0'
29
28
 
30
29
  spec.add_development_dependency 'bundler'
31
30
  spec.add_development_dependency 'factory_bot', '~> 6.2.1'
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'app_store_connect/create_request'
4
+
5
+ module AppStoreConnect
6
+ class AppStoreVersionPhasedReleaseCreateRequest < CreateRequest
7
+ data do
8
+ type 'appStoreVersionPhasedReleases'
9
+
10
+ attributes do
11
+ property :phased_release_state
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'app_store_connect/create_request'
4
+
5
+ module AppStoreConnect
6
+ class AppStoreVersionPhasedReleaseUpdateRequest < CreateRequest
7
+ data do
8
+ id
9
+ type 'appStoreVersionPhasedReleases'
10
+
11
+ attributes do
12
+ property :phased_release_state
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'app_store_connect/create_request'
4
+
5
+ module AppStoreConnect
6
+ class AppStoreVersionReleaseRequestCreateRequest < CreateRequest
7
+ data do
8
+ type 'appStoreVersionReleaseRequests'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'app_store_connect/create_request'
4
+
5
+ module AppStoreConnect
6
+ class BuildUpdateRequest < CreateRequest
7
+ data do
8
+ id
9
+ type 'builds'
10
+
11
+ attributes do
12
+ property :expired
13
+ property :uses_non_exempt_encryption
14
+ end
15
+ end
16
+ end
17
+ end
@@ -6,7 +6,6 @@ require 'app_store_connect/request'
6
6
  require 'app_store_connect/schema'
7
7
  require 'app_store_connect/client/authorization'
8
8
  require 'app_store_connect/client/options'
9
- require 'app_store_connect/client/usage'
10
9
  require 'app_store_connect/client/registry'
11
10
  require 'app_store_connect/client/utils'
12
11
 
@@ -14,7 +13,6 @@ module AppStoreConnect
14
13
  class Client
15
14
  def initialize(**kwargs)
16
15
  @options = Options.new(kwargs)
17
- @usage = Usage.new(@options.slice(*Usage::OPTIONS))
18
16
  @authorization = Authorization.new(@options.slice(*Authorization::OPTIONS))
19
17
  @registry = Registry.new(@options.slice(*Registry::OPTIONS))
20
18
  end
@@ -48,7 +46,6 @@ module AppStoreConnect
48
46
 
49
47
  request = build_request(web_service_endpoint, **kwargs)
50
48
 
51
- @usage.track
52
49
  response = request.execute
53
50
 
54
51
  Utils.decode(response.body, response.content_type) if response.body
@@ -28,7 +28,7 @@ module AppStoreConnect
28
28
  type: type
29
29
  }
30
30
  props[:id] = @id if id?
31
- props.compact
31
+ props.reject { |_k, v| v.blank? }
32
32
  end
33
33
  end
34
34
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppStoreConnect
4
- VERSION = '0.27.0'
4
+ VERSION = '0.29.0'
5
5
  end
@@ -10,7 +10,10 @@ require 'app_store_connect/version'
10
10
 
11
11
  require 'app_store_connect/app_store_version_build_linkage_request'
12
12
  require 'app_store_connect/app_store_version_create_request'
13
+ require 'app_store_connect/app_store_version_phased_release_create_request'
14
+ require 'app_store_connect/app_store_version_phased_release_update_request'
13
15
  require 'app_store_connect/app_store_version_update_request'
16
+ require 'app_store_connect/build_update_request'
14
17
  require 'app_store_connect/bundle_id_capability_create_request'
15
18
  require 'app_store_connect/bundle_id_create_request'
16
19
  require 'app_store_connect/certificate_create_request'
@@ -673,6 +673,13 @@
673
673
  "alias": "beta_app_review_submission_build"
674
674
  },
675
675
 
676
+ {
677
+ "http_method": "patch",
678
+ "url": "https://api.appstoreconnect.apple.com/v1/builds/{id}",
679
+ "http_body_type": "BuildUpdateRequest",
680
+ "alias": "update_build"
681
+ },
682
+
676
683
  {
677
684
  "url": "https://api.appstoreconnect.apple.com/v1/appStoreVersions",
678
685
  "http_body_type": "AppStoreVersionCreateRequest",
@@ -707,6 +714,31 @@
707
714
  "alias": "app_store_version"
708
715
  },
709
716
 
717
+ {
718
+ "url": "https://api.appstoreconnect.apple.com/v1/appStoreVersionReleaseRequests",
719
+ "http_body_type": "AppStoreVersionReleaseRequestCreateRequest",
720
+ "http_method": "post",
721
+ "alias": "create_app_store_version_release_request"
722
+ },
723
+
724
+ {
725
+ "url": "https://api.appstoreconnect.apple.com/v1/appStoreVersionPhasedReleases",
726
+ "http_body_type": "AppStoreVersionPhasedReleaseCreateRequest",
727
+ "http_method": "post",
728
+ "alias": "create_app_store_version_phased_release"
729
+ },
730
+ {
731
+ "http_method": "patch",
732
+ "url": "https://api.appstoreconnect.apple.com/v1/appStoreVersionPhasedReleases/{id}",
733
+ "http_body_type": "AppStoreVersionPhasedReleaseUpdateRequest",
734
+ "alias": "update_app_store_version_phased_release"
735
+ },
736
+ {
737
+ "http_method": "delete",
738
+ "url": "https://api.appstoreconnect.apple.com/v1/appStoreVersionPhasedReleases/{id}",
739
+ "alias": "delete_app_store_version_phased_release"
740
+ },
741
+
710
742
  {
711
743
  "url": "https://api.appstoreconnect.apple.com/v1/reviewSubmissions",
712
744
  "http_body_type": "ReviewSubmissionCreateRequest",
@@ -736,7 +768,7 @@
736
768
  },
737
769
 
738
770
  {
739
- "url": "https://api.appstoreconnect.apple.com/v1/reviewSubmissionsItems",
771
+ "url": "https://api.appstoreconnect.apple.com/v1/reviewSubmissionItems",
740
772
  "http_body_type": "ReviewSubmissionItemCreateRequest",
741
773
  "http_method": "post",
742
774
  "alias": "create_review_submission_item"
@@ -803,6 +835,15 @@
803
835
  "TV_OS"
804
836
  ]
805
837
  },
838
+ {
839
+ "type": "PhasedReleaseState",
840
+ "values": [
841
+ "INACTIVE",
842
+ "ACTIVE",
843
+ "PAUSED",
844
+ "COMPLETE"
845
+ ]
846
+ },
806
847
  {
807
848
  "type": "UserRole",
808
849
  "values": [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_store_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Decot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-30 00:00:00.000000000 Z
11
+ date: 2022-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,20 +44,6 @@ dependencies:
44
44
  - - "<="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.5.0
47
- - !ruby/object:Gem::Dependency
48
- name: mixpanel-ruby
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "<="
52
- - !ruby/object:Gem::Version
53
- version: 2.2.0
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "<="
59
- - !ruby/object:Gem::Version
60
- version: 2.2.0
61
47
  - !ruby/object:Gem::Dependency
62
48
  name: bundler
63
49
  requirement: !ruby/object:Gem::Requirement
@@ -219,6 +205,7 @@ executables: []
219
205
  extensions: []
220
206
  extra_rdoc_files: []
221
207
  files:
208
+ - ".github/FUNDING.yml"
222
209
  - ".github/ISSUE_TEMPLATE/bug_report.md"
223
210
  - ".github/ISSUE_TEMPLATE/feature_request.md"
224
211
  - ".github/workflows/default.yml"
@@ -236,7 +223,11 @@ files:
236
223
  - lib/app_store_connect.rb
237
224
  - lib/app_store_connect/app_store_version_build_linkage_request.rb
238
225
  - lib/app_store_connect/app_store_version_create_request.rb
226
+ - lib/app_store_connect/app_store_version_phased_release_create_request.rb
227
+ - lib/app_store_connect/app_store_version_phased_release_update_request.rb
228
+ - lib/app_store_connect/app_store_version_release_request_create_request.rb
239
229
  - lib/app_store_connect/app_store_version_update_request.rb
230
+ - lib/app_store_connect/build_update_request.rb
240
231
  - lib/app_store_connect/bundle_id_capability_create_request.rb
241
232
  - lib/app_store_connect/bundle_id_create_request.rb
242
233
  - lib/app_store_connect/certificate_create_request.rb
@@ -244,7 +235,6 @@ files:
244
235
  - lib/app_store_connect/client/authorization.rb
245
236
  - lib/app_store_connect/client/options.rb
246
237
  - lib/app_store_connect/client/registry.rb
247
- - lib/app_store_connect/client/usage.rb
248
238
  - lib/app_store_connect/client/utils.rb
249
239
  - lib/app_store_connect/create_request.rb
250
240
  - lib/app_store_connect/device_create_request.rb
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mixpanel-ruby'
4
- require 'securerandom'
5
- require 'app_store_connect/version'
6
-
7
- module AppStoreConnect
8
- class Client
9
- class Usage
10
- OPTIONS = %i[analytics_enabled].freeze
11
-
12
- MIXPANEL_PROJECT_TOKEN = '1213f2b88b9b10b13d321f4c67a55ca8'
13
- private_constant :MIXPANEL_PROJECT_TOKEN
14
-
15
- def initialize(options = {})
16
- @enabled = options[:analytics_enabled].to_s == 'true'
17
- @distinct_id = SecureRandom.uuid
18
- @tracker = Mixpanel::Tracker.new(MIXPANEL_PROJECT_TOKEN)
19
- end
20
-
21
- def track
22
- return false unless @enabled
23
-
24
- @tracker.track(@distinct_id, 'usage', version: VERSION)
25
- end
26
- end
27
- end
28
- end