Module: Bitrise::Client::TestDevice
- Included in:
- Bitrise::Client
- Defined in:
- lib/bitrise/client/test_device.rb
Instance Method Summary collapse
-
#test_devices(app_slug: nil) ⇒ Array<Bitrise::TestDevice>
List registered test devices of all members of a specified Bitrise app.
Instance Method Details
#test_devices(app_slug: nil) ⇒ Array<Bitrise::TestDevice>
List registered test devices of all members of a specified Bitrise app
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/bitrise/client/test_device.rb', line 14 def test_devices(app_slug: nil) raise ArgumentError, 'App slug required. You must specify by \'app_slug:\'' unless app_slug response = client.get do |request| request.url "/v0.1/apps/#{app_slug}/test-devices" request.headers['Content-Type'] = 'application/json' end JSON.parse(response.body)['data'].map do |device| Bitrise::TestDevice.new(device) end end |