Class: Loggly::Event
- Inherits:
-
RemoteModel
- Object
- Model
- RemoteModel
- Loggly::Event
- Defined in:
- lib/loggly/models/event.rb
Constant Summary collapse
- METADATA_KEYS =
{ :total_count => :total_events, :current_page => :page, }
Constants inherited from RemoteModel
RemoteModel::DEFAULT_RESOURCE_ATTRIBUTES
Instance Attribute Summary
Attributes included from RemoteModel::ClassMethods
Attributes inherited from Model
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Event
constructor
A new instance of Event.
Methods included from RemoteModel::ClassMethods
#all, #collection_name, #create!, #find, #index_method, #path_base, #path_ext, #prepare_params, #set_resource_attributes, #where
Methods inherited from Model
Methods included from Model::ClassMethods
Methods included from Logging
#init_logger, #logger, #logger=
Constructor Details
#initialize(attributes = {}) ⇒ Event
Returns a new instance of Event.
18 19 20 |
# File 'lib/loggly/models/event.rb', line 18 def initialize(attributes = {}) super end |
Class Method Details
.all(conditions = {}, options = {}, &callback) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/loggly/models/event.rb', line 22 def self.all(conditions = {}, = {}, &callback) conditions[:order] ||= "desc" conditions[:from] ||= "-24h" conditions[:until] ||= "now" unless rsid = [:rsid] search = Search.create!(conditions, ) rsid = search.attributes.id end super({:rsid => rsid}, , &callback) end |