spaceship/lib/spaceship/connect_api/testflight/testflight.rb in fastlane_hotfix-2.165.1 vs spaceship/lib/spaceship/connect_api/testflight/testflight.rb in fastlane_hotfix-2.187.0
- old
+ new
@@ -212,10 +212,34 @@
}
}
test_flight_request_client.post("betaGroups", body)
end
+ def patch_group(group_id: nil, attributes: {})
+ body = {
+ data: {
+ attributes: attributes,
+ id: group_id,
+ type: "betaGroups"
+ }
+ }
+
+ test_flight_request_client.patch("betaGroups/#{group_id}", body)
+ end
+
+ def delete_beta_group(group_id: nil)
+ raise "group_id is nil" if group_id.nil?
+
+ test_flight_request_client.delete("betaGroups/#{group_id}")
+ end
+
+ def get_builds_for_beta_group(group_id: nil)
+ raise "group_id is nil" if group_id.nil?
+
+ test_flight_request_client.get("betaGroups/#{group_id}/builds")
+ end
+
#
# betaTesters
#
def get_beta_testers(filter: {}, includes: nil, limit: nil, sort: nil)
@@ -249,10 +273,23 @@
}
test_flight_request_client.post("bulkBetaTesterAssignments", body)
end
+ def add_beta_tester_to_group(beta_group_id: nil, beta_tester_ids: nil)
+ beta_tester_ids || []
+ body = {
+ data: beta_tester_ids.map do |id|
+ {
+ type: "betaTesters",
+ id: id
+ }
+ end
+ }
+ test_flight_request_client.post("betaGroups/#{beta_group_id}/relationships/betaTesters", body)
+ end
+
def delete_beta_tester_from_apps(beta_tester_id: nil, app_ids: [])
body = {
data: app_ids.map do |id|
{
type: "apps",
@@ -286,9 +323,22 @@
}
end
}
test_flight_request_client.delete("apps/#{app_id}/relationships/betaTesters", nil, body)
+ end
+
+ def add_beta_tester_to_builds(beta_tester_id: nil, build_ids: [])
+ body = {
+ data: build_ids.map do |id|
+ {
+ type: "builds",
+ id: id
+ }
+ end
+ }
+
+ test_flight_request_client.post("betaTesters/#{beta_tester_id}/relationships/builds", body)
end
#
# betaTesterMetrics
#