Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added methods to schedule newsletter sending.

  • Loading branch information...
commit c52d3674e7831f79f0f5b6be78299c5883e89ca1 1 parent 352b23c
@tsharju authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/sendgrid/__init__.py
View
14 src/sendgrid/__init__.py
@@ -90,7 +90,7 @@ def newsletter_lists_email_add(self, list, data):
def newsletter_lists_email_get(self, list, email=""):
"""Get the email addresses and associated fields for a
Recipient list."""
- return self.api_newsletter_lists_email_get(list, email)
+ return self.api_newsletter_lists_email_get(list=list, email=email)
def newsletter_lists_email_delete(self, list, email):
"""Remove one or more emails from a Recipient List."""
@@ -108,6 +108,18 @@ def newsletter_recipients_delete(self, name, list):
"""Delete Recipient Lists from a Newsletter."""
return self.api_newsletter_recipients_delete(name=name, list=list)
+ def newsletter_schedule_add(self, name, at="", after=""):
+ """Schedule a delivery time for an existing Newsletter."""
+ return self.api_newsletter_schedule_add(name=name, at=at, after=after)
+
+ def newsletter_schedule_get(self, name):
+ """Retrieve the scheduled delivery time for and existing Newsletter."""
+ return self.api_newsletter_schedule_get(name=name)
+
+ def newsletter_schedule_delete(self, name):
+ """Cancel a scheduled send for a Newsletter."""
+ return self.api_newsletter_schedule_delete(name)
+
def __getattr__(self, method):
def get(self, *args, **kwargs):
return self.call(method, **kwargs)
Please sign in to comment.
Something went wrong with that request. Please try again.