Sha256: ca9f39665957c3648f9a790c7e0814f625232b55677097613059f91a0ef034e6

Contents?: true

Size: 692 Bytes

Versions: 5

Compression:

Stored size: 692 Bytes

Contents

class View < MLS::Model
  belongs_to :subject, polymorphic: true
  
  def self.by_day(filter)
    req = Net::HTTP::Get.new("/views/by_day")
    req.body = {
      where: filter
    }.to_json
    connection.instance_variable_get(:@connection).send_request(req).body
  end
  
  def self.by_week(filter)
    req = Net::HTTP::Get.new("/views/by_week")
    req.body = {
      where: filter
    }.to_json
    connection.instance_variable_get(:@connection).send_request(req).body
  end
  
  def self.by_month(filter)
    req = Net::HTTP::Get.new("/views/by_month")
    req.body = {
      where: filter
    }.to_json
    connection.instance_variable_get(:@connection).send_request(req).body
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mls-1.9.0 lib/mls/models/view.rb
mls-1.8.0 lib/mls/models/view.rb
mls-1.7.0 lib/mls/models/view.rb
mls-1.6.0 lib/mls/models/view.rb
mls-1.5.1 lib/mls/view.rb