title := "gomipush sdk send to alias123"
description := "gomipush sdk send to alias123"
passThrough := 0
client := NewClient("security")
msg := NewAndroidMessage(title, description , passThrough , []string{restrictedPackageName})
- Send to topic:
topic := "abc"
rsp, err := client.Send(msg).ToTopic(topic).Do(context.Background())
- Send to multi topics
topic := []string{"abc","abc2"}
rsp, err := client.Send(msg).ToMultiTopic(topic, op).Do(context.Background())
//op is type BroadcastTopicOp ,and can must be one in [Union, Intersection, Except]
- Send to RegId
regId := []string{"abc"}
rsp, err := client.Send(msg).ToToRegID(regId).Do(context.Background())
- Send to Alias
alias := []string{"abc"}
rsp, err := client.Send(msg).ToAlias(alias).Do(context.Background())
- Send to userAccount
userAccount := []string{"abc"}
rsp, err := client.Send(msg).ToUserAccount(userAccount).Do(context.Background())
- Send to All
rsp, err := client.Send(msg).ToAll().Do(context.Background())
大部分用例未经测试