Module: MagicBell::Client::Notifications
- Included in:
- MagicBell::Client
- Defined in:
- lib/magicbell/client/notifications.rb
Instance Method Summary collapse
-
#create_notification(to, title, content, action_url) ⇒ Object
Creates a notification for a given project.
Instance Method Details
#create_notification(to, title, content, action_url) ⇒ Object
Creates a notification for a given project
10 11 12 13 14 15 16 17 |
# File 'lib/magicbell/client/notifications.rb', line 10 def create_notification(to, title, content, action_url) params = {to: to, title: title, content: content, action_url: action_url} connection.post("/notifications.json") do |req| req.headers = {"X-MAGICBELL-API-SECRET" => MagicBell.api_secret} req.body = {notification: params} end end |