Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xsleonard committed Sep 26, 2019
1 parent a3f97d0 commit 94fa3e8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ message = pystmark.Message(sender=SENDER, to='you@example.com', subject='Hi',
text='A message', tag='greeting')
pystmark.send(message, api_key=API_KEY)

# Send a template message
t_model = {'product_name': "Awesome Product",
'name': "Customer Name",
'action_url': "http://www.example.com/confirmation/aj3s5dopf98sdf",
'sender_name': "Product Team",
'product_address_line1': "Dover",
'product_address_line2': "DE 19012"}

message = pystmark.Message(sender=SENDER, to='you@example.com',
template_id=11111,
template_model=t_model,
tag='welcome')

pystmark.send_with_template(message, api_key=API_KEY)

# Send multiple messages (via Postmark's batch send API)
recipients = ['you{0}@example.com'.format(i) for i in xrange(20)]
Expand Down
11 changes: 11 additions & 0 deletions docs/advanced_api.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Sending Email
.. autoclass:: pystmark.BatchSender
:inherited-members:

.. autoclass:: pystmark.TemplateSender
:inherited-members:

.. _advanced_api_bounce_handling:

Bounce Handling
Expand All @@ -36,3 +39,11 @@ Bounce Handling

.. autoclass:: pystmark.DeliveryStats
:inherited-members:

.. _advanced_api_bounce_message_details:

Message Details
---------------

.. autoclass:: pystmark.OutboundMessageDetails
:inherited-members:
2 changes: 2 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Response Objects

.. autoclass:: pystmark.DeliveryStatsResponse

.. autoclass:: pystmark.OutboundMessageDetailsResponse


.. _response_data_wrappers:

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

# General information about the project.
project = u'pystmark'
copyright = u'2012, Pystmark Authors'
copyright = u'2012-2019, Pystmark Authors'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down

0 comments on commit 94fa3e8

Please sign in to comment.