lib/arlo/devices.rb in arlo-0.0.1 vs lib/arlo/devices.rb in arlo-0.0.2

- old
+ new

@@ -2,7 +2,12 @@ class API def get_devices token profile = get('https://arlo.netgear.com/hmsweb/users/devices', token) JSON.parse(profile.body) end + + def get_device_info device_name, device_list + raise 'Missing device_name' unless device_name + device_list['data'].select {|device| device['deviceName'] == device_name }[0] + end end end