mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
47 lines
746 B
Go
47 lines
746 B
Go
package ys
|
|
|
|
import "testing"
|
|
|
|
func TestYs_GetDeviceList(t *testing.T) {
|
|
ys := &Ys{
|
|
AppKey: "",
|
|
Secret: "",
|
|
IsRAM: 0,
|
|
AccountID: "",
|
|
}
|
|
devices, total, err := ys.GetDeviceList(0, 10)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
t.Log(devices)
|
|
t.Log(total)
|
|
}
|
|
|
|
func TestYs_GetDeviceChannelList(t *testing.T) {
|
|
ys := &Ys{
|
|
AppKey: "",
|
|
Secret: "",
|
|
IsRAM: 0,
|
|
AccountID: "",
|
|
}
|
|
chans, err := ys.GetDeviceChannelList("BA1996108")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
t.Log(chans)
|
|
}
|
|
|
|
func TestYs_GetDeviceDeviceLiveAddress(t *testing.T) {
|
|
ys := &Ys{
|
|
AppKey: "",
|
|
Secret: "",
|
|
IsRAM: 0,
|
|
AccountID: "",
|
|
}
|
|
live, err := ys.GetDeviceLiveAddress("BA1996108", 1)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
t.Log(live)
|
|
}
|