From 1a74d68a37d37bc23a9d8b84c4213417905968ec Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 29 Jul 2016 22:32:13 -0400 Subject: [PATCH] updated docs, version is 2.2 and explain changes --- notification/sendgrid.py | 42 ++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/notification/sendgrid.py b/notification/sendgrid.py index 7e4593a9a90..34f7ebca5bf 100644 --- a/notification/sendgrid.py +++ b/notification/sendgrid.py @@ -39,12 +39,16 @@ requirements: options: username: description: - - username for logging into the SendGrid account - required: true + - username for logging into the SendGrid account. + - Since 2.2 it is only required if api_key is not supplied. + required: false + default: null password: description: - password that corresponds to the username - required: true + - Since 2.2 it is only required if api_key is not supplied. + required: false + default: null from_address: description: - the address in the "from" field for the email @@ -60,34 +64,48 @@ options: api_key: description: - sendgrid API key to use instead of username/password - version_added: 2.1 + version_added: 2.2 + required: false + default: null cc: description: - a list of email addresses to cc - version_added: 2.1 + version_added: 2.2 + required: false + default: null bcc: description: - a list of email addresses to bcc - version_added: 2.1 + version_added: 2.2 + required: false + default: null attachments: description: - a list of relative or explicit paths of files you want to attach (7MB limit as per SendGrid docs) - version_added: 2.1 + version_added: 2.2 + required: false + default: null from_name: description: - the name you want to appear in the from field, i.e 'John Doe' - version_added: 2.1 + version_added: 2.2 + required: false + default: null html_body: description: - whether the body is html content that should be rendered - version_added: 2.1 - choices: [True, False] + version_added: 2.2 + required: false + default: false headers: description: - a dict to pass on as headers - version_added: 2.1 - + version_added: 2.2 + required: false + default: null author: "Matt Makai (@makaimc)" +notes: + - since 2.2 username and password are not required if you supply an api_key. ''' EXAMPLES = '''