Sha256: 68fcadc6cb681ca01693e1c6ae0f5854fb07f3d62bd961140046d27b25537575
Contents?: true
Size: 695 Bytes
Versions: 5
Compression:
Stored size: 695 Bytes
Contents
module Arlo class API def initialize @token = login @devices = get_devices @profile = get_profile end def token @token end def devices @devices end def profile @profile end def login email = ENV['ARLO_EMAIL'] raise 'Missing ARLO_EMAIL environment variable' unless email password = ENV['ARLO_PASSWORD'] raise 'Missing ARLO_PASSWORD environment variable' unless password payload = { 'email': email, 'password': password } response = post('https://arlo.netgear.com/hmsweb/login/v2', payload) JSON.parse(response.body)['data']['token'] end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
arlo-0.0.8 | lib/arlo/init.rb |
arlo-0.0.7 | lib/arlo/init.rb |
arlo-0.0.6 | lib/arlo/init.rb |
arlo-0.0.5 | lib/arlo/init.rb |
arlo-0.0.4 | lib/arlo/init.rb |