Skip to content

Commit 0f0453e

Browse files
author
Dustin Shields-Cloues
committed
Documentation improvements
1 parent 98d9f6c commit 0f0453e

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

lib/mandrill/api.rb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def add(email, comment=nil, subaccount=nil)
447447
# @return [Array] Up to 1000 rejection entries
448448
# - [Hash] return[] the information for each rejection blacklist entry
449449
# - [String] email the email that is blocked
450-
# - [String] reason the type of event (hard-bounce, soft-bounce, spam, unsub) that caused this rejection
450+
# - [String] reason the type of event (hard-bounce, soft-bounce, spam, unsub, custom) that caused this rejection
451451
# - [String] detail extended details about the event, such as the SMTP diagnostic for bounces or the comment for manually-created rejections
452452
# - [String] created_at when the email was added to the blacklist
453453
# - [String] last_event_at the timestamp of the most recent event that either created or renewed this rejection
@@ -831,11 +831,11 @@ def initialize(master)
831831
# @param [Boolean] async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
832832
# @param [String] ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
833833
# @param [String] send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.
834-
# @return [Array] of structs for each recipient containing the key "email" with the email address and "status" as either "sent", "queued", or "rejected"
834+
# @return [Array] of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
835835
# - [Hash] return[] the sending results for a single recipient
836836
# - [String] email the email address of the recipient
837837
# - [String] status the sending status of the recipient - either "sent", "queued", "scheduled", "rejected", or "invalid"
838-
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected"
838+
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
839839
# - [String] _id the message's unique id
840840
def send(message, async=false, ip_pool=nil, send_at=nil)
841841
_params = {:message => message, :async => async, :ip_pool => ip_pool, :send_at => send_at}
@@ -908,19 +908,19 @@ def send(message, async=false, ip_pool=nil, send_at=nil)
908908
# @param [Boolean] async enable a background sending mode that is optimized for bulk sending. In async mode, messages/send will immediately return a status of "queued" for every recipient. To handle rejections when sending in async mode, set up a webhook for the 'reject' event. Defaults to false for messages with no more than 10 recipients; messages with more than 10 recipients are always sent asynchronously, regardless of the value of async.
909909
# @param [String] ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
910910
# @param [String] send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately. An additional fee applies for scheduled email, and this feature is only available to accounts with a positive balance.
911-
# @return [Array] of structs for each recipient containing the key "email" with the email address and "status" as either "sent", "queued", "scheduled", or "rejected"
911+
# @return [Array] of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
912912
# - [Hash] return[] the sending results for a single recipient
913913
# - [String] email the email address of the recipient
914914
# - [String] status the sending status of the recipient - either "sent", "queued", "rejected", or "invalid"
915-
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected"
915+
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
916916
# - [String] _id the message's unique id
917917
def send_template(template_name, template_content, message, async=false, ip_pool=nil, send_at=nil)
918918
_params = {:template_name => template_name, :template_content => template_content, :message => message, :async => async, :ip_pool => ip_pool, :send_at => send_at}
919919
return @master.call 'messages/send-template', _params
920920
end
921921

922-
# Search the content of recently sent messages and optionally narrow by date range, tags and senders
923-
# @param [String] query the search terms to find matching messages for
922+
# Search recently sent messages and optionally narrow by date range, tags, senders, and API keys. If no date range is specified, results within the last 7 days are returned. This method may be called up to 20 times per minute. If you need the data more often, you can use <a href="/api/docs/messages.html#method=info">/messages/info.json</a> to get the information for a single message, or <a href="http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks">webhooks</a> to push activity to your own application for querying.
923+
# @param [String] query <a href="http://help.mandrill.com/entries/22211902">search terms</a> to find matching messages
924924
# @param [String] date_from start date
925925
# @param [String] date_to end date
926926
# @param [Array] tags an array of tag names to narrow the search to, will return messages that contain ANY of the tags
@@ -1091,11 +1091,11 @@ def parse(raw_message)
10911091
# @param [String] ip_pool the name of the dedicated ip pool that should be used to send the message. If you do not have any dedicated IPs, this parameter has no effect. If you specify a pool that does not exist, your default pool will be used instead.
10921092
# @param [String] send_at when this message should be sent as a UTC timestamp in YYYY-MM-DD HH:MM:SS format. If you specify a time in the past, the message will be sent immediately.
10931093
# @param [String] return_path_domain a custom domain to use for the messages's return-path
1094-
# @return [Array] of structs for each recipient containing the key "email" with the email address and "status" as either "sent", "queued", or "rejected"
1094+
# @return [Array] of structs for each recipient containing the key "email" with the email address, and details of the message status for that recipient
10951095
# - [Hash] return[] the sending results for a single recipient
10961096
# - [String] email the email address of the recipient
10971097
# - [String] status the sending status of the recipient - either "sent", "queued", "scheduled", "rejected", or "invalid"
1098-
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected"
1098+
# - [String] reject_reason the reason for the rejection if the recipient status is "rejected" - one of "hard-bounce", "soft-bounce", "spam", "unsub", "custom", "invalid-sender", "invalid", "test-mode-limit", or "rule"
10991099
# - [String] _id the message's unique id
11001100
def send_raw(raw_message, from_email=nil, from_name=nil, to=nil, async=false, ip_pool=nil, send_at=nil, return_path_domain=nil)
11011101
_params = {:raw_message => raw_message, :from_email => from_email, :from_name => from_name, :to => to, :async => async, :ip_pool => ip_pool, :send_at => send_at, :return_path_domain => return_path_domain}
@@ -1156,11 +1156,12 @@ def initialize(master)
11561156

11571157
# Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically.
11581158
# @param [String] email an email address to add to the whitelist
1159+
# @param [String] comment an optional description of why the email was whitelisted
11591160
# @return [Hash] a status object containing the address and the result of the operation
11601161
# - [String] email the email address you provided
1161-
# - [Boolean] whether the operation succeeded
1162-
def add(email)
1163-
_params = {:email => email}
1162+
# - [Boolean] added whether the operation succeeded
1163+
def add(email, comment=nil)
1164+
_params = {:email => email, :comment => comment}
11641165
return @master.call 'whitelists/add', _params
11651166
end
11661167

mandrill-api.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'mandrill-api'
3-
s.version = '1.0.51'
3+
s.version = '1.0.52'
44
s.summary = 'A Ruby API library for the Mandrill email as a service platform.'
55
s.description = s.summary
66
s.authors = ['Mandrill Devs']

0 commit comments

Comments
 (0)