Method: Legato::Model#results

Defined in:
lib/legato/model.rb

#results(profile, options = {}) ⇒ Query

Builds a ‘query` to get results from GA

Parameters:

  • profile (Legato::Management::Profile)

    the profile to query GA against

  • options (Hash) (defaults to: {})

    options:

    • start_date

    • end_date

    • limit

    • offset

    • sort

    • quota_user

    • segment_id

Returns:

  • (Query)

    a new query with all the filters/segments defined on the model, allowing for chainable behavior before kicking of the request to Google Analytics which returns the result data



81
82
83
84
# File 'lib/legato/model.rb', line 81

def results(profile, options = {})
  # TODO: making tracking scope configurable when results are querried.  not sure how to do this.
  Query.new(self).apply_options(options.merge(:profile => profile))
end