spaceship/lib/spaceship/test_flight/client.rb in fastlane-2.56.0.beta.20170909010003 vs spaceship/lib/spaceship/test_flight/client.rb in fastlane-2.56.0.beta.20170910010002

- old
+ new

@@ -98,12 +98,23 @@ # @!group Testers API ## def testers_for_app(app_id: nil) assert_required_params(__method__, binding) - url = "providers/#{team_id}/apps/#{app_id}/testers?limit=10000" - response = request(:get, url) - handle_response(response) + page_size = 40 # that's enforced by the iTC servers + offset = nil + resulting_array = [] + + loop do + url = "providers/#{team_id}/apps/#{app_id}/testers?limit=#{page_size}&sort=email&order=asc" + url += "&offset=#{offset}" if offset + response = request(:get, url) + result = Array(handle_response(response)) + resulting_array += result + break if result.count == 0 + offset = "#{result.last['email']}%2C#{result.last['id']}" + end + return resulting_array end def delete_tester_from_app(app_id: nil, tester_id: nil) assert_required_params(__method__, binding) url = "providers/#{team_id}/apps/#{app_id}/testers/#{tester_id}"