Skip to content

Commit

Permalink
Merge pull request #81 from SparkPost/ISSUE-80
Browse files Browse the repository at this point in the history
Update docs to describe attachments format properly
  • Loading branch information
richleland committed Mar 9, 2016
2 parents 366d669 + 888be02 commit 0d935e8
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions sparkpost/transmissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,27 @@ def send(self, **kwargs):
:param dict substitution_data: Corresponds to substitutions in
html/text content. See `substitutions reference
<https://www.sparkpost.com/docs/substitutions-reference>`_.
:param dict attachments: Corresponds to attachments.
See `Attachment Attributes reference
<https://developers.sparkpost.com/api/#/reference/transmissions>`_.
Replace `data` by `filename` if you want the library to perform
the base64 conversion. Example: `"filename": "/full/path/test.txt"`
:param attachments: List of dicts. For example:
.. code-block:: python
dict(
type='application/pdf',
name='document.pdf',
data='base64 encoded string'
)
Replace `data` with `filename` if you want the library to perform
the base64 conversion. For example:
.. code-block:: python
dict(
type='application/pdf',
name='document.pdf',
filename='/full/path/to/document.pdf'
)
:param str start_time: Delay generation of messages until this
datetime. Format YYYY-MM-DDTHH:MM:SS+-HH:MM. Example:
'2015-02-11T08:00:00-04:00'.
Expand Down

0 comments on commit 0d935e8

Please sign in to comment.