forked from fastlane/fastlane
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[spaceship] support fetching
build_bundle_file_sizes
for a `BuildBu…
…ndle` (fastlane#20860) * Add BuildBundleFileSizes model and update testlight client to support fetching all for a given BuildBundle * Add BuildBundle.build_bundle_file_sizes helper * Add test coverage * Rename get_build_bundle_build_bundle_file_sizes -> get_build_bundles_build_bundle_file_sizes
- Loading branch information
1 parent
6240d07
commit 8b307b1
Showing
8 changed files
with
745 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
spaceship/lib/spaceship/connect_api/models/build_bundle_file_sizes.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require_relative '../model' | ||
module Spaceship | ||
class ConnectAPI | ||
class BuildBundleFileSizes | ||
include Spaceship::ConnectAPI::Model | ||
|
||
attr_accessor :device_model | ||
attr_accessor :os_version | ||
attr_accessor :download_bytes | ||
attr_accessor :install_bytes | ||
|
||
attr_mapping({ | ||
"deviceModel" => "device_model", | ||
"osVersion" => "os_version", | ||
"downloadBytes" => "download_bytes", | ||
"installBytes" => "install_bytes" | ||
}) | ||
|
||
def self.type | ||
return "buildBundleFileSizes" | ||
end | ||
|
||
# | ||
# API | ||
# | ||
|
||
def self.all(client: nil, build_bundle_id: nil, limit: 30) | ||
client ||= Spaceship::ConnectAPI | ||
resps = client.get_build_bundles_build_bundle_file_sizes(build_bundle_id: build_bundle_id).all_pages | ||
resps.flat_map(&:to_models) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.