Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rosbit/go-wxmp-api

微信小程序SDK,支持服务多个小程序,配置简单,使用方便
https://github.com/rosbit/go-wxmp-api

golang mini-program sdk wechat

Last synced: about 6 hours ago
JSON representation

微信小程序SDK,支持服务多个小程序,配置简单,使用方便

Awesome Lists containing this project

README

        

# 微信小程序开发SDK

go-wxmp-api是对微信小程序API的封装,可以当作SDK使用,特点
- 支持多个小程序

## 使用方法

```go
packge main

import (
"github.com/rosbit/go-wxmp-api"
"github.com/rosbit/go-wxmp-api/auth"
)

func main() {
wxmpapi.SetTokenStorePath("/path/to/store/token")
wxmpapi.SetWxmpConf("cfg1", "appId1", "appKey1")
wxmpapi.SetWxmpConf("cfg2", "appId2", "appKey2")

session, err := auth.Code2Session("cfg1", "code-from-front-end")
// usage of session
}
```