Class: Mandrill::Exports
- Inherits:
-
Object
- Object
- Mandrill::Exports
- Defined in:
- lib/mandrill/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#activity(notify_email = nil, date_from = nil, date_to = nil, tags = nil, senders = nil, states = nil, api_keys = nil) ⇒ Hash
Begins an export of your activity history.
-
#info(id) ⇒ Hash
Returns information about an export job.
-
#initialize(master) ⇒ Exports
constructor
A new instance of Exports.
-
#list ⇒ Array
Returns a list of your exports.
-
#rejects(notify_email = nil) ⇒ Hash
Begins an export of your rejection blacklist.
-
#whitelist(notify_email = nil) ⇒ Hash
Begins an export of your rejection whitelist.
Constructor Details
#initialize(master) ⇒ Exports
Returns a new instance of Exports.
224 225 226 |
# File 'lib/mandrill/api.rb', line 224 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
222 223 224 |
# File 'lib/mandrill/api.rb', line 222 def master @master end |
Instance Method Details
#activity(notify_email = nil, date_from = nil, date_to = nil, tags = nil, senders = nil, states = nil, api_keys = nil) ⇒ Hash
Begins an export of your activity history. The activity will be exported to a zip archive containing a single file named activity.csv in the same format as you would be able to export from your account’s activity view. It includes the following fields: Date, Email Address, Sender, Subject, Status, Tags, Opens, Clicks, Bounce Detail. If you have configured any custom metadata fields, they will be included in the exported data.
303 304 305 306 |
# File 'lib/mandrill/api.rb', line 303 def activity(notify_email=nil, date_from=nil, date_to=nil, =nil, senders=nil, states=nil, api_keys=nil) _params = {:notify_email => notify_email, :date_from => date_from, :date_to => date_to, :tags => , :senders => senders, :states => states, :api_keys => api_keys} return @master.call 'exports/activity', _params end |
#info(id) ⇒ Hash
Returns information about an export job. If the export job’s state is ‘complete’, the returned data will include a URL you can use to fetch the results. Every export job produces a zip archive, but the format of the archive is distinct for each job type. The api calls that initiate exports include more details about the output format for that job type.
237 238 239 240 |
# File 'lib/mandrill/api.rb', line 237 def info(id) _params = {:id => id} return @master.call 'exports/info', _params end |
#list ⇒ Array
Returns a list of your exports.
251 252 253 254 |
# File 'lib/mandrill/api.rb', line 251 def list() _params = {} return @master.call 'exports/list', _params end |
#rejects(notify_email = nil) ⇒ Hash
Begins an export of your rejection blacklist. The blacklist will be exported to a zip archive containing a single file named rejects.csv that includes the following fields: email, reason, detail, created_at, expires_at, last_event_at, expires_at.
265 266 267 268 |
# File 'lib/mandrill/api.rb', line 265 def rejects(notify_email=nil) _params = {:notify_email => notify_email} return @master.call 'exports/rejects', _params end |
#whitelist(notify_email = nil) ⇒ Hash
Begins an export of your rejection whitelist. The whitelist will be exported to a zip archive containing a single file named whitelist.csv that includes the following fields: email, detail, created_at.
279 280 281 282 |
# File 'lib/mandrill/api.rb', line 279 def whitelist(notify_email=nil) _params = {:notify_email => notify_email} return @master.call 'exports/whitelist', _params end |