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,66 @@
|
|
1
|
+
require 'faraday' # HTTP Client
|
2
|
+
require 'faraday-cookie_jar'
|
3
|
+
require 'faraday_middleware'
|
4
|
+
|
5
|
+
module Spaceship
|
6
|
+
class ConnectAPI
|
7
|
+
module FileUploader
|
8
|
+
def self.upload(upload_operation, payload)
|
9
|
+
# {
|
10
|
+
# "method": "PUT",
|
11
|
+
# "url": "https://some-url-apple-gives-us",
|
12
|
+
# "length": 57365,
|
13
|
+
# "offset": 0,
|
14
|
+
# "requestHeaders": [
|
15
|
+
# {
|
16
|
+
# "name": "Content-Type",
|
17
|
+
# "value": "image/png"
|
18
|
+
# }
|
19
|
+
# ]
|
20
|
+
# }
|
21
|
+
|
22
|
+
headers = {}
|
23
|
+
upload_operation["requestHeaders"].each do |hash|
|
24
|
+
headers[hash["name"]] = hash["value"]
|
25
|
+
end
|
26
|
+
|
27
|
+
client.send(
|
28
|
+
upload_operation["method"].downcase,
|
29
|
+
upload_operation["url"],
|
30
|
+
payload,
|
31
|
+
headers
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.client
|
36
|
+
options = {
|
37
|
+
request: {
|
38
|
+
timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i,
|
39
|
+
open_timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
@client ||= Faraday.new(options) do |c|
|
44
|
+
c.response(:json, content_type: /\bjson$/)
|
45
|
+
c.response(:xml, content_type: /\bxml$/)
|
46
|
+
c.response(:plist, content_type: /\bplist$/)
|
47
|
+
c.adapter(Faraday.default_adapter)
|
48
|
+
|
49
|
+
if ENV['SPACESHIP_DEBUG']
|
50
|
+
# for debugging only
|
51
|
+
# This enables tracking of networking requests using Charles Web Proxy
|
52
|
+
c.proxy = "https://127.0.0.1:8888"
|
53
|
+
c.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
|
54
|
+
elsif ENV["SPACESHIP_PROXY"]
|
55
|
+
c.proxy = ENV["SPACESHIP_PROXY"]
|
56
|
+
c.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE if ENV["SPACESHIP_PROXY_SSL_VERIFY_NONE"]
|
57
|
+
end
|
58
|
+
|
59
|
+
if ENV["DEBUG"]
|
60
|
+
puts("To run spaceship through a local proxy, use SPACESHIP_DEBUG")
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AgeRatingDeclaration
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
# Rating
|
8
|
+
attr_accessor :alcohol_tobacco_or_drug_use_or_references
|
9
|
+
attr_accessor :gambling_simulated
|
10
|
+
attr_accessor :medical_or_treatment_information
|
11
|
+
attr_accessor :profanity_or_crude_humor
|
12
|
+
attr_accessor :sexual_content_graphic_and_nudity
|
13
|
+
attr_accessor :horror_or_fear_themes
|
14
|
+
attr_accessor :mature_or_suggestive_themes
|
15
|
+
attr_accessor :violence_cartoon_or_fantasy
|
16
|
+
attr_accessor :violence_realistic_prolonged_graphic_or_sadistic
|
17
|
+
attr_accessor :violence_realistic
|
18
|
+
|
19
|
+
# boolean
|
20
|
+
attr_accessor :gambling_and_contests
|
21
|
+
attr_accessor :unrestricted_web_access
|
22
|
+
|
23
|
+
# KidsAge
|
24
|
+
attr_accessor :kids_age_band
|
25
|
+
|
26
|
+
module Rating
|
27
|
+
NONE = "NONE"
|
28
|
+
INFREQUENT_OR_MILD = "INFREQUENT_OR_MILD"
|
29
|
+
FREQUENT_OR_INTENSE = "FREQUENT_OR_INTENSE"
|
30
|
+
end
|
31
|
+
|
32
|
+
module KidsAge
|
33
|
+
FIVE_AND_UNDER = "FIVE_AND_UNDER"
|
34
|
+
SIX_TO_EIGHT = "SIX_TO_EIGHT"
|
35
|
+
NINE_TO_ELEVEN = "NINE_TO_ELEVEN"
|
36
|
+
end
|
37
|
+
|
38
|
+
attr_mapping({
|
39
|
+
"alcoholTobaccoOrDrugUseOrReferences" => "alcohol_tobacco_or_drug_use_or_references",
|
40
|
+
"gamblingAndContests" => "gambling_and_contests",
|
41
|
+
"gamblingSimulated" => "gambling_simulated",
|
42
|
+
"medicalOrTreatmentInformation" => "medical_or_treatment_information",
|
43
|
+
"profanityOrCrudeHumor" => "profanity_or_crude_humor",
|
44
|
+
"sexualContentGraphicAndNudity" => "sexual_content_graphic_and_nudity",
|
45
|
+
"sexualContentOrNudity" => "sexual_content_or_nudity",
|
46
|
+
"horrorOrFearThemes" => "horror_or_fear_themes",
|
47
|
+
"matureOrSuggestiveThemes" => "mature_or_suggestive_themes",
|
48
|
+
"unrestrictedWebAccess" => "unrestricted_web_access",
|
49
|
+
"violenceCartoonOrFantasy" => "violence_cartoon_or_fantasy",
|
50
|
+
"violenceRealisticProlongedGraphicOrSadistic" => "violence_realistic_prolonged_graphic_or_sadistic",
|
51
|
+
"violenceRealistic" => "violence_realistic",
|
52
|
+
"kidsAgeBand" => "kids_age_band"
|
53
|
+
})
|
54
|
+
|
55
|
+
def self.type
|
56
|
+
return "ageRatingDeclarations"
|
57
|
+
end
|
58
|
+
|
59
|
+
LEGACY_AGE_RATING_ITC_MAP = {
|
60
|
+
"CARTOON_FANTASY_VIOLENCE" => "violenceCartoonOrFantasy",
|
61
|
+
"REALISTIC_VIOLENCE" => "violenceRealistic",
|
62
|
+
"PROLONGED_GRAPHIC_SADISTIC_REALISTIC_VIOLENCE" => "violenceRealisticProlongedGraphicOrSadistic",
|
63
|
+
"PROFANITY_CRUDE_HUMOR" => "profanityOrCrudeHumor",
|
64
|
+
"MATURE_SUGGESTIVE" => "matureOrSuggestiveThemes",
|
65
|
+
"HORROR" => "horrorOrFearThemes",
|
66
|
+
"MEDICAL_TREATMENT_INFO" => "medicalOrTreatmentInformation",
|
67
|
+
"ALCOHOL_TOBACCO_DRUGS" => "alcoholTobaccoOrDrugUseOrReferences",
|
68
|
+
"GAMBLING" => "gamblingSimulated",
|
69
|
+
"SEXUAL_CONTENT_NUDITY" => "sexualContentOrNudity",
|
70
|
+
"GRAPHIC_SEXUAL_CONTENT_NUDITY" => "sexualContentGraphicAndNudity",
|
71
|
+
"UNRESTRICTED_WEB_ACCESS" => "unrestrictedWebAccess",
|
72
|
+
"GAMBLING_CONTESTS" => "gamblingAndContests"
|
73
|
+
}
|
74
|
+
|
75
|
+
LEGACY_RATING_VALUE_ITC_MAP = {
|
76
|
+
0 => Rating::NONE,
|
77
|
+
1 => Rating::INFREQUENT_OR_MILD,
|
78
|
+
2 => Rating::FREQUENT_OR_INTENSE
|
79
|
+
}
|
80
|
+
|
81
|
+
LEGACY_BOOLEAN_VALUE_ITC_MAP = {
|
82
|
+
0 => false,
|
83
|
+
1 => true
|
84
|
+
}
|
85
|
+
|
86
|
+
def self.map_key_from_itc(key)
|
87
|
+
key = key.gsub("MZGenre.", "")
|
88
|
+
return nil if key.empty?
|
89
|
+
LEGACY_AGE_RATING_ITC_MAP[key] || key
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.map_value_from_itc(key, value)
|
93
|
+
if ["gamblingAndContests", "unrestrictedWebAccess"].include?(key)
|
94
|
+
new_value = LEGACY_BOOLEAN_VALUE_ITC_MAP[value]
|
95
|
+
return value if new_value.nil?
|
96
|
+
return new_value
|
97
|
+
else
|
98
|
+
return LEGACY_RATING_VALUE_ITC_MAP[value]
|
99
|
+
end
|
100
|
+
|
101
|
+
return value
|
102
|
+
end
|
103
|
+
|
104
|
+
#
|
105
|
+
# API
|
106
|
+
#
|
107
|
+
|
108
|
+
def update(attributes: nil)
|
109
|
+
Spaceship::ConnectAPI.patch_age_rating_declaration(age_rating_declaration_id: id, attributes: attributes)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -13,13 +13,26 @@ module Spaceship
|
|
13
13
|
attr_accessor :removed
|
14
14
|
attr_accessor :is_aag
|
15
15
|
|
16
|
+
attr_accessor :content_rights_declaration
|
17
|
+
|
18
|
+
attr_accessor :app_store_versions
|
19
|
+
|
20
|
+
module ContentRightsDeclaration
|
21
|
+
USES_THIRD_PARTY_CONTENT = "USES_THIRD_PARTY_CONTENT"
|
22
|
+
DOES_NOT_USE_THIRD_PARTY_CONTENT = "DOES_NOT_USE_THIRD_PARTY_CONTENT"
|
23
|
+
end
|
24
|
+
|
16
25
|
self.attr_mapping({
|
17
26
|
"name" => "name",
|
18
27
|
"bundleId" => "bundle_id",
|
19
28
|
"sku" => "sku",
|
20
29
|
"primaryLocale" => "primary_locale",
|
21
30
|
"removed" => "removed",
|
22
|
-
"isAAG" => "is_aag"
|
31
|
+
"isAAG" => "is_aag",
|
32
|
+
|
33
|
+
"contentRightsDeclaration" => "content_rights_declaration",
|
34
|
+
|
35
|
+
"appStoreVersions" => "app_store_versions"
|
23
36
|
})
|
24
37
|
|
25
38
|
def self.type
|
@@ -30,7 +43,7 @@ module Spaceship
|
|
30
43
|
# Apps
|
31
44
|
#
|
32
45
|
|
33
|
-
def self.all(filter: {}, includes:
|
46
|
+
def self.all(filter: {}, includes: "appStoreVersions", limit: nil, sort: nil)
|
34
47
|
resps = Spaceship::ConnectAPI.get_apps(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
35
48
|
return resps.flat_map(&:to_models)
|
36
49
|
end
|
@@ -41,12 +54,113 @@ module Spaceship
|
|
41
54
|
end
|
42
55
|
end
|
43
56
|
|
44
|
-
def self.
|
57
|
+
def self.create(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil)
|
58
|
+
Spaceship::ConnectAPI.post_app(
|
59
|
+
name: name,
|
60
|
+
version_string: version_string,
|
61
|
+
sku: sku, primary_locale:
|
62
|
+
primary_locale,
|
63
|
+
bundle_id: bundle_id,
|
64
|
+
platforms: platforms,
|
65
|
+
territory_ids: territory_ids,
|
66
|
+
available_in_new_territories: available_in_new_territories
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.get(app_id: nil, includes: "appStoreVersions")
|
45
71
|
return Spaceship::ConnectAPI.get_app(app_id: app_id, includes: includes).first
|
46
72
|
end
|
47
73
|
|
74
|
+
def update(attributes: nil, app_price_tier_id: nil, territory_ids: nil)
|
75
|
+
return Spaceship::ConnectAPI.patch_app(app_id: id, attributes: attributes, app_price_tier_id: app_price_tier_id, territory_ids: territory_ids)
|
76
|
+
end
|
77
|
+
|
78
|
+
#
|
79
|
+
# App Info
|
80
|
+
#
|
81
|
+
|
82
|
+
def fetch_edit_app_info
|
83
|
+
states = [
|
84
|
+
Spaceship::ConnectAPI::AppInfo::AppStoreState::PREPARE_FOR_SUBMISSION,
|
85
|
+
Spaceship::ConnectAPI::AppInfo::AppStoreState::DEVELOPER_REJECTED,
|
86
|
+
Spaceship::ConnectAPI::AppInfo::AppStoreState::REJECTED,
|
87
|
+
Spaceship::ConnectAPI::AppInfo::AppStoreState::METADATA_REJECTED
|
88
|
+
]
|
89
|
+
|
90
|
+
resp = Spaceship::ConnectAPI.get_app_infos(app_id: id)
|
91
|
+
return resp.to_models.select do |model|
|
92
|
+
states.include?(model.app_store_state)
|
93
|
+
end.first
|
94
|
+
end
|
95
|
+
|
96
|
+
#
|
97
|
+
# App Pricing
|
98
|
+
#
|
99
|
+
|
100
|
+
def fetch_app_prices(filter: {}, includes: "priceTier", limit: nil, sort: nil)
|
101
|
+
filter ||= {}
|
102
|
+
filter[:app] = id
|
103
|
+
resp = Spaceship::ConnectAPI.get_app_prices(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
|
104
|
+
return resp.to_models
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
# App Store Versions
|
109
|
+
#
|
110
|
+
|
111
|
+
# Will make sure the current edit_version matches the given version number
|
112
|
+
# This will either create a new version or change the version number
|
113
|
+
# from an existing version
|
114
|
+
# @return (Bool) Was something changed?
|
115
|
+
def ensure_version!(version_string, platform: nil)
|
116
|
+
app_store_version = get_edit_app_store_version(platform: platform)
|
117
|
+
|
118
|
+
if app_store_version
|
119
|
+
if version_string != app_store_version.version_string
|
120
|
+
attributes = { versionString: version_string }
|
121
|
+
app_store_version.update(attributes: attributes)
|
122
|
+
return true
|
123
|
+
end
|
124
|
+
return false
|
125
|
+
else
|
126
|
+
attributes = { versionString: version_string, platform: platform }
|
127
|
+
Spaceship::ConnectAPI.post_app_store_version(app_id: id, attributes: attributes)
|
128
|
+
|
129
|
+
return true
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def get_live_app_store_version(platform: nil, includes: nil)
|
134
|
+
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
135
|
+
filter = {
|
136
|
+
appStoreState: [Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE].join(","),
|
137
|
+
platform: platform
|
138
|
+
}
|
139
|
+
return get_app_store_versions(filter: filter, includes: includes).first
|
140
|
+
end
|
141
|
+
|
142
|
+
def get_edit_app_store_version(platform: nil, includes: nil)
|
143
|
+
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
144
|
+
filter = {
|
145
|
+
appStoreState: [
|
146
|
+
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PREPARE_FOR_SUBMISSION,
|
147
|
+
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::DEVELOPER_REJECTED,
|
148
|
+
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::REJECTED,
|
149
|
+
Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::METADATA_REJECTED
|
150
|
+
].join(","),
|
151
|
+
platform: platform
|
152
|
+
}
|
153
|
+
return get_app_store_versions(filter: filter, includes: includes).first
|
154
|
+
end
|
155
|
+
|
156
|
+
def get_app_store_versions(filter: {}, includes: nil, limit: nil, sort: nil)
|
157
|
+
resps = Spaceship::ConnectAPI.get_app_store_versions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
158
|
+
return resps.flat_map(&:to_models)
|
159
|
+
end
|
160
|
+
|
48
161
|
#
|
49
162
|
# Beta Feedback
|
163
|
+
#
|
50
164
|
|
51
165
|
def get_beta_feedback(filter: {}, includes: "tester,build,screenshots", limit: nil, sort: nil)
|
52
166
|
filter ||= {}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppCategory
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :platforms
|
8
|
+
|
9
|
+
attr_mapping({
|
10
|
+
"platforms" => "platforms"
|
11
|
+
})
|
12
|
+
|
13
|
+
def self.type
|
14
|
+
return "appCategories"
|
15
|
+
end
|
16
|
+
|
17
|
+
LEGACY_CATEGORY_ITC_MAP = {
|
18
|
+
"Apps.Food_Drink" => "FOOD_AND_DRINK",
|
19
|
+
"Business" => "BUSINESS",
|
20
|
+
"Education" => "EDUCATION",
|
21
|
+
"SocialNetworking" => "SOCIAL_NETWORKING",
|
22
|
+
"Book" => "BOOKS",
|
23
|
+
"Sports" => "SPORTS",
|
24
|
+
"Finance" => "FINANCE",
|
25
|
+
"Reference" => "REFERENCE",
|
26
|
+
"Apps.GraphicsDesign" => "GRAPHICS_AND_DESIGN",
|
27
|
+
"Apps.DeveloperTools" => "DEVELOPER_TOOLS",
|
28
|
+
"Healthcare_Fitness" => "HEALTH_AND_FITNESS",
|
29
|
+
"Music" => "MUSIC",
|
30
|
+
"Weather" => "WEATHER",
|
31
|
+
"Travel" => "TRAVEL",
|
32
|
+
"Entertainment" => "ENTERTAINMENT",
|
33
|
+
"Stickers" => "STICKERS",
|
34
|
+
"Games" => "GAMES",
|
35
|
+
"Lifestyle" => "LIFESTYLE",
|
36
|
+
"Medical" => "MEDICAL",
|
37
|
+
"Apps.Newsstand" => "MAGAZINES_AND_NEWSPAPERS",
|
38
|
+
"Utilities" => "UTILITIES",
|
39
|
+
"Apps.Shopping" => "SHOPPING",
|
40
|
+
"Productivity" => "PRODUCTIVITY",
|
41
|
+
"News" => "NEWS",
|
42
|
+
"Photography" => "PHOTO_AND_VIDEO",
|
43
|
+
"Navigation" => "NAVIGATION"
|
44
|
+
}
|
45
|
+
|
46
|
+
LEGACY_SUBCATEGORY_ITC_MAP = {
|
47
|
+
"Apps.Stickers.Places" => "STICKERS_PLACES_AND_OBJECTS",
|
48
|
+
"Apps.Stickers.Emotions" => "STICKERS_EMOJI_AND_EXPRESSIONS",
|
49
|
+
"Apps.Stickers.BirthdaysAndCelebrations" => "STICKERS_CELEBRATIONS",
|
50
|
+
"Apps.Stickers.Celebrities" => "STICKERS_CELEBRITIES",
|
51
|
+
"Apps.Stickers.MoviesAndTV" => "STICKERS_MOVIES_AND_TV",
|
52
|
+
"Apps.Stickers.Sports" => "STICKERS_SPORTS_AND_ACTIVITIES",
|
53
|
+
"Apps.Stickers.FoodAndDrink" => "STICKERS_EATING_AND_DRINKING",
|
54
|
+
"Apps.Stickers.Characters" => "STICKERS_CHARACTERS",
|
55
|
+
"Apps.Stickers.Animals" => "STICKERS_ANIMALS",
|
56
|
+
"Apps.Stickers.Fashion" => "STICKERS_FASHION",
|
57
|
+
"Apps.Stickers.Art" => "STICKERS_ART",
|
58
|
+
"Apps.Stickers.Games" => "STICKERS_GAMING",
|
59
|
+
"Apps.Stickers.KidsAndFamily" => "STICKERS_KIDS_AND_FAMILY",
|
60
|
+
"Apps.Stickers.People" => "STICKERS_PEOPLE",
|
61
|
+
"Apps.Stickers.Music" => "STICKERS_MUSIC",
|
62
|
+
|
63
|
+
"Sports" => "GAMES_SPORTS",
|
64
|
+
"Word" => "GAMES_WORD",
|
65
|
+
"Music" => "GAMES_MUSIC",
|
66
|
+
"Adventure" => "GAMES_ADVENTURE",
|
67
|
+
"Action" => "GAMES_ACTION",
|
68
|
+
"RolePlaying" => "GAMES_ROLE_PLAYING",
|
69
|
+
"Arcade" => "GAMES_CASUAL",
|
70
|
+
"Board" => "GAMES_BOARD",
|
71
|
+
"Trivia" => "GAMES_TRIVIA",
|
72
|
+
"Card" => "GAMES_CARD",
|
73
|
+
"Puzzle" => "GAMES_PUZZLE",
|
74
|
+
"Casino" => "GAMES_CASINO",
|
75
|
+
"Strategy" => "GAMES_STRATEGY",
|
76
|
+
"Simulation" => "GAMES_SIMULATION",
|
77
|
+
"Racing" => "GAMES_RACING",
|
78
|
+
"Family" => "GAMES_FAMILY"
|
79
|
+
}
|
80
|
+
|
81
|
+
def self.map_category_from_itc(category)
|
82
|
+
category = category.gsub("MZGenre.", "")
|
83
|
+
return nil if category.empty?
|
84
|
+
LEGACY_CATEGORY_ITC_MAP[category] || category
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.map_subcategory_from_itc(category)
|
88
|
+
category = category.gsub("MZGenre.", "")
|
89
|
+
return nil if category.empty?
|
90
|
+
LEGACY_SUBCATEGORY_ITC_MAP[category] || category
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppInfo
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :app_store_state
|
8
|
+
attr_accessor :app_store_age_rating
|
9
|
+
attr_accessor :brazil_age_rating
|
10
|
+
attr_accessor :kids_age_band
|
11
|
+
|
12
|
+
module AppStoreState
|
13
|
+
READY_FOR_SALE = "READY_FOR_SALE"
|
14
|
+
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
|
15
|
+
DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
|
16
|
+
REJECTED = "REJECTED"
|
17
|
+
PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
|
18
|
+
METADATA_REJECTED = "METADATA_REJECTED"
|
19
|
+
end
|
20
|
+
|
21
|
+
module AppStoreAgeRating
|
22
|
+
FOUR_PLUS = "FOUR_PLUS"
|
23
|
+
end
|
24
|
+
|
25
|
+
attr_mapping({
|
26
|
+
"appStoreState" => "app_store_state",
|
27
|
+
"appStoreAgeRating" => "app_store_age_rating",
|
28
|
+
"brazilAgeRating" => "brazil_age_rating",
|
29
|
+
"kidsAgeBand" => "kids_age_band"
|
30
|
+
})
|
31
|
+
|
32
|
+
def self.type
|
33
|
+
return "appInfos"
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# API
|
38
|
+
#
|
39
|
+
|
40
|
+
def update(filter: {}, includes: nil, limit: nil, sort: nil)
|
41
|
+
Spaceship::ConnectAPI.patch_app_info(app_info_id: id).first
|
42
|
+
end
|
43
|
+
|
44
|
+
def update_categories(category_id_map: nil)
|
45
|
+
Spaceship::ConnectAPI.patch_app_info_categories(app_info_id: id, category_id_map: category_id_map).first
|
46
|
+
end
|
47
|
+
|
48
|
+
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
49
|
+
Spaceship::ConnectAPI.delete_app_info(app_info_id: id)
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# App Info Localizations
|
54
|
+
#
|
55
|
+
|
56
|
+
def create_app_info_localization(attributes: nil)
|
57
|
+
resp = Spaceship::ConnectAPI.post_app_info_localization(app_info_id: id, attributes: attributes)
|
58
|
+
return resp.to_models.first
|
59
|
+
end
|
60
|
+
|
61
|
+
def get_app_info_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
|
62
|
+
return Spaceship::ConnectAPI.get_app_info_localizations(app_info_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|