PowerWeChat

command module
v1.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: MIT Imports: 8 Imported by: 0

README

PowerWeChat SDK

Go Build Go Test

PowerWeChat是一款基于Golang的微信SDK开发框架。目前已经覆盖了微信小程序、企业微信、微信支付等绝大部分场景的API。

PowerWeChat致力于减少微信开发中的各种上手难度,使用者只需要关心API使用,不需要关注底层微信开发中需要用到各种AES加密和解密、签名以及验证,回调通知加解密等。

产品特性

  • 简易上手,安装一次,全覆盖微信功能接口
  • 开源项目,丰富的文档内容,长期维护
  • 大部分接口已经支持强类型覆盖
  • 完整的测试项目,支持Web API测试

快速上手

go get -u github.com/ArtisanCloud/PowerWeChat

示范:初始化实例对象,调用小程序的授权登陆接口

import (
  "github.com/ArtisanCloud/PowerWeChat/src/miniProgram"
  "os"
)

// 1. 初始化小程序应用实例
app, err := miniProgram.NewMiniProgram(&miniProgram.UserConfig{
	AppID:  os.Getenv("miniprogram_app_id"), // 小程序、公众号或者企业微信的appid
	Secret: os.Getenv("miniprogram_secret"), // 商户号 appID
	HttpDebug: true,
	Debug:     false,
})

// 2. 调用小程序的授权登陆接口
code := "CODE" // 前端小程序登录时,从微信获取的code
rs, err := app.Auth.Session(code)

printf(rs.OpenID)

更多实例接口,请打开官方文档

文档以及使用示例

  • 官网文档 :全面的接口文档,方便用户查找,使用我们开发的sdk功能
  • 使用示例 :您可以通过Tutorial来了解到PowerWeChat的配置和使用
API快速导航

更多内容请在官方文档 里面进行查阅。

联系我们

如果有任何意见,欢迎在Github Issue上提供意见反馈。同时,也欢迎扫描下方二维码加入企业微信讨论群。

image info

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL