Skip to content

luma-institute/python-asknicely

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-asknicely

CircleCI

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

Requirements

  • Python3
  • requests library
  • Valid API credentials provided by AskNicely

Installation

git clone [email protected]:luma-institute/python-asknicely.git
cd asknicely 
pip install --upgrade requests build
python -m build

You can also add the following dependency to your requirements.txt file:

requests
-e [email protected]:luma-institute/python-asknicely.git@master#egg=asknicely

Basic usage

import 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.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

About

Simple SDK for AskNicely

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages