module SendGrid4r::REST::Stats::Category
Public Instance Methods
get_categories_stats( start_date:, end_date: nil, aggregated_by: nil, categories:, &block)
click to toggle source
# File lib/sendgrid4r/rest/stats/category.rb, line 10 def get_categories_stats( start_date:, end_date: nil, aggregated_by: nil, categories:, &block) params = { start_date: start_date, end_date: end_date, aggregated_by: aggregated_by, categories: categories } resp = get(@auth, "#{BASE_URL}/categories/stats", params, &block) finish(resp, @raw_resp) { |r| Stats.create_top_stats(r) } end
get_categories_stats_sums( start_date:, end_date: nil, sort_by_metric: nil, sort_by_direction: nil, limit: nil, offset: nil, &block)
click to toggle source
# File lib/sendgrid4r/rest/stats/category.rb, line 22 def get_categories_stats_sums( start_date:, end_date: nil, sort_by_metric: nil, sort_by_direction: nil, limit: nil, offset: nil, &block) params = { start_date: start_date, end_date: end_date, sort_by_metric: sort_by_metric, sort_by_direction: sort_by_direction, limit: limit, offset: offset } resp = get(@auth, "#{BASE_URL}/categories/stats/sums", params, &block) finish(resp, @raw_resp) { |r| Stats.create_top_stat(r) } end