Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/artisancloud/powerwechattutorial

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/artisancloud/powerwechattutorial

  • v1.3.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

PowerWeChat 接口example路由表

-- ./routes/

  • apiMiniProgram.go
  • apiOfficial.go
  • apiPayment.go
  • apiWecom.go

寻找企业微信的成员功能接口

// ./routes/apiWecom.go

wecomRouter := r.Group("/wecom")
{
  // Handle user route
  wecomRouter.POST("/user/create", validate.ValidateUserCreate, user.APIUserCreate)
  wecomRouter.GET("/user/get", user.APIUserGet)
  wecomRouter.PUT("/user/update", user.APIUserUpdate)
  wecomRouter.DELETE("/user/delete", user.APIUserDelete)
  wecomRouter.DELETE("/user/batch", user.APIUserBatchDelete)

  ...

}

example: 获取成员信息,使用Insomian或postman等接口调试工具,提交json数据,获取成员。


// ./routes/controllers/wecom/user/userAPIController.go
// UserGet 读取成员
// https://open.work.weixin.qq.com/api/doc/90000/90135/90196
func APIUserGet(c *gin.Context) {
  userId := c.DefaultQuery("userId", "TestUserId")
  res, err := services.WeComContactApp.User.Get(userId)
  if err != nil {
	  panic(err)
  }

  c.JSON(http.StatusOK, res)
}
...

FAQs

Package last updated on 17 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc