Class: MailUp::Stats::Message
- Inherits:
-
Object
- Object
- MailUp::Stats::Message
- Defined in:
- lib/mailup/stats/message.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
Instance Method Summary collapse
-
#bounces(params = {}) ⇒ JSON
Paged list of bounces from the specified email.
-
#bounces_count ⇒ Integer
Count of bounces from the specified mail.
-
#clicks(params = {}) ⇒ JSON
Paged list of clicks on a link in the specified email.
-
#clicks_count ⇒ Integer
Count of clicks on a link in the specified email.
-
#initialize(id, api) ⇒ Message
constructor
A new instance of Message.
-
#recipients(params = {}) ⇒ JSON
Paged list of recipients who received the specified email.
-
#recipients_count ⇒ Integer
(also: #received_count)
Count of recipients who received the specified email.
-
#unsubscribes(params = {}) ⇒ JSON
Paged list of unsubscriptions from the specified email.
-
#unsubscribes_count ⇒ Integer
Count of unsubscriptions from the specified email.
-
#url_clicks(params = {}) ⇒ JSON
Paged list of clicks on a link in the specified email.
-
#url_clicks_count ⇒ Integer
Count of clicks on a link in the specified email.
-
#views(params = {}) ⇒ JSON
Paged list of views of the specified email.
-
#views_count ⇒ Integer
Count of views of the specified email.
Constructor Details
#initialize(id, api) ⇒ Message
Returns a new instance of Message.
6 7 8 9 |
# File 'lib/mailup/stats/message.rb', line 6 def initialize(id, api) @api = api @id = id end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
4 5 6 |
# File 'lib/mailup/stats/message.rb', line 4 def api @api end |
Instance Method Details
#bounces(params = {}) ⇒ JSON
Paged list of bounces from the specified email.
126 127 128 |
# File 'lib/mailup/stats/message.rb', line 126 def bounces(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Bounces", params: params) end |
#bounces_count ⇒ Integer
Count of bounces from the specified mail.
142 143 144 |
# File 'lib/mailup/stats/message.rb', line 142 def bounces_count @api.get("#{@api.path}/Message/#{@id}/Count/Bounces") end |
#clicks(params = {}) ⇒ JSON
Paged list of clicks on a link in the specified email.
216 217 218 |
# File 'lib/mailup/stats/message.rb', line 216 def clicks(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Clicks", params: params) end |
#clicks_count ⇒ Integer
Count of clicks on a link in the specified email.
232 233 234 |
# File 'lib/mailup/stats/message.rb', line 232 def clicks_count @api.get("#{@api.path}/Message/#{@id}/Count/Clicks") end |
#recipients(params = {}) ⇒ JSON
Paged list of recipients who received the specified email.
37 38 39 |
# File 'lib/mailup/stats/message.rb', line 37 def recipients(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Recipients", params: params) end |
#recipients_count ⇒ Integer Also known as: received_count
Count of recipients who received the specified email.
53 54 55 |
# File 'lib/mailup/stats/message.rb', line 53 def recipients_count @api.get("#{@api.path}/Message/#{@id}/Count/Recipients") end |
#unsubscribes(params = {}) ⇒ JSON
Paged list of unsubscriptions from the specified email.
170 171 172 |
# File 'lib/mailup/stats/message.rb', line 170 def unsubscribes(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Unsubscriptions", params: params) end |
#unsubscribes_count ⇒ Integer
Count of unsubscriptions from the specified email.
186 187 188 |
# File 'lib/mailup/stats/message.rb', line 186 def unsubscribes_count @api.get("#{@api.path}/Message/#{@id}/Count/Unsubscriptions") end |
#url_clicks(params = {}) ⇒ JSON
Paged list of clicks on a link in the specified email.
262 263 264 |
# File 'lib/mailup/stats/message.rb', line 262 def url_clicks(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/UrlClicks", params: params) end |
#url_clicks_count ⇒ Integer
Count of clicks on a link in the specified email.
278 279 280 |
# File 'lib/mailup/stats/message.rb', line 278 def url_clicks_count @api.get("#{@api.path}/Message/#{@id}/Count/UrlClicks") end |
#views(params = {}) ⇒ JSON
Paged list of views of the specified email.
82 83 84 |
# File 'lib/mailup/stats/message.rb', line 82 def views(params = {}) @api.get("#{@api.path}/Message/#{@id}/List/Views", params: params) end |
#views_count ⇒ Integer
Count of views of the specified email.
98 99 100 |
# File 'lib/mailup/stats/message.rb', line 98 def views_count @api.get("#{@api.path}/Message/#{@id}/Count/Views") end |