Sha256: c8a890df27eed703dadba512542aa7ce5a6c9b4d1dc71c0848cefa4151b64dd5

Contents?: true

Size: 607 Bytes

Versions: 6

Compression:

Stored size: 607 Bytes

Contents

# -*- encoding: utf-8 -*-

module SendGrid4r
  module REST
    module Stats
      #
      # SendGrid Web API v3 Stats - Global
      #
      module Global
        include SendGrid4r::REST::Request

        def get_global_stats(
          start_date:, end_date: nil, aggregated_by: nil, &block
        )
          params = {
            start_date: start_date,
            end_date: end_date,
            aggregated_by: aggregated_by
          }
          resp = get(@auth, "#{BASE_URL}/stats", params, &block)
          SendGrid4r::REST::Stats.create_top_stats(resp)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sendgrid4r-1.8.1 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.8.0 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.7.1 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.7.0 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.6.0 lib/sendgrid4r/rest/stats/global.rb
sendgrid4r-1.5.1 lib/sendgrid4r/rest/stats/global.rb