Git Product home page Git Product logo

powerwechat's Introduction

PowerWeChat SDK

Go Build Go Test

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

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

产品特性

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

快速上手

go get -u github.com/ArtisanCloud/PowerWeChat/v2

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

import (
	"github.com/ArtisanCloud/PowerWeChat/v2/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快速导航

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

产品诞生背景

团队也是很多同学一样,从 PHP 转向 Golang,具体为什么,有什么好处,就不用我这里多介绍了吧。 但是现在因为微信的生态做私域化管理是得天独厚,所以我们公司也开发了蛮多企业微信的功能。只是在转型 golang 的过程中,没有找到像 (easywechat)这样好用的 sdk。所以我们就自己想为 golang 的同学们做一点贡献。产品会长期维护,迭代,希望同学们有兴趣在使用的过程中,多给意见。

联系我们

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

image info

powerwechat's People

Contributors

matrix-x avatar wallev avatar vkghj avatar walle-space avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.