Skip to content

Instantly share code, notes, and snippets.

@zohairshaikh
Last active October 2, 2019 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zohairshaikh/04c58f1a63de6db6a900522b138ec3ac to your computer and use it in GitHub Desktop.
Save zohairshaikh/04c58f1a63de6db6a900522b138ec3ac to your computer and use it in GitHub Desktop.
Example Usage of Fusion Wrapper
##### SMS Example #####
fw = FusionWrapper()
payload = {'contact': 'XXXXXXXXXX', 'message': 'Hello World!', 'countryCode': '91'}
job_id = fw.sms(FusionWrapper.SMS.OTP, payload=payload)
)
##### Email Example #####
payload = {
'to': ['xxxx@xxx.com'],
'message': 'Hello World!',
'subject': 'Email subject',
'cc': [],
'bcc': []
}
job_id = fw.email(FusionWrapper.EMAIL.WELCOME, payload=payload)
##### Webhook Example #####
payload = {
'url': 'https://livehealth.in/',
'data': {'param': 1},
'timeout': 20 # This is an optional param
}
job_id = fw.webhook(FusionWrapper.WEBHOOK.GET, payload=payload)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment