wxwork

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CorpID string // CorpID corpid

	CorpSecret string // CorpSecret corp secret
)

Functions

This section is empty.

Types

type Error added in v1.3.3

type Error struct {
	ErrCode int    `json:"errcode"` // 错误代码
	ErrMsg  string `json:"errmsg"`  // 错误消息
}

type Token

type Token struct {
	AccessToken  string `json:"access_token"`  // 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
	ExpiresIn    int    `json:"expires_in"`    // access_token接口调用凭证超时时间,单位(秒)
	RefreshToken string `json:"refresh_token"` // 用户刷新access_token
	OpenID       string `json:"openid"`        // 用户唯一标识
	Scope        string `json:"scope"`         // 用户授权的作用域,使用逗号(,)分隔
	Error
}

Token token

func NewToken

func NewToken() *Token

NewToken new token

func (*Token) Access

func (t *Token) Access() (string, error)

Access token

func (*Token) Get added in v1.3.7

func (t *Token) Get() (*Token, error)

type User added in v1.3.3

type User struct {
	UserID         string `json:"UserId"`          // 成员UserID
	DeviceID       string `json:"DeviceId"`        // 手机设备号
	OpenID         string `json:"OpenId"`          // 非企业成员的标识,对当前企业唯一
	ExternalUserID string `json:"external_userid"` // 外部联系人id,当且仅当用户是企业的客户,且跟进人在应用的可见范围内时返回
	Error
}

User user

type Wxwork

type Wxwork struct{}

Wxwork Wxwork

func NewWxwork

func NewWxwork() *Wxwork

NewWxwork new wxwork

func (*Wxwork) User

func (w *Wxwork) User(code string) (*User, error)

User user

Jump to

Keyboard shortcuts

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