Class: Sendgrid::API::Web::Stats::Services

Inherits:
Service
  • Object
show all
Defined in:
lib/sendgrid/api/web/stats.rb

Instance Attribute Summary

Attributes inherited from Service

#resource

Instance Method Summary collapse

Methods inherited from Service

#initialize, #perform_request

Constructor Details

This class inherits a constructor from Sendgrid::API::Service

Instance Method Details

#advanced(options = {}) ⇒ Array<Entities::Stats>

Get Advanced Statistics

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • :data_type (String)

    One of the following: browsers, clients, devices, geo, global, isps. Required.

  • :start_date (Date)

    Date format is based on aggregated_by value (default is yyyy-mm-dd). Required.

  • :end_date (Date)

    Date format is based on aggregated_by value (default is yyyy-mm-dd).

  • :metric (String)

    One of the following (default is all): open, click, unique_open, unique_click, processed, delivered, drop, bounce, deferred, spamreport, blocked, all.

  • :category (String)

    Return stats for the given category.

  • :aggregated_by (String)

    Aggregate the data by the given period (default is day): day, week or month.

  • :country (String)

    Get stats for each region/state for the given country. Only US (United States) and CA (Canada) is supported at this time.

Returns:

See Also:



27
28
29
# File 'lib/sendgrid/api/web/stats.rb', line 27

def advanced(options = {})
  perform_request(Entities::Stats, 'stats.getAdvanced.json', options)
end