Class: Outbrain::Api::Report
- Defined in:
- lib/outbrain/api/report.rb
Direct Known Subclasses
Constant Summary collapse
- REPORT_PARAMETERS =
[:from, :to, :limit, :offset, :sort]
- RESOURCE_NAME =
'details'
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
#initialize, #persisted?, #valid?
Constructor Details
This class inherits a constructor from Outbrain::Base
Class Method Details
.where(options = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/outbrain/api/report.rb', line 7 def self.where( = {}) report_query = .select{|option, v| REPORT_PARAMETERS.include?(option) && !v.nil?} = { as: self, resource_name: RESOURCE_NAME, meta_resource_names: .fetch(:meta_resource_names, []) } Request.where(.fetch(:path), report_query, ) end |