Compare commits

..

4 Commits

Author SHA1 Message Date
kunmeng 5dce736664 添加mod 5 months ago
kunmeng 5df313385f 添加mod 5 months ago
kunmeng 5286ba798d 添加mod 5 months ago
kunmeng 9a34eb8d52 修改模块名 5 months ago

@ -1,8 +1,8 @@
package mijia_go_sdk package mijia
import ( import (
"encoding/json" "encoding/json"
"mijia-go-sdk/model" "git.r-2.top/kunmeng/mijia/model"
"strconv" "strconv"
) )

@ -1,3 +1,3 @@
module mijia-go-sdk module git.r-2.top/kunmeng/mijia
go 1.21 go 1.21.1

@ -1,4 +1,4 @@
package mijia_go_sdk package mijia
import ( import (
"crypto/hmac" "crypto/hmac"

@ -1,4 +1,4 @@
package mijia_go_sdk package mijia
// 小米认证授权信息 // 小米认证授权信息
type Authorize struct { type Authorize struct {

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

Loading…
Cancel
Save