@ -2,6 +2,7 @@ package sms
import (
"fmt"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"testing"
)
@ -37,9 +38,9 @@ func TestClient_SendEmail(t *testing.T) {
func TestClient_SendFeiShuWebHook ( t * testing . T ) {
//req := CreateSendFeiShuWebHookRequest(SendFeiShuWebHookParam{
// Do: "sendCardText" ,
// Do: FeiShuWebHookDoTypeSendRichText ,
// Token: "b762f80c-fe4f-4182-b48e-5c78041592bc",
// Content: "[ {\"tag\":\"div\",\"text\":{\"tag\":\"plain_text\",\"content\":\"请完成以下任务:\"}},{\"tag\":\"action\",\"actions\":[{\"tag\":\"button\",\"text\":{\"tag\":\"plain_text\",\"content\":\"查看详情\"},\"type\":\"primary\",\"url\":\"https:\\\\\\\\/\\\\\\\\/example.com\\\\\\\\/task\"}]} ]",
// Content: "[ [{\"tag\":\"text\",\"text\":\"富文本信息: \"},{\"tag\":\"a\",\"text\":\"请查看\",\"href\":\"http://www.example.com/\"},{\"tag\":\"at\",\"user_id\":\"ou_18eac8********17ad4f02e8bbbb\"}] ]",
// Title: "卡片主标题",
// TitleColor: "purple",
//})
@ -48,10 +49,10 @@ func TestClient_SendFeiShuWebHook(t *testing.T) {
//if err != nil {
// panic(err)
//}
//fmt.Println(resp )
//
//fmt.Println(resp .Msg )
//req2 := CreateSendFeiShuWebHookRequest(SendFeiShuWebHookParam{
// Do: "sendSimpleText" ,
// Do: FeiShuWebHookDoTypeSendSimpleText ,
// Token: "b762f80c-fe4f-4182-b48e-5c78041592bc",
// Content: " - 苹果ID: XXXX\n - 游戏ID: XXXX\n - bundleID: XXXX\n - 应用名: XXX\n - 下架时间: 2025-04-18 12: 36: 52\n - IP: XX( 城市A省份) 、XX( 城市B省份) ; 说明: XX为具体的IP, 括号内为IP对应的城市; ",
//})
@ -80,7 +81,7 @@ func TestClient_SendFeiShuWebHook(t *testing.T) {
req3 := CreateSendFeiShuWebHookRequest ( SendFeiShuWebHookParam {
TitleColor : "purple" ,
Title : "监控报警" ,
Do : "sendCardText" ,
Do : FeiShuWebHookDoTypeSendCardText ,
Token : "b762f80c-fe4f-4182-b48e-5c78041592bc" ,
Content : "[{\"tag\":\"div\",\"text\":{\"tag\":\"plain_text\",\"content\":\"苹果ID: XXXX\"}},{\"tag\":\"div\",\"text\":{\"tag\":\"plain_text\",\"content\":\"游戏ID: XXXX\"}}]" ,
} )
@ -96,11 +97,15 @@ func TestClient_SendFeiShuWebHook(t *testing.T) {
func TestClient_SendSms ( t * testing . T ) {
req := CreateSendSmsRequest ( SendSmsParam {
Mobile : "18320021439" ,
Type : SmsType Register ,
Type : SmsType BindPhone ,
Code : 123456 ,
Expired : 5 ,
} )
req . Domain = requests . Host {
Default : "127.0.0.1:8804" ,
}
sms , err := client . SendSms ( req )
if err != nil {
panic ( err )