Method: Unifi::Client::Main#list_events
- Defined in:
- lib/unifi/client/main.rb
#list_events(options = {}) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/unifi/client/main.rb', line 32 def list_events( = {}) body = { _sort: '-time', } body[:within] = [:historyhours] || 720 body[:_start] = [:start] || 0 body[:_limit] = [:limit] || 3000 response = self.class.get("/s/#{@site}/stat/event", { body: body.to_json }) response.parsed_response end |