Files
baseapi/platformapi/ebaiapi/im_test.go
richboo111 cda0c6e9f3 1
2024-01-24 17:37:27 +08:00

47 lines
1.1 KiB
Go

package ebaiapi
import (
"fmt"
"testing"
)
func TestGetMediaUrl(t *testing.T) {
data, err := api.GetMediaUrl("1157916361", "$igHNA-kCpGpwZWcDAQTNBDgFzQlUBtoAI4QBpCErI2gCqszMIMLSLDBJb6QDzwAAAYuJvuhDBM4B-Y3tB88AAAACXUH2dAgACgQLzgAC08U")
fmt.Println(err)
fmt.Println(data)
}
func TestGetStoreImStatus(t *testing.T) {
data, err := api.GetStoreIMStatus("1157916361")
if err != nil {
t.Errorf("%v", err)
}
t.Log(data)
}
func TestAPI_UpdateIMStatus(t *testing.T) {
err := api.UpdateIMStatus("1157916361", ImStatusOpen)
fmt.Printf("err=%v", err)
}
func TestSendMsg(t *testing.T) {
err := api.BusinessSendMsg(&BusinessSendMsgReq{
PlatformShopId: "1157916361",
BizType: IMType,
SubBizType: IMTypeSendMsg,
PayLoad: BusinessMsgPayload{
GroupId: "$2$13205337818$PNM",
ReceiverIds: []string{"301157916361", "10154538612", "321921188187760"},
Content: "{\"text\": \"现在是20231027 10:04:44\"}",
ContentType: "1",
},
})
fmt.Println(err)
}
func TestNew(t *testing.T) {
a := 1698388286149
b := int(a / 1000)
fmt.Println(b)
}