Class: View

Inherits:
MLS::Model show all
Defined in:
lib/mls/models/view.rb

Class Method Summary collapse

Class Method Details

.by_day(filter) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/mls/models/view.rb', line 4

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

.by_month(filter) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/mls/models/view.rb', line 20

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

.by_week(filter) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/mls/models/view.rb', line 12

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