mandrill-api 1.0.43 → 1.0.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mandrill/api.rb +75 -5
  2. metadata +5 -6
@@ -274,6 +274,8 @@ module Mandrill
274
274
  # - [String] senders[] a sender address
275
275
  # @param [Array] states an array of states to narrow the export to; messages with ANY of the states will be included
276
276
  # - [String] states[] a message state
277
+ # @param [Array] api_keys an array of api keys to narrow the export to; messsagse sent with ANY of the keys will be included
278
+ # - [String] api_keys[] an API key associated with your account
277
279
  # @return [Hash] information about the activity export job that was started
278
280
  # - [String] id the unique identifier for this Export. Use this identifier when checking the export job's status
279
281
  # - [String] created_at the date and time that the export job was created as a UTC string in YYYY-MM-DD HH:MM:SS format
@@ -281,8 +283,8 @@ module Mandrill
281
283
  # - [String] finished_at the date and time that the export job was finished as a UTC string in YYYY-MM-DD HH:MM:SS format, or null for jobs that have not run
282
284
  # - [String] state the export job's state
283
285
  # - [String] result_url the url for the export job's results, if the job is complete
284
- def activity(notify_email=nil, date_from=nil, date_to=nil, tags=nil, senders=nil, states=nil)
285
- _params = {:notify_email => notify_email, :date_from => date_from, :date_to => date_to, :tags => tags, :senders => senders, :states => states}
286
+ def activity(notify_email=nil, date_from=nil, date_to=nil, tags=nil, senders=nil, states=nil, api_keys=nil)
287
+ _params = {:notify_email => notify_email, :date_from => date_from, :date_to => date_to, :tags => tags, :senders => senders, :states => states, :api_keys => api_keys}
286
288
  return @master.call 'exports/activity', _params
287
289
  end
288
290
 
@@ -694,6 +696,7 @@ module Mandrill
694
696
  # - [Boolean] inline_css whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size
695
697
  # - [Boolean] url_strip_qs whether or not to strip the query string from URLs when aggregating tracked URL data
696
698
  # - [Boolean] preserve_recipients whether or not to expose all recipients in to "To" header for each email
699
+ # - [Boolean] view_content_link set to false to remove content logging for sensitive emails
697
700
  # - [String] bcc_address an optional address to receive an exact copy of each recipient's email
698
701
  # - [String] tracking_domain a custom domain to use for tracking opens and clicks instead of mandrillapp.com
699
702
  # - [String] signing_domain a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients)
@@ -769,6 +772,7 @@ module Mandrill
769
772
  # - [Boolean] inline_css whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size
770
773
  # - [Boolean] url_strip_qs whether or not to strip the query string from URLs when aggregating tracked URL data
771
774
  # - [Boolean] preserve_recipients whether or not to expose all recipients in to "To" header for each email
775
+ # - [Boolean] view_content_link set to false to remove content logging for sensitive emails
772
776
  # - [String] bcc_address an optional address to receive an exact copy of each recipient's email
773
777
  # - [String] tracking_domain a custom domain to use for tracking opens and clicks instead of mandrillapp.com
774
778
  # - [String] signing_domain a custom domain to use for SPF/DKIM signing instead of mandrill (for "via" or "on behalf of" in email clients)
@@ -825,6 +829,7 @@ module Mandrill
825
829
  # @param [String] date_to end date
826
830
  # @param [Array] tags an array of tag names to narrow the search to, will return messages that contain ANY of the tags
827
831
  # @param [Array] senders an array of sender addresses to narrow the search to, will return messages sent by ANY of the senders
832
+ # @param [Array] api_keys an array of API keys to narrow the search to, will return messages sent by ANY of the keys
828
833
  # @param [Integer] limit the maximum number of results to return, defaults to 100, 1000 is the maximum
829
834
  # @return [Array] of structs for each matching message
830
835
  # - [Hash] return[] the information for a single matching message
@@ -858,8 +863,8 @@ module Mandrill
858
863
  # - [Integer] ts the Unix timestamp when the event occured
859
864
  # - [String] type the message's state as a result of this event
860
865
  # - [String] diag the SMTP response from the recipient's server
861
- def search(query='*', date_from=nil, date_to=nil, tags=nil, senders=nil, limit=100)
862
- _params = {:query => query, :date_from => date_from, :date_to => date_to, :tags => tags, :senders => senders, :limit => limit}
866
+ def search(query='*', date_from=nil, date_to=nil, tags=nil, senders=nil, api_keys=nil, limit=100)
867
+ _params = {:query => query, :date_from => date_from, :date_to => date_to, :tags => tags, :senders => senders, :api_keys => api_keys, :limit => limit}
863
868
  return @master.call 'messages/search', _params
864
869
  end
865
870
 
@@ -954,7 +959,7 @@ module Mandrill
954
959
  return @master.call 'messages/parse', _params
955
960
  end
956
961
 
957
- # Take a raw MIME document for a message, and send it exactly as if it were sent over the SMTP protocol
962
+ # Take a raw MIME document for a message, and send it exactly as if it were sent through Mandrill's SMTP servers
958
963
  # @param [String] raw_message the full MIME document of an email message
959
964
  # @param [String, nil] from_email optionally define the sender address - otherwise we'll use the address found in the provided headers
960
965
  # @param [String, nil] from_name optionally define the sender alias
@@ -1411,11 +1416,76 @@ module Mandrill
1411
1416
  # - [Hash] return[] the information on each sending domain for the account
1412
1417
  # - [String] domain the sender domain name
1413
1418
  # - [String] created_at the date and time that the sending domain was first seen as a UTC string in YYYY-MM-DD HH:MM:SS format
1419
+ # - [String] last_tested_at when the domain's DNS settings were last tested as a UTC string in YYYY-MM-DD HH:MM:SS format
1420
+ # - [Hash] spf details about the domain's SPF record
1421
+ # - [Boolean] valid whether the domain's SPF record is valid for use with Mandrill
1422
+ # - [String] valid_after when the domain's SPF record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format. If set, this indicates that the record is valid now, but was previously invalid, and Mandrill will wait until the record's TTL elapses to start using it.
1423
+ # - [String] error an error describing the spf record, or null if the record is correct
1424
+ # - [Hash] dkim details about the domain's DKIM record
1425
+ # - [Boolean] valid whether the domain's DKIM record is valid for use with Mandrill
1426
+ # - [String] valid_after when the domain's DKIM record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format. If set, this indicates that the record is valid now, but was previously invalid, and Mandrill will wait until the record's TTL elapses to start using it.
1427
+ # - [String] error an error describing the DKIM record, or null if the record is correct
1428
+ # - [String] verified_at if the domain has been verified, this indicates when that verification occurred as a UTC string in YYYY-MM-DD HH:MM:SS format
1429
+ # - [Boolean] valid_signing whether this domain can be used to authenticate mail, either for itself or as a custom signing domain. If this is false but spf and dkim are both valid, you will need to verify the domain before using it to authenticate mail
1414
1430
  def domains()
1415
1431
  _params = {}
1416
1432
  return @master.call 'senders/domains', _params
1417
1433
  end
1418
1434
 
1435
+ # Adds a sender domain to your account. Sender domains are added automatically as you send, but you can use this call to add them ahead of time.
1436
+ # @param [String] domain a domain name
1437
+ # @return [Hash] information about the domain
1438
+ # - [String] domain the sender domain name
1439
+ # - [String] created_at the date and time that the sending domain was first seen as a UTC string in YYYY-MM-DD HH:MM:SS format
1440
+ # - [String] last_tested_at when the domain's DNS settings were last tested as a UTC string in YYYY-MM-DD HH:MM:SS format
1441
+ # - [Hash] spf details about the domain's SPF record
1442
+ # - [Boolean] valid whether the domain's SPF record is valid for use with Mandrill
1443
+ # - [String] valid_after when the domain's SPF record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format. If set, this indicates that the record is valid now, but was previously invalid, and Mandrill will wait until the record's TTL elapses to start using it.
1444
+ # - [String] error an error describing the spf record, or null if the record is correct
1445
+ # - [Hash] dkim details about the domain's DKIM record
1446
+ # - [Boolean] valid whether the domain's DKIM record is valid for use with Mandrill
1447
+ # - [String] valid_after when the domain's DKIM record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format. If set, this indicates that the record is valid now, but was previously invalid, and Mandrill will wait until the record's TTL elapses to start using it.
1448
+ # - [String] error an error describing the DKIM record, or null if the record is correct
1449
+ # - [String] verified_at if the domain has been verified, this indicates when that verification occurred as a UTC string in YYYY-MM-DD HH:MM:SS format
1450
+ # - [Boolean] valid_signing whether this domain can be used to authenticate mail, either for itself or as a custom signing domain. If this is false but spf and dkim are both valid, you will need to verify the domain before using it to authenticate mail
1451
+ def add_domain(domain)
1452
+ _params = {:domain => domain}
1453
+ return @master.call 'senders/add-domain', _params
1454
+ end
1455
+
1456
+ # Checks the SPF and DKIM settings for a domain. If you haven't already added this domain to your account, it will be added automatically.
1457
+ # @param [String] domain a domain name
1458
+ # @return [Hash] information about the sender domain
1459
+ # - [String] domain the sender domain name
1460
+ # - [String] created_at the date and time that the sending domain was first seen as a UTC string in YYYY-MM-DD HH:MM:SS format
1461
+ # - [String] last_tested_at when the domain's DNS settings were last tested as a UTC string in YYYY-MM-DD HH:MM:SS format
1462
+ # - [Hash] spf details about the domain's SPF record
1463
+ # - [Boolean] valid whether the domain's SPF record is valid for use with Mandrill
1464
+ # - [String] valid_after when the domain's SPF record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format. If set, this indicates that the record is valid now, but was previously invalid, and Mandrill will wait until the record's TTL elapses to start using it.
1465
+ # - [String] error an error describing the spf record, or null if the record is correct
1466
+ # - [Hash] dkim details about the domain's DKIM record
1467
+ # - [Boolean] valid whether the domain's DKIM record is valid for use with Mandrill
1468
+ # - [String] valid_after when the domain's DKIM record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format. If set, this indicates that the record is valid now, but was previously invalid, and Mandrill will wait until the record's TTL elapses to start using it.
1469
+ # - [String] error an error describing the DKIM record, or null if the record is correct
1470
+ # - [String] verified_at if the domain has been verified, this indicates when that verification occurred as a UTC string in YYYY-MM-DD HH:MM:SS format
1471
+ # - [Boolean] valid_signing whether this domain can be used to authenticate mail, either for itself or as a custom signing domain. If this is false but spf and dkim are both valid, you will need to verify the domain before using it to authenticate mail
1472
+ def check_domain(domain)
1473
+ _params = {:domain => domain}
1474
+ return @master.call 'senders/check-domain', _params
1475
+ end
1476
+
1477
+ # Sends a verification email in order to verify ownership of a domain. Domain verification is an optional step to confirm ownership of a domain. Once a domain has been verified in a Mandrill account, other accounts may not have their messages signed by that domain unless they also verify the domain. This prevents other Mandrill accounts from sending mail signed by your domain.
1478
+ # @param [String] domain a domain name at which you can receive email
1479
+ # @param [String] mailbox a mailbox at the domain where the verification email should be sent
1480
+ # @return [Hash] information about the verification that was sent
1481
+ # - [String] status "sent" indicates that the verification has been sent, "already_verified" indicates that the domain has already been verified with your account
1482
+ # - [String] domain the domain name you provided
1483
+ # - [String] email the email address the verification email was sent to
1484
+ def verify_domain(domain, mailbox)
1485
+ _params = {:domain => domain, :mailbox => mailbox}
1486
+ return @master.call 'senders/verify-domain', _params
1487
+ end
1488
+
1419
1489
  # Return more detailed information about a single sender, including aggregates of recent stats
1420
1490
  # @param [String] address the email address of the sender
1421
1491
  # @return [Hash] the detailed information on the sender
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandrill-api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 65
4
+ hash: 79
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 43
10
- version: 1.0.43
9
+ - 44
10
+ version: 1.0.44
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mandrill Devs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-08-23 00:00:00 Z
18
+ date: 2013-08-30 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json
@@ -104,10 +104,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements: []
105
105
 
106
106
  rubyforge_project:
107
- rubygems_version: 1.8.24
107
+ rubygems_version: 1.8.15
108
108
  signing_key:
109
109
  specification_version: 3
110
110
  summary: A Ruby API library for the Mandrill email as a service platform.
111
111
  test_files: []
112
112
 
113
- has_rdoc: