https://github.com/birjemin/wxgameod
wxgame 开放数据 weixin 微信小游戏 关系链数据
https://github.com/birjemin/wxgameod
data interactive-data relation user-storage
Last synced: 11 months ago
JSON representation
wxgame 开放数据 weixin 微信小游戏 关系链数据
- Host: GitHub
- URL: https://github.com/birjemin/wxgameod
- Owner: Birjemin
- License: mit
- Created: 2020-11-03T05:57:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T08:13:54.000Z (over 5 years ago)
- Last Synced: 2024-06-20T17:48:37.229Z (almost 2 years ago)
- Topics: data, interactive-data, relation, user-storage
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## wxgameod-微信小游戏开放数据后台接口
[](https://travis-ci.com/Birjemin/wxgameod)
[](https://goreportcard.com/report/github.com/birjemin/wxgameod)
[](https://codecov.io/gh/Birjemin/wxgameod)
[开发者中心](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.removeUserStorage.html)
### 引入方式
```
go get github.com/birjemin/wxgameod
```
### 接口列表
- [removeUserStorage](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.removeUserStorage.html) ✅
- [setUserInteractiveData](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.setUserInteractiveData.html) ✅
- [setUserStorage](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/data/storage.setUserStorage.html) ✅
### 使用方式
- 示例
```golang
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
```
### 备注
无