module Wemote::XML

Constants

TEMPLATES

Public Class Methods

get_binary_state() click to toggle source

@return [String] The required XML body for a Wemo binary state request

# File lib/wemote/xml.rb, line 12
def get_binary_state
  TEMPLATES[:get_binary_state]
end
get_insight_params() click to toggle source
# File lib/wemote/xml.rb, line 22
def get_insight_params
  TEMPLATES[:get_insight_params]
end
set_binary_state(state) click to toggle source

@param [Integer] state Either 1 or 0, for off and on respectively @return [String] The required XML body for a Wemo binary state set request

# File lib/wemote/xml.rb, line 18
def set_binary_state(state)
  TEMPLATES[:set_binary_state].gsub("{{1}}",state.to_s)
end