class Redlink::Cli

Public Instance Methods

init(token) click to toggle source
# File lib/redlink/cli.rb, line 8
def init(token)
  Redlink::Configuration.app_token = token
end
locations() click to toggle source
# File lib/redlink/cli.rb, line 23
def locations
  Redlink::Location.all.each do |location|
    s = [location]
    if location.current_weather
      s << location.current_weather
    end

    puts s.join(' - ')

    location.thermostats.each do |thermostat|
      puts "\t#{thermostat}"
    end

  end
end
login(username, password) click to toggle source
# File lib/redlink/cli.rb, line 13
def login(username, password)
  Redlink::Endpoint.login(username, password)
end
logout() click to toggle source
# File lib/redlink/cli.rb, line 18
def logout
  Redlink::Endpoint.logout
end