module Wms::Api::Event

Attributes

events[RW]

private

options[RW]

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/wms/api/event.rb, line 19
def initialize
  super
  @events = Event
end

Public Instance Methods

get_events(options={}) click to toggle source
# File lib/wms/api/event.rb, line 24
def get_events(options={})
  # events = Event.all_in(device_id: options[:device_id],
  #   type: options[:type]).between(timestamp: options[:begin]..options[:end]).order_by(:timestamp.asc)
  # events_hash = []
  # if events.length > 0
  #   events.each do |e|
  #     events_hash.push(Hash[e.attributes])
  #   end
  # end
  #
  # events_hash
  Event.where(options) 
end