|
|
|
@ -3,7 +3,7 @@ package test
|
|
|
|
|
import (
|
|
|
|
|
"encoding/json"
|
|
|
|
|
"fmt"
|
|
|
|
|
"mijia-go-sdk"
|
|
|
|
|
"mijia"
|
|
|
|
|
"testing"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
@ -12,12 +12,12 @@ func Test_login(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
user := "15542100924"
|
|
|
|
|
pwd := "1XAII@wsk"
|
|
|
|
|
result, _ := mijia_go_sdk.Login(user, pwd)
|
|
|
|
|
result, _ := mijia.Login(user, pwd)
|
|
|
|
|
_, err := json.Marshal(result)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
Mi := mijia_go_sdk.NewMiJia(result)
|
|
|
|
|
Mi := mijia.NewMiJia(result)
|
|
|
|
|
//Mi.Rooms()
|
|
|
|
|
Mi.Devices()
|
|
|
|
|
//Mi.Scenes(0)
|
|
|
|
|