wxapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResult

func CheckResult(result *Result, url string, request ...any) error

func Get

func Get[RESULT any](url string, request ...any) (*RESULT, error)

func Post

func Post[RESULT any](url string, request ...any) (*RESULT, error)

func PostResponse

func PostResponse(url string, request ...any) ([]byte, error)

PostResponse http post and get response

Types

type API

type API interface {
	GetAccessToken() (*GetAccessTokenResult, error)
	GetAppId() string
	GetAppSecret() string
}

func New

func New(appId, appSecret string) API

type GetAccessTokenResult

type GetAccessTokenResult struct {
	*Result
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
}

type Result

type Result struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

Directories

Path Synopsis
open
web

Jump to

Keyboard shortcuts

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