top <- create_topic("new_topic")
# simple notifications
publish(top, message = "This is a notification message", subject = "Notification!")
# endpoint-specific notification
publish(top, message = list(sms = "This is an sms message",
email = "This is an email"),
subject = "Notification!")
delete_topic(top)
Run the code above in your browser using DataLab