qq

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectPlatform

type ConnectPlatform struct {
	// contains filtered or unexported fields
}

Docs: https://wiki.connect.qq.com/%E4%BD%BF%E7%94%A8authorization_code%E8%8E%B7%E5%8F%96access_token https://wiki.connect.qq.com/%E5%85%AC%E5%85%B1%E8%BF%94%E5%9B%9E%E7%A0%81%E8%AF%B4%E6%98%8E

func NewConnectPlatform

func NewConnectPlatform(c ConnectPlatformConfig) *ConnectPlatform

func (*ConnectPlatform) GetAccessToken

func (c *ConnectPlatform) GetAccessToken(code string, redirectURI string) (*getAccessTokenResp, error)

GetAccessToken get access token through code.

func (*ConnectPlatform) GetAuthURL

func (c *ConnectPlatform) GetAuthURL(redirectURI string, state string) (string, error)

GetAuthURL get auth URL. After the user allows authorization, they will be redirected to the redirect_uri URL with code and state parameters.

func (*ConnectPlatform) GetUnionID

func (c *ConnectPlatform) GetUnionID(accessToken string) (*getUnionIDResp, error)

GetUnionID get unionid through access_token.

func (*ConnectPlatform) GetUserInfo

func (c *ConnectPlatform) GetUserInfo(accessToken, openID string) (*getUserInfoResp, error)

GetUserInfo get user info through access_token and openid.

type ConnectPlatformConfig

type ConnectPlatformConfig struct {
	ClientID     string
	ClientSecret string
}

Jump to

Keyboard shortcuts

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