class MailUp::Stats::Message

Attributes

api[RW]

Public Class Methods

new(id, api) click to toggle source
# File lib/mailup/stats/message.rb, line 6
def initialize(id, api)
    @api = api
    @id = id
end

Public Instance Methods

bounces(params = {}) click to toggle source

Paged list of bounces from the specified email.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListMessageBounces

@example

bounces = mailup.stats.message(9).bounces
bounces['TotalElementsCount']
=> 10
# File lib/mailup/stats/message.rb, line 126
def bounces(params = {})
  @api.get("#{@api.path}/Message/#{@id}/List/Bounces", params: params)
end
bounces_count() click to toggle source

Count of bounces from the specified mail.

@return [Integer] Count of bounces.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountMessageBounces

@example

bounces = mailup.stats.message(9).bounces_count
=> 3453
# File lib/mailup/stats/message.rb, line 142
def bounces_count
  @api.get("#{@api.path}/Message/#{@id}/Count/Bounces")
end
clicks(params = {}) click to toggle source

Paged list of clicks on a link in the specified email.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListMessageClicks

@example

clicks = mailup.stats.message(9).clicks
clicks['TotalElementsCount']
=> 10
clicks['Items'].first['Count']
=> 3
# File lib/mailup/stats/message.rb, line 216
def clicks(params = {})
  @api.get("#{@api.path}/Message/#{@id}/List/Clicks", params: params)
end
clicks_count() click to toggle source

Count of clicks on a link in the specified email.

@return [Integer] Count of bounces.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountMessageClicks

@example

clicks = mailup.stats.message(9).clicks_count
=> 3453
# File lib/mailup/stats/message.rb, line 232
def clicks_count
  @api.get("#{@api.path}/Message/#{@id}/Count/Clicks")
end
received_count()
Alias for: recipients_count
recipients(params = {}) click to toggle source

Paged list of recipients who received the specified email.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListMessageRecipients

@example

recipients = mailup.stats.message(9).recipients
recipients['TotalElementsCount']
=> 10
recipients['Items'].first['Email']
=> "joe@public.com"
# File lib/mailup/stats/message.rb, line 37
def recipients(params = {})
  @api.get("#{@api.path}/Message/#{@id}/List/Recipients", params: params)
end
recipients_count() click to toggle source

Count of recipients who received the specified email.

@return [Integer] Count of recipients.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountMessageRecipients

@example

recipients = mailup.stats.message(9).recipients_count
=> 10
# File lib/mailup/stats/message.rb, line 53
def recipients_count
  @api.get("#{@api.path}/Message/#{@id}/Count/Recipients")
end
Also aliased as: received_count
unsubscribes(params = {}) click to toggle source

Paged list of unsubscriptions from the specified email.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListMessageUnsubscriptions

@example

unsubs = mailup.stats.message(9).unsubscribes
unsubs['TotalElementsCount']
=> 10
# File lib/mailup/stats/message.rb, line 170
def unsubscribes(params = {})
  @api.get("#{@api.path}/Message/#{@id}/List/Unsubscriptions", params: params)
end
unsubscribes_count() click to toggle source

Count of unsubscriptions from the specified email.

@return [Integer] Count of unsubscribes.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountMessageUnsubscriptions

@example

unsubs = mailup.stats.message(9).unsubscribes_count
=> 234
# File lib/mailup/stats/message.rb, line 186
def unsubscribes_count
  @api.get("#{@api.path}/Message/#{@id}/Count/Unsubscriptions")
end
url_clicks(params = {}) click to toggle source

Paged list of clicks on a link in the specified email.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListMessageUrlClicks

@example

url_clicks = mailup.stats.message(9).url_clicks
url_clicks['TotalElementsCount']
=> 10
url_clicks['Items'].first['Count']
=> 3
# 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() click to toggle source

Count of clicks on a link in the specified email.

@return [Integer] Count of bounces.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountMessageClicks

@example

url_clicks = mailup.stats.message(9).url_clicks_count
=> 3453
# File lib/mailup/stats/message.rb, line 278
def url_clicks_count
  @api.get("#{@api.path}/Message/#{@id}/Count/UrlClicks")
end
views(params = {}) click to toggle source

Paged list of views of the specified email.

@param [Hash] params Optional params or filters: @option params [Integer] :pageNumber The page number to return. @option params [Integer] :pageSize The number of results to per page. @option params [String] :filterby A filtering expression. @option params [String] :orderby The sorting condition for the results.

@return [JSON] Results and data including:

* IsPaginated [Boolean]
* Items [Array<Hash>]
* PageNumber [Integer]
* PageSize [Integer]
* Skipped [Integer]
* TotalElementsCount [Integer]

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-ListMessageViews

@example

views = mailup.stats.message(9).views
views['TotalElementsCount']
=> 10
# File lib/mailup/stats/message.rb, line 82
def views(params = {})
  @api.get("#{@api.path}/Message/#{@id}/List/Views", params: params)
end
views_count() click to toggle source

Count of views of the specified email.

@return [Integer] Count of views.

@see help.mailup.com/display/mailupapi/Email+statistics+methods+v1.1#Emailstatisticsmethodsv1.1-CountMessageViews

@example

views = mailup.stats.message(9).views_count
=> 3453
# File lib/mailup/stats/message.rb, line 98
def views_count
  @api.get("#{@api.path}/Message/#{@id}/Count/Views")
end