Skip to content

Commit 4ba0cdc

Browse files
committed
README
1 parent ebe4e4d commit 4ba0cdc

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,31 @@
22

33
A fast wechat miniprogram/minigame development framework written in Golang
44

5-
## 演示 Demo
5+
## 快速开始 & demo
6+
7+
```shell script
8+
go get github.com/fastwego/miniprogram
9+
```
10+
11+
```go
12+
// 创建小程序/小游戏实例
13+
app := miniprogram.New(miniprogram.MiniprogramConfig{
14+
Appid: "APPID",
15+
Secret: "SECRET",
16+
})
17+
18+
var payload = []byte(`{
19+
"begin_date" : "20170313",
20+
"end_date" : "20170313"
21+
}`)
22+
23+
// 调用 api
24+
resp, err := datacube.GetDailyRetain(app, payload)
25+
fmt.Println(string(resp),err)
26+
```
27+
28+
29+
完整演示项目:
630

731
[https://github.com/fastwego/miniprogram-demo](https://github.com/fastwego/miniprogram-demo)
832

minigame/cmd/parseDocLink.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ServerUrl = `https://developers.weixin.qq.com`
3131

3232
var apiUniqMap = map[string]bool{}
3333

34-
func run() {
34+
func main() {
3535

3636
file, err := ioutil.ReadFile("./data/doc_links.html")
3737
if err != nil {

0 commit comments

Comments
 (0)