Class: Gosquared::Now
- Inherits:
-
Object
- Object
- Gosquared::Now
- Defined in:
- lib/gosquared/now.rb
Constant Summary collapse
- BASEURL =
'https://api.gosquared.com/now/v3/'.freeze
- DIMENSIONS =
%w[browsers campaigns concurrents engagement geo languages notifications organisations overview pages platforms sources time timeSeries visitors].freeze
- @@filters =
{ date_format: @date_format, from: @from, to: @to, format: @format, limit: @limit, sort: @sort, presenter: @presenter, visitors_mode: @string, href: @href, drill_limit: @drill_limit, sections: @sections, minimal: @minimal, interval: @interval }
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(api_key, site_token, client = Gosquared::Client.new) ⇒ Now
constructor
A new instance of Now.
Constructor Details
Instance Method Details
#fetch ⇒ Object
34 35 36 37 38 |
# File 'lib/gosquared/now.rb', line 34 def fetch data = @client.get(url) @@filters.each { |key, _value| @@filters[key] = nil } if data data end |