Skip to content

Commit

Permalink
Adds asm group ID
Browse files Browse the repository at this point in the history
  • Loading branch information
robertacosta committed Jan 22, 2015
1 parent d376f0b commit 09c3347
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
20 changes: 18 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ add_substitution
message.add_substitution('key', 'value')
set_substitutions
^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^

.. code:: python
Expand Down Expand Up @@ -337,9 +337,25 @@ add_filter
message = sendgrid.Mail()
message.add_filter('filter', 'setting', 'value')
`ASM Group`_
~~~~~~~~~~~~

.. code:: python
message = sendgrid.Mail()
message.smtpapi.set_asm_group_id(value)
set_asm_group_id
^^^^^^^^^^^^^^^^

.. code:: python
message = sendgrid.Mail()
message.set_asm_group_id(value)
Using Templates from the Template Engine
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python
Expand Down
3 changes: 3 additions & 0 deletions sendgrid/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,8 @@ def set_sections(self, sections):
def add_filter(self, filterKey, setting, value):
self.smtpapi.add_filter(filterKey, setting, value)

def set_asm_group_id(self, value):
self.smtpapi.set_asm_group_id(value)

def json_string(self):
return self.smtpapi.json_string()
4 changes: 3 additions & 1 deletion test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_send(self):
m.set_html('WIN')
m.set_text('WIN')
m.set_from('[email protected]')
m.set_asm_group_id(42)
m.add_cc('[email protected]')
m.add_bcc('[email protected]')
m.add_substitution('subKey', 'subValue')
Expand Down Expand Up @@ -85,7 +86,8 @@ def test_send(self):
"filter": "filterValue"
}
}
}
},
"asm_group_id": 42
}
'''))
self.assertEqual(url, test_url)
Expand Down

0 comments on commit 09c3347

Please sign in to comment.