Module: Twelve::API::Gauges::Traffic

Included in:
Proxy
Defined in:
lib/twelve/api/gauges/traffic.rb

Overview

The Traffic module handles accessing traffic

Instance Method Summary collapse

Instance Method Details

#traffic(date = nil) ⇒ Object

Returns monthly traffic for a gauge

date - String of date

Returns json



21
22
23
24
25
26
27
28
# File 'lib/twelve/api/gauges/traffic.rb', line 21

def traffic(date=nil)
  attributes = {}

  connection.get do |request|
    request.url "#{path_prefix}/traffic"
    request.params['date'] = date if date && date.is_a?(String)
  end.body
end