Class: Mailjet::Reporting
- Inherits:
-
Object
- Object
- Mailjet::Reporting
- Defined in:
- lib/mailjet/reporting.rb
Class Method Summary collapse
- .agents(options = {}) ⇒ Object
- .bounce(options = {}) ⇒ Object
- .clicks(options = {}) ⇒ Object
- .clients(options = {}) ⇒ Object
- .domains(options = {}) ⇒ Object
- .emails(options = {}) ⇒ Object
- .geolocation(options = {}) ⇒ Object
- .statistics(options = {}) ⇒ Object
Class Method Details
.agents(options = {}) ⇒ Object
39 40 41 |
# File 'lib/mailjet/reporting.rb', line 39 def agents( = {}) (.delete(:api) || Mailjet::Api.singleton).reportUseragents()["user_agents"] || [] end |
.bounce(options = {}) ⇒ Object
27 28 29 |
# File 'lib/mailjet/reporting.rb', line 27 def bounce( = {}) (.delete(:api) || Mailjet::Api.singleton).reportEmailbounce()["bounces"] || [] end |
.clicks(options = {}) ⇒ Object
7 8 9 10 11 |
# File 'lib/mailjet/reporting.rb', line 7 def clicks( = {}) ((.delete(:api) || Mailjet::Api.singleton).reportClick()["clicks"] || []).map do |click| Mailjet::Click.new(click) end end |
.clients(options = {}) ⇒ Object
17 18 19 |
# File 'lib/mailjet/reporting.rb', line 17 def clients( = {}) (.delete(:api) || Mailjet::Api.singleton).reportEmailclients()["email_clients"] || [] end |
.domains(options = {}) ⇒ Object
13 14 15 |
# File 'lib/mailjet/reporting.rb', line 13 def domains( = {}) (.delete(:api) || Mailjet::Api.singleton).reportDomain()["domains"] || [] end |
.emails(options = {}) ⇒ Object
21 22 23 24 25 |
# File 'lib/mailjet/reporting.rb', line 21 def emails( = {}) ((.delete(:api) || Mailjet::Api.singleton).reportEmailsent()["emails"] || []).map do |email| Mailjet::Email.new(email) end end |
.geolocation(options = {}) ⇒ Object
35 36 37 |
# File 'lib/mailjet/reporting.rb', line 35 def geolocation( = {}) (.delete(:api) || Mailjet::Api.singleton).reportGeoip()["geos"] end |
.statistics(options = {}) ⇒ Object
31 32 33 |
# File 'lib/mailjet/reporting.rb', line 31 def statistics( = {}) (.delete(:api) || Mailjet::Api.singleton).reportEmailstatistics()["stats"] end |