Sha256: 1ebf87f5e7166584f57a2e322097e8fc038ba942f80b157fee244ea7b6718d37
Contents?: true
Size: 759 Bytes
Versions: 15
Compression:
Stored size: 759 Bytes
Contents
require 'HTTParty' class MDBClient def initialize @base_uri = ENV["MDB"] || "http://localhost:9099" end def format_android_devices(devices) query = { deviceLog: devices }.to_json puts query response = HTTParty.post("#{@base_uri}/processDevices", body: query, headers: default_headers) device_names = JSON.parse(response.to_s) return device_names end def format_ios_devices(devices) body = { deviceLog: devices }.to_json response = HTTParty.post("#{@base_uri}/processIosDevices", body: body, headers: default_headers) device_names = JSON.parse(response.to_s) return device_names end def default_headers headers = { 'Content-Type': "Application/json" } return headers end end
Version data entries
15 entries across 15 versions & 1 rubygems