class TestdroidAPI::DeviceSession

Public Class Methods

new(uri, client, params = {}) click to toggle source
Calls superclass method TestdroidAPI::CloudResource::new
# File lib/testdroid_api/device_sessions.rb, line 5
def initialize(uri, client, params = {})
  super uri, client, "deviceSession", params
  @uri, @client = uri, client
end

Public Instance Methods

download_all_files(path) click to toggle source
# File lib/testdroid_api/device_sessions.rb, line 14
def download_all_files(path)
  Dir.mkdir(path) unless Dir.exist?(path)
  files = @client.get("#{@uri}/output-file-set/files")
  files['data'].each do |file|
    @client.download(file['directUrl'], ::File.join(path, "#{file['id']}-#{file['name']}"))
  end
end
release() click to toggle source
# File lib/testdroid_api/device_sessions.rb, line 10
def release
  @client.post("#{@uri}/release", params = {})
end