Sha256: 861cfabc3078e133e63c03a7a4405c730156dd32c5632092e585757abf02bec3
Contents?: true
Size: 1.52 KB
Versions: 4
Compression:
Stored size: 1.52 KB
Contents
module FreeboxApi module Configuration module Connection def self.getStatus(session) session.http_call('get', '/connection/') end def self.getConfig(session) session.http_call('get', '/connection/config/') end def self.updateConfig(session, value) session.http_call('put', '/connection/config/', value) end module IPv6 def self.getConfig(session) session.http_call('get', '/connection/ipv6/config/') end def self.updateConfig(session, value) session.http_call('put', '/connection/ipv6/config/', value) end end class DDNS def initialize(session, provider) # TODO: validate that provider matches (ovh|dyndns|noip) @session = session @provider = provider end def self.getStatus(session, provider) session.http_call('get', "/connection/ddns/#{provider}/status/") end def status self.class.getStatus(@session, @provider) end def self.getConfig(session, provider) session.http_call('get', "/connection/ddns/#{provider}/") end def config self.class.getConfig(@session, @provider) end def self.updateConfig(session, provider, value) session.http_call('put', "/connection/ddns/#{provider}/", value) end def config=(value) self.class.updateConfig(@session, @provider, value) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems