Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #22

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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