Class: Fritzbox::Smarthome::Resource
- Inherits:
-
Object
- Object
- Fritzbox::Smarthome::Resource
- Defined in:
- lib/fritzbox/smarthome/resource.rb
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.get(command:, ain: nil, param: nil) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/fritzbox/smarthome/resource.rb', line 5 def get(command:, ain: nil, param: nil) url = "#{config.endpoint}/webservices/homeautoswitch.lua?switchcmd=#{command}&sid=#{authenticate}" url = "#{url}&ain=#{ain}" if ain.present? url = "#{url}¶m=#{param}" if param.present? HTTParty.get(url, **) end |