module UnifiGem::Client::Sites

Public Instance Methods

add_site(description) click to toggle source
# File lib/unifi_gem/client/sites.rb, line 7
def add_site(description)
  body = { cmd: 'add-site', desc: description }
  response = self.class.post("/s/#{@site}/cmd/sitemgr", { body: body.to_json })
  response.parsed_response
end
delete_site(site_id) click to toggle source
# File lib/unifi_gem/client/sites.rb, line 14
def delete_site(site_id)
  body = { site: site_id, cmd: 'delete-site' }
  response = self.class.post("/s/#{@site}/cmd/sitemgr", { body: body.to_json })
  response.parsed_response
end
list_sites() click to toggle source
# File lib/unifi_gem/client/sites.rb, line 20
def list_sites
  response = self.class.get("/self/sites")
  response.parsed_response
end
stat_sites() click to toggle source
# File lib/unifi_gem/client/sites.rb, line 25
def stat_sites
  response = self.class.get("/stat/sites")
  response.parsed_response
end
stat_sysinfo() click to toggle source
# File lib/unifi_gem/client/sites.rb, line 30
def stat_sysinfo
  response = self.class.get("/s/#{@site}/stat/sysinfo")
  response.parsed_response
end