Last active
October 26, 2016 18:26
-
-
Save MattPorto/7db13e4b390c25e06443e8780259f675 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#como usar o pusher para testar as notificações utilizando a dashboard do pusher.com | |
#1 - criar uma conta gratis | |
#2 - criar uma app | |
#3 - criar um arquivo com o nome que voce quiser (utilizaremos app.rb) | |
#4 - rodar o arquivo no terminal utilizando o comando ruby app.rb | |
#app.rb | |
require 'pusher' | |
#substituir os campos dos parametros pelos dados da app que voce criou no passo 2 | |
pusher = Pusher::Client.new app_id: 'YOUR APP ID', key: 'YOUR APP KEY', secret: 'YOUR APP SECRET' | |
pusher.trigger('my_channel', 'my_event', { | |
message: 'hello world' | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment