fastlane 2.148.0 → 2.150.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +86 -86
- data/deliver/lib/deliver.rb +0 -1
- data/deliver/lib/deliver/app_screenshot.rb +28 -27
- data/deliver/lib/deliver/options.rb +6 -11
- data/deliver/lib/deliver/runner.rb +7 -21
- data/deliver/lib/deliver/setup.rb +5 -30
- data/deliver/lib/deliver/submit_for_review.rb +155 -90
- data/deliver/lib/deliver/upload_metadata.rb +355 -143
- data/deliver/lib/deliver/upload_price_tier.rb +22 -8
- data/deliver/lib/deliver/upload_screenshots.rb +112 -37
- data/fastlane/lib/assets/s3_html_template.erb +1 -1
- data/fastlane/lib/fastlane/actions/docs/capture_android_screenshots.md +42 -2
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +77 -96
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +3 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -1
- data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
- data/fastlane/lib/fastlane/actions/hipchat.rb +1 -1
- data/fastlane/lib/fastlane/actions/set_changelog.rb +23 -20
- data/fastlane/lib/fastlane/actions/slack.rb +2 -2
- data/fastlane/lib/fastlane/actions/slather.rb +8 -1
- data/fastlane/lib/fastlane/actions/spm.rb +7 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +2 -33
- data/fastlane/lib/fastlane/documentation/actions_list.rb +1 -1
- data/fastlane/lib/fastlane/lane.rb +3 -3
- data/fastlane/lib/fastlane/plugins/plugin_manager.rb +1 -1
- data/fastlane/lib/fastlane/plugins/template/.github/workflows/test.yml +29 -0
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +22 -5
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/ControlCommand.swift +1 -0
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/Fastlane.swift +79 -22
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +3 -9
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/LaneFileProtocol.swift +2 -5
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/RubyCommand.swift +29 -6
- data/fastlane/swift/RubyCommandable.swift +1 -0
- data/fastlane/swift/Runner.swift +85 -13
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +2 -2
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +9 -1
- data/fastlane/swift/SocketClient.swift +76 -45
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +1 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -3
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +7 -0
- data/frameit/lib/frameit/device_types.rb +100 -100
- data/gym/lib/gym/options.rb +1 -1
- data/match/lib/match/nuke.rb +21 -16
- data/match/lib/match/storage/git_storage.rb +4 -0
- data/match/lib/match/storage/google_cloud_storage.rb +4 -0
- data/match/lib/match/storage/interface.rb +4 -0
- data/match/lib/match/storage/s3_storage.rb +4 -0
- data/produce/lib/produce/itunes_connect.rb +32 -21
- data/produce/lib/produce/options.rb +3 -3
- data/scan/lib/scan/options.rb +1 -1
- data/scan/lib/scan/test_result_parser.rb +9 -2
- data/sigh/lib/assets/resign.sh +7 -7
- data/snapshot/lib/assets/SnapshotHelper.swift +5 -5
- data/snapshot/lib/assets/SnapshotHelperXcode8.swift +3 -3
- data/snapshot/lib/snapshot/options.rb +11 -1
- data/snapshot/lib/snapshot/reports_generator.rb +8 -1
- data/snapshot/lib/snapshot/test_command_generator.rb +8 -3
- data/spaceship/lib/spaceship/.DS_Store +0 -0
- data/spaceship/lib/spaceship/client.rb +13 -4
- data/spaceship/lib/spaceship/connect_api.rb +25 -2
- data/spaceship/lib/spaceship/connect_api/client.rb +97 -31
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +66 -0
- data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +113 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +117 -3
- data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +66 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +38 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +77 -0
- data/spaceship/lib/spaceship/connect_api/models/app_preview_set.rb +71 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +81 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +97 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +101 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +51 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +182 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +86 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +40 -0
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/territory.rb +27 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +10 -3
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +33 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +832 -0
- data/spaceship/lib/spaceship/errors.rb +3 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +2 -2
- data/supply/lib/supply/client.rb +19 -0
- data/supply/lib/supply/reader.rb +16 -0
- metadata +50 -42
- data/deliver/lib/deliver/upload_assets.rb +0 -27
- data/snapshot/lib/snapshot/.options.rb.swp +0 -0
- data/snapshot/lib/snapshot/.test_command_generator_base.rb.swp +0 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppInfoLocalization
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :locale
|
8
|
+
attr_accessor :name
|
9
|
+
attr_accessor :subtitle
|
10
|
+
attr_accessor :privacy_policy_url
|
11
|
+
attr_accessor :privacy_policy_text
|
12
|
+
|
13
|
+
attr_mapping({
|
14
|
+
"locale" => "locale",
|
15
|
+
"name" => "name",
|
16
|
+
"subtitle" => "subtitle",
|
17
|
+
"privacyPolicyUrl" => "privacy_policy_url",
|
18
|
+
"privacyPolicyText" => "privacy_policy_text"
|
19
|
+
})
|
20
|
+
|
21
|
+
def self.type
|
22
|
+
return "appInfoLocalizations"
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# API
|
27
|
+
#
|
28
|
+
|
29
|
+
def update(attributes: nil)
|
30
|
+
Spaceship::ConnectAPI.patch_app_info_localization(app_info_localization_id: id, attributes: attributes)
|
31
|
+
end
|
32
|
+
|
33
|
+
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
34
|
+
Spaceship::ConnectAPI.delete_app_info_localization(app_info_localization_id: id)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
require_relative '../file_uploader'
|
3
|
+
|
4
|
+
module Spaceship
|
5
|
+
class ConnectAPI
|
6
|
+
class AppPreview
|
7
|
+
include Spaceship::ConnectAPI::Model
|
8
|
+
|
9
|
+
attr_accessor :file_size
|
10
|
+
attr_accessor :file_name
|
11
|
+
attr_accessor :source_file_checksum
|
12
|
+
attr_accessor :preview_frame_time_code
|
13
|
+
attr_accessor :mime_type
|
14
|
+
attr_accessor :video_url
|
15
|
+
attr_accessor :preview_image
|
16
|
+
attr_accessor :upload_operations
|
17
|
+
attr_accessor :asset_deliver_state
|
18
|
+
attr_accessor :upload
|
19
|
+
|
20
|
+
attr_mapping({
|
21
|
+
"fileSize" => "file_size",
|
22
|
+
"fileName" => "file_name",
|
23
|
+
"sourceFileChecksum" => "source_file_checksum",
|
24
|
+
"previewFrameTimeCode" => "preview_frame_time_code",
|
25
|
+
"mimeType" => "mime_type",
|
26
|
+
"videoUrl" => "video_url",
|
27
|
+
"previewImage" => "preview_image",
|
28
|
+
"uploadOperations" => "upload_operations",
|
29
|
+
"assetDeliveryState" => "asset_delivery_state",
|
30
|
+
"uploaded" => "uploaded"
|
31
|
+
})
|
32
|
+
|
33
|
+
def self.type
|
34
|
+
return "appPreviews"
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# API
|
39
|
+
#
|
40
|
+
|
41
|
+
def self.create(app_preview_set_id: nil, path: nil)
|
42
|
+
require 'faraday'
|
43
|
+
|
44
|
+
filename = File.basename(path)
|
45
|
+
filesize = File.size(path)
|
46
|
+
payload = File.binread(path)
|
47
|
+
|
48
|
+
post_attributes = {
|
49
|
+
fileSize: filesize,
|
50
|
+
fileName: filename
|
51
|
+
}
|
52
|
+
|
53
|
+
post_resp = Spaceship::ConnectAPI.post_app_preview(
|
54
|
+
app_preview_set_id: app_preview_set_id,
|
55
|
+
attributes: post_attributes
|
56
|
+
).to_models.first
|
57
|
+
|
58
|
+
upload_operation = post_resp.upload_operations.first
|
59
|
+
Spaceship::ConnectAPI::FileUploader.upload(upload_operation, payload)
|
60
|
+
|
61
|
+
patch_attributes = {
|
62
|
+
uploaded: true,
|
63
|
+
sourceFileChecksum: "checksum-holder"
|
64
|
+
}
|
65
|
+
|
66
|
+
Spaceship::ConnectAPI.patch_app_preview(
|
67
|
+
app_preview_id: post_resp.id,
|
68
|
+
attributes: patch_attributes
|
69
|
+
).to_models.first
|
70
|
+
end
|
71
|
+
|
72
|
+
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
73
|
+
Spaceship::ConnectAPI.delete_app_preview(app_preview_id: id)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
require_relative './app_preview'
|
3
|
+
|
4
|
+
module Spaceship
|
5
|
+
class ConnectAPI
|
6
|
+
class AppPreviewSet
|
7
|
+
include Spaceship::ConnectAPI::Model
|
8
|
+
|
9
|
+
attr_accessor :preview_type
|
10
|
+
|
11
|
+
attr_accessor :app_previews
|
12
|
+
|
13
|
+
module PreviewType
|
14
|
+
IPHONE_35 = "IPHONE_35"
|
15
|
+
IPHONE_40 = "IPHONE_40"
|
16
|
+
IPHONE_47 = "IPHONE_47"
|
17
|
+
IPHONE_55 = "IPHONE_55"
|
18
|
+
IPHONE_58 = "IPHONE_58"
|
19
|
+
IPHONE_65 = "IPHONE_65"
|
20
|
+
|
21
|
+
IPAD_97 = "IPAD_97"
|
22
|
+
IPAD_105 = "IPAD_105"
|
23
|
+
IPAD_PRO_3GEN_11 = "IPAD_PRO_3GEN_11"
|
24
|
+
IPAD_PRO_129 = "IPAD_PRO_129"
|
25
|
+
IPAD_PRO_3GEN_129 = "IPAD_PRO_3GEN_129"
|
26
|
+
|
27
|
+
DESKTOP = "DESKTOP"
|
28
|
+
|
29
|
+
ALL = [
|
30
|
+
IPHONE_35,
|
31
|
+
IPHONE_40,
|
32
|
+
IPHONE_47,
|
33
|
+
IPHONE_55,
|
34
|
+
IPHONE_58,
|
35
|
+
IPHONE_65,
|
36
|
+
|
37
|
+
IPAD_97,
|
38
|
+
IPAD_105,
|
39
|
+
IPAD_PRO_3GEN_11,
|
40
|
+
IPAD_PRO_129,
|
41
|
+
IPAD_PRO_3GEN_129,
|
42
|
+
|
43
|
+
DESKTOP
|
44
|
+
]
|
45
|
+
end
|
46
|
+
|
47
|
+
attr_mapping({
|
48
|
+
"previewType" => "preview_type",
|
49
|
+
|
50
|
+
"appPreviews" => "app_previews"
|
51
|
+
})
|
52
|
+
|
53
|
+
def self.type
|
54
|
+
return "appPreviewSets"
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# API
|
59
|
+
#
|
60
|
+
|
61
|
+
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
62
|
+
resp = Spaceship::ConnectAPI.get_app_preview_sets(filter: filter, includes: includes, limit: limit, sort: sort)
|
63
|
+
return resp.to_models
|
64
|
+
end
|
65
|
+
|
66
|
+
def upload_preview(path: nil)
|
67
|
+
return Spaceship::ConnectAPI::AppPreview.create(app_preview_set_id: id, path: path)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppPrice
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :start_date
|
8
|
+
|
9
|
+
attr_accessor :price_tier
|
10
|
+
|
11
|
+
attr_mapping({
|
12
|
+
"startDate" => "start_date",
|
13
|
+
|
14
|
+
"priceTier" => "price_tier"
|
15
|
+
})
|
16
|
+
|
17
|
+
def self.type
|
18
|
+
return "appPrices"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppReviewAttachment
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :file_name
|
8
|
+
attr_accessor :source_file_checksum
|
9
|
+
attr_accessor :upload_operations
|
10
|
+
attr_accessor :asset_delivery_state
|
11
|
+
attr_accessor :uploaded
|
12
|
+
|
13
|
+
attr_mapping({
|
14
|
+
"fileName" => "file_name",
|
15
|
+
"sourceFileChecksum" => "source_file_checksum",
|
16
|
+
"uploadOperations" => "upload_operations",
|
17
|
+
"assetDeliveryState" => "asset_delivery_state",
|
18
|
+
"uploaded" => "uploaded"
|
19
|
+
})
|
20
|
+
|
21
|
+
def self.type
|
22
|
+
return "appReviewAttachments"
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# API
|
27
|
+
#
|
28
|
+
|
29
|
+
def self.create(app_store_review_detail_id: nil, path: nil)
|
30
|
+
require 'faraday'
|
31
|
+
|
32
|
+
filename = File.basename(path)
|
33
|
+
filesize = File.size(path)
|
34
|
+
payload = File.binread(path)
|
35
|
+
|
36
|
+
post_attributes = {
|
37
|
+
fileSize: filesize,
|
38
|
+
fileName: filename
|
39
|
+
}
|
40
|
+
|
41
|
+
post_resp = Spaceship::ConnectAPI.post_app_review_attachment(app_store_review_detail_id: app_store_review_detail_id, attributes: post_attributes).to_models.first
|
42
|
+
|
43
|
+
# {
|
44
|
+
# "method": "PUT",
|
45
|
+
# "url": "https://some-url-apple-gives-us",
|
46
|
+
# "length": 57365,
|
47
|
+
# "offset": 0,
|
48
|
+
# "requestHeaders": [
|
49
|
+
# {
|
50
|
+
# "name": "Content-Type",
|
51
|
+
# "value": "image/png"
|
52
|
+
# }
|
53
|
+
# ]
|
54
|
+
# }
|
55
|
+
upload_operation = post_resp.upload_operations.first
|
56
|
+
|
57
|
+
headers = {}
|
58
|
+
upload_operation["requestHeaders"].each do |hash|
|
59
|
+
headers[hash["name"]] = hash["value"]
|
60
|
+
end
|
61
|
+
|
62
|
+
Faraday.put(
|
63
|
+
upload_operation["url"],
|
64
|
+
payload,
|
65
|
+
headers
|
66
|
+
)
|
67
|
+
|
68
|
+
patch_attributes = {
|
69
|
+
uploaded: true,
|
70
|
+
sourceFileChecksum: "checksum-holder"
|
71
|
+
}
|
72
|
+
|
73
|
+
Spaceship::ConnectAPI.patch_app_review_attachment(app_review_attachment_id: post_resp.id, attributes: patch_attributes).to_models.first
|
74
|
+
end
|
75
|
+
|
76
|
+
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
77
|
+
Spaceship::ConnectAPI.delete_app_review_attachment(app_review_attachment_id: id)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
require_relative '../file_uploader'
|
3
|
+
|
4
|
+
module Spaceship
|
5
|
+
class ConnectAPI
|
6
|
+
class AppScreenshot
|
7
|
+
include Spaceship::ConnectAPI::Model
|
8
|
+
|
9
|
+
attr_accessor :file_name
|
10
|
+
attr_accessor :source_file_checksum
|
11
|
+
attr_accessor :image_asset
|
12
|
+
attr_accessor :asset_token
|
13
|
+
attr_accessor :asset_type
|
14
|
+
attr_accessor :upload_operations
|
15
|
+
attr_accessor :asset_delivery_state
|
16
|
+
attr_accessor :uploaded
|
17
|
+
|
18
|
+
# "fileSize": 92542,
|
19
|
+
# "fileName": "ftl_3241d62418767c0aa9b889b020c4f8db_45455763d4aaf7b18ee0045bc787f3de.png",
|
20
|
+
# "sourceFileChecksum": "c237fd7852ed8f9285d16d9a28d2ec25",
|
21
|
+
# "imageAsset": {
|
22
|
+
# "templateUrl": "https://is4-ssl.mzstatic.com/image/thumb/Purple113/v4/61/18/68/61186886-b234-5bd0-1f4a-563124f18511/pr_source.png/{w}x{h}bb.{f}",
|
23
|
+
# "width": 2048,
|
24
|
+
# "height": 2732
|
25
|
+
# },
|
26
|
+
# "assetToken": "Purple113/v4/61/18/68/61186886-b234-5bd0-1f4a-563124f18511/pr_source.png",
|
27
|
+
# "assetType": "SortedJ99ScreenShot",
|
28
|
+
# "uploadOperations": null,
|
29
|
+
# "assetDeliveryState": {
|
30
|
+
# "errors": [],
|
31
|
+
# "warnings": null,
|
32
|
+
# "state": "COMPLETE"
|
33
|
+
# },
|
34
|
+
# "uploaded": null
|
35
|
+
|
36
|
+
# "assetDeliveryState": {
|
37
|
+
# "errors": [],
|
38
|
+
# "warnings": null,
|
39
|
+
# "state": "AWAITING_UPLOAD"
|
40
|
+
# },
|
41
|
+
|
42
|
+
# "assetDeliveryState": {
|
43
|
+
# "errors": [],
|
44
|
+
# "warnings": null,
|
45
|
+
# "state": "UPLOAD_COMPLETE"
|
46
|
+
# },
|
47
|
+
|
48
|
+
attr_mapping({
|
49
|
+
"fileName" => "file_name",
|
50
|
+
"sourceFileChecksum" => "source_file_checksum",
|
51
|
+
"imageAsset" => "image_asset",
|
52
|
+
"assetToken" => "asset_token",
|
53
|
+
"assetType" => "asset_type",
|
54
|
+
"uploadOperations" => "upload_operations",
|
55
|
+
"assetDeliveryState" => "asset_delivery_state",
|
56
|
+
"uploaded" => "uploaded"
|
57
|
+
})
|
58
|
+
|
59
|
+
def self.type
|
60
|
+
return "appScreenshots"
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# API
|
65
|
+
#
|
66
|
+
|
67
|
+
def self.create(app_screenshot_set_id: nil, path: nil)
|
68
|
+
require 'faraday'
|
69
|
+
|
70
|
+
filename = File.basename(path)
|
71
|
+
filesize = File.size(path)
|
72
|
+
payload = File.binread(path)
|
73
|
+
|
74
|
+
post_attributes = {
|
75
|
+
fileSize: filesize,
|
76
|
+
fileName: filename
|
77
|
+
}
|
78
|
+
|
79
|
+
post_resp = Spaceship::ConnectAPI.post_app_screenshot(app_screenshot_set_id: app_screenshot_set_id, attributes: post_attributes).to_models.first
|
80
|
+
|
81
|
+
upload_operation = post_resp.upload_operations.first
|
82
|
+
Spaceship::ConnectAPI::FileUploader.upload(upload_operation, payload)
|
83
|
+
|
84
|
+
patch_attributes = {
|
85
|
+
uploaded: true,
|
86
|
+
sourceFileChecksum: "checksum-holder"
|
87
|
+
}
|
88
|
+
|
89
|
+
Spaceship::ConnectAPI.patch_app_screenshot(app_screenshot_id: post_resp.id, attributes: patch_attributes).to_models.first
|
90
|
+
end
|
91
|
+
|
92
|
+
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
93
|
+
Spaceship::ConnectAPI.delete_app_screenshot(app_screenshot_id: id)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
require_relative './app_screenshot'
|
3
|
+
|
4
|
+
module Spaceship
|
5
|
+
class ConnectAPI
|
6
|
+
class AppScreenshotSet
|
7
|
+
include Spaceship::ConnectAPI::Model
|
8
|
+
|
9
|
+
attr_accessor :screenshot_display_type
|
10
|
+
|
11
|
+
attr_accessor :app_screenshots
|
12
|
+
|
13
|
+
module DisplayType
|
14
|
+
APP_IPHONE_35 = "APP_IPHONE_35"
|
15
|
+
APP_IPHONE_40 = "APP_IPHONE_40"
|
16
|
+
APP_IPHONE_47 = "APP_IPHONE_47"
|
17
|
+
APP_IPHONE_55 = "APP_IPHONE_55"
|
18
|
+
APP_IPHONE_58 = "APP_IPHONE_58"
|
19
|
+
APP_IPHONE_65 = "APP_IPHONE_65"
|
20
|
+
|
21
|
+
APP_IPAD_97 = "APP_IPAD_97"
|
22
|
+
APP_IPAD_105 = "APP_IPAD_105"
|
23
|
+
APP_IPAD_PRO_3GEN_11 = "APP_IPAD_PRO_3GEN_11"
|
24
|
+
APP_IPAD_PRO_129 = "APP_IPAD_PRO_129"
|
25
|
+
APP_IPAD_PRO_3GEN_129 = "APP_IPAD_PRO_3GEN_129"
|
26
|
+
|
27
|
+
IMESSAGE_APP_IPHONE_40 = "IMESSAGE_APP_IPHONE_40"
|
28
|
+
IMESSAGE_APP_IPHONE_47 = "IMESSAGE_APP_IPHONE_47"
|
29
|
+
IMESSAGE_APP_IPHONE_55 = "IMESSAGE_APP_IPHONE_55"
|
30
|
+
IMESSAGE_APP_IPHONE_58 = "IMESSAGE_APP_IPHONE_58"
|
31
|
+
IMESSAGE_APP_IPHONE_65 = "IMESSAGE_APP_IPHONE_65"
|
32
|
+
|
33
|
+
IMESSAGE_APP_IPAD_97 = "IMESSAGE_APP_IPAD_97"
|
34
|
+
IMESSAGE_APP_IPAD_105 = "IMESSAGE_APP_IPAD_105"
|
35
|
+
IMESSAGE_APP_IPAD_PRO_129 = "IMESSAGE_APP_IPAD_PRO_129"
|
36
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_11 = "IMESSAGE_APP_IPAD_PRO_3GEN_11"
|
37
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_129 = "IMESSAGE_APP_IPAD_PRO_3GEN_129"
|
38
|
+
|
39
|
+
APP_WATCH_SERIES_3 = "APP_WATCH_SERIES_3"
|
40
|
+
APP_WATCH_SERIES_4 = "APP_WATCH_SERIES_4"
|
41
|
+
|
42
|
+
APP_DESKTOP = "APP_DESKTOP"
|
43
|
+
|
44
|
+
ALL = [
|
45
|
+
APP_IPHONE_35,
|
46
|
+
APP_IPHONE_40,
|
47
|
+
APP_IPHONE_47,
|
48
|
+
APP_IPHONE_55,
|
49
|
+
APP_IPHONE_58,
|
50
|
+
APP_IPHONE_65,
|
51
|
+
|
52
|
+
APP_IPAD_97,
|
53
|
+
APP_IPAD_105,
|
54
|
+
APP_IPAD_PRO_3GEN_11,
|
55
|
+
APP_IPAD_PRO_129,
|
56
|
+
APP_IPAD_PRO_3GEN_129,
|
57
|
+
|
58
|
+
IMESSAGE_APP_IPHONE_40,
|
59
|
+
IMESSAGE_APP_IPHONE_47,
|
60
|
+
IMESSAGE_APP_IPHONE_55,
|
61
|
+
IMESSAGE_APP_IPHONE_58,
|
62
|
+
IMESSAGE_APP_IPHONE_65,
|
63
|
+
|
64
|
+
IMESSAGE_APP_IPAD_97,
|
65
|
+
IMESSAGE_APP_IPAD_105,
|
66
|
+
IMESSAGE_APP_IPAD_PRO_129,
|
67
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_11,
|
68
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_129,
|
69
|
+
|
70
|
+
APP_WATCH_SERIES_3,
|
71
|
+
APP_WATCH_SERIES_4,
|
72
|
+
|
73
|
+
APP_DESKTOP
|
74
|
+
]
|
75
|
+
end
|
76
|
+
|
77
|
+
attr_mapping({
|
78
|
+
"screenshotDisplayType" => "screenshot_display_type",
|
79
|
+
|
80
|
+
"appScreenshots" => "app_screenshots"
|
81
|
+
})
|
82
|
+
|
83
|
+
def self.type
|
84
|
+
return "appScreenshotSets"
|
85
|
+
end
|
86
|
+
|
87
|
+
#
|
88
|
+
# API
|
89
|
+
#
|
90
|
+
|
91
|
+
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
92
|
+
resp = Spaceship::ConnectAPI.get_app_screenshot_sets(filter: filter, includes: includes, limit: limit, sort: sort)
|
93
|
+
return resp.to_models
|
94
|
+
end
|
95
|
+
|
96
|
+
def upload_screenshot(path: nil)
|
97
|
+
return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|