Files
baseapi/platformapi/unipushapi/unipushapi_test.go
2025-11-21 09:09:09 +08:00

45 lines
1.1 KiB
Go

package unipushapi
//
//import (
// "testing"
//
// "git.rosy.net.cn/baseapi"
// "git.rosy.net.cn/baseapi/utils"
// "go.uber.org/zap"
//)
//
//var (
// api *API
// sugarLogger *zap.SugaredLogger
//)
//
//func init() {
// logger, _ := zap.NewDevelopment()
// sugarLogger = logger.Sugar()
// baseapi.Init(sugarLogger)
// api = New("5lyyrvHODG6wC8Sdr3a9h", "iFrkUDmR2g5eqQpfh2kQ57", "WTn53qd6WAAdLMXfmXvzb7", "dGZcR0XGGg7H5Pd7FR3n47")
// api.CBSetToken("cf74937695849a89bcb414e49f03702416b49024a49e7f62570280f99eb63b58")
// // ef364b677911fa64d41a25d22d5e155065c4898046be65ddd627fa6c8cd87c2e
//}
//
//func TestCBRetrieveToken(t *testing.T) {
// result, err := api.CBRetrieveToken()
// if err != nil {
// t.Fatal(err.Error())
// }
// t.Log(utils.Format4Output(result, false))
//}
//
//func TestPushToSingle(t *testing.T) {
// result, err := api.PushToSingle("8aa96ba065a29a0135c5151819fb1666", false, &Notification{
// Title: "测试",
// Body: "测测测",
// })
// if err != nil {
// t.Fatal(err.Error())
// }
// t.Log(utils.Format4Output(result, false))
// // RASS_0911_1517001ff419d4699a0be17ac3f04a54
//}