wxmpapi

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: MIT Imports: 1 Imported by: 0

README

微信小程序开发SDK

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

  • 支持多个小程序

使用方法

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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTokenStorePath

func SetTokenStorePath(tokenStorePath string)

func SetWxmpConf

func SetWxmpConf(cfgName, appId, appKey string)

Types

This section is empty.

Directories

Path Synopsis
*
*

Jump to

Keyboard shortcuts

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