Skip to content

wxgame 开放数据 weixin 微信小游戏 关系链数据

License

Notifications You must be signed in to change notification settings

Birjemin/wxgameod

Repository files navigation

wxgameod-微信小游戏开放数据后台接口

Build Status Go Report Card codecov

开发者中心

引入方式

go get github.com/birjemin/wxgameod

接口列表

使用方式

  • 示例
httpClient := &utils.HTTPClient{
    Client: &http.Client{
        Timeout: 5 * time.Second,
    },
}
var m = SetUserStorage{
    AccessToken: "ACCESS_TOKEN",
    SessionKey:  "SESSION_KEY",
    OpenID:      "OPEN_ID",
    KvList:      "{\"kv_list\":[{\"key\":\"1\",\"value\":\"0\"}]}",
    HTTPRequest: httpClient,
}

if ret, err := m.doSetUserStorage(ts.URL); err != nil {
    t.Error(err)
} else {
    if ret.ErrCode != 0 {
        t.Error(errors.New("msg: " + ret.ErrMsg))
    }
}

测试

  • 测试
    go test
    
  • 格式化代码
    golint
    
  • 覆盖率
    go test -cover
    go test -coverprofile=coverage.out 
    go tool cover -html=coverage.out
    

备注

About

wxgame 开放数据 weixin 微信小游戏 关系链数据

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages