Simple sdk for interacting with AskNicely API services. Supports the following actions:
- Add person
- Delete person
- Get historical statistics
- Get NPS
- Get person
- Get responses
- Get sent statistics
- Get unsubscribed
- Remove person
- Send survey
- Send bulk surveys
- Python3
- requests library
- Valid API credentials provided by AskNicely
git clone [email protected]:luma-institute/python-asknicely.git
cd asknicely
pip install --upgrade requests build
python -m buildYou can also add the following dependency to your requirements.txt file:
requests
-e [email protected]:luma-institute/python-asknicely.git@master#egg=asknicelyimport asknicely
asknicely = AskNicely("domain_key", "api_key")
asknicely.add_person("Test user", "[email protected]")
asknicely.delete_person("[email protected]")
asknicely.get_historical_stats("2019", "8", "1")
asknicely.get_nps()
asknicely.get_person("[email protected]")
asknicely.get_responses(since_time=thirty_days_ago, end_time=today)
asknicely.get_sent_stats("30", "10", "1")
asknicely.get_unsubscribed()
asknicely.remove_person("[email protected]")
asknicely.send_survey("[email protected]", "Fake User", False)
asknicely.send_survey_bulk([ { "name": "Test User1", "email": "[email protected]"}, { "name": "Test User2", "email": "[email protected]"} ])For supported arguments see the code.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D