M README.rst +16 -5
@@ 1,17 1,17 @@
-.. |nlshield| image:: https://img.shields.io/badge/100%-Netlandish-blue.svg?style=square-flat
+.. |nlshield| image:: https://img.shields.io/badge/100%25-Netlandish-blue.svg?style=square-flat
:target: http://www.netlandish.com
==============================
sendypy |nlshield|
==============================
:Info: Simple module to interface with the Sendy API (https://sendy.co/api)
-:Version: 0.1.3b
+:Version: 0.1.5b
:Author: Peter Sanchez (http://www.petersanchez.com) - (http://www.netlandish.com)
Dependencies
============
-* It was written for Python 2.7+
+* It was written for Python 2.7+ and Python 3.7+
* Depends on the requests module
**NOTE:**
@@ 44,15 44,26 @@ Usage is simple ::
from sendy.api import SendyAPI
api = SendyAPI(host='https://your-sendy-install.com/sendy/', api_key='YOUR_API_KEY')
-You don't need to set the api_key variable if you're using the
+You don't need to set the api_key variable if you're using the
subscribe or unsubscribe methods. You can also provide the optional
-"debug" variable (defaults to False). This will print debug into to
+"debug" variable (defaults to False). This will print debug into to
stdout when sending a request to your Sendy install.
**Subscribe** ::
api.subscribe('list_id_here', 'email@address.com', 'optional first name', custom_field_1='value', custom_field_2='value', ...)
+*Optional fields*
+
+- `country`: User's 2 letter country code.
+- `ipaddress`: User's IP address.
+- `referrer`: The URL where the user signed up from.
+- `gdpr`: If you're signing up EU users in a GDPR compliant manner.
+- `hp`: Include this 'honeypot' field to prevent spambots.
+
+ data = {"gdpr": True, "ipaddress": "127.0.0.1", "country": "US"}
+
+ api.subscribe(list_id, email, **data)
**Unsubscribe** ::
M sendy/__init__.py +1 -1
@@ 1,6 1,6 @@
from __future__ import unicode_literals
-VERSION = (0, 1, 4, 'beta', 0)
+VERSION = (0, 1, 5, 'beta', 0)
def get_version():
M setup.py +2 -1
@@ 25,7 25,8 @@ setup(
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
- 'Programming Language :: Python :: 3.7.0',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.7',
'Environment :: Web Environment',
],
include_package_data=True,