Module: Twelve::API::Gauges::Referrers
- Included in:
- Proxy
- Defined in:
- lib/twelve/api/gauges/referrers.rb
Overview
The Referrers module handles referrers
Instance Method Summary collapse
-
#referrers(*args) ⇒ Object
Returns top content for a gauge.
Instance Method Details
#referrers(*args) ⇒ Object
Returns top content for a gauge
*args - Date string & options hash
Returns json
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/twelve/api/gauges/referrers.rb', line 21 def referrers(*args) attributes = {} connection.get do |request| request.url "#{path_prefix}/referrers" args.each do |arg| request.params['page'] = arg[:page].to_s if arg.is_a?(Hash) && arg.has_key?(:page) request.params['date'] = arg if arg.is_a?(String) end end.body end |