Skip to content

Instantly share code, notes, and snippets.

@cliffom
Created August 17, 2017 23:45
Show Gist options
  • Save cliffom/e4023f5ec9a67daf77ac2d1d0f8e8eec to your computer and use it in GitHub Desktop.
Save cliffom/e4023f5ec9a67daf77ac2d1d0f8e8eec to your computer and use it in GitHub Desktop.
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