Created
August 17, 2017 23:45
-
-
Save cliffom/e4023f5ec9a67daf77ac2d1d0f8e8eec 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
package main | |
import "os" | |
import "github.com/pusher/pusher-http-go" | |
func main() { | |
channel := os.Args[1] | |
event := os.Args[2] | |
message := os.Args[3] | |
client := pusher.Client{ | |
AppId: "<APP_ID>", | |
Key: "<KEY>", | |
Secret: "<SECRET>", | |
Cluster: "<CLUSTER>", | |
Secure: true, | |
} | |
data := map[string]string{"message": message} | |
client.Trigger(channel, event, data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment