Class: Gosquared::Trends
- Inherits:
-
Object
- Object
- Gosquared::Trends
- Defined in:
- lib/gosquared/trends.rb
Constant Summary collapse
- BASEURL =
'https://api.gosquared.com/trends/v2/'.freeze
- DIMENSIONS =
%w[aggregate browser category country event language organisation os page path1 product screenDimensions sources transactions].freeze
- @@filters =
{ date_format: @date_format, from: @from, to: @to, format: @format, limit: @limit, sort: @sort, group: @group, source_type: @source_type }
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(api_key, site_token, client = Gosquared::Client.new) ⇒ Trends
constructor
A new instance of Trends.
Constructor Details
Instance Method Details
#fetch ⇒ Object
31 32 33 34 35 |
# File 'lib/gosquared/trends.rb', line 31 def fetch data = @client.get(url) @@filters.each { |key, _value| @@filters[key] = nil } if data data end |