kefu

package
v0.0.0-...-f32fcc8 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateKfApi = "https://api.weixin.qq.com/customservice/kfaccount/add?access_token=%s"
	ModifyKfApi = "https://api.weixin.qq.com/customservice/kfaccount/update?access_token=%s"
	DeleteKfApi = "https://api.weixin.qq.com/customservice/kfaccount/del?access_token=%s"
	//开发者可调用本接口来上传图片作为客服人员的头像,头像图片文件必须是jpg格式,推荐使用640*640大小的图片以达到最佳效果
	SetKfAvatarApi = "http://api.weixin.qq.com/customservice/kfaccount/uploadheadimg?access_token=%s&kf_account=%s"
	GetKfListApi   = "https://api.weixin.qq.com/cgi-bin/customservice/getkflist?access_token=%s"
)
View Source
const (
	KeFuTypingApi = "https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token=%s"
)

Variables

This section is empty.

Functions

func CreateKeFu

func CreateKeFu(accessToken, account, nickname, password string) error

func DeleteKeFu

func DeleteKeFu(accessToken, account, nickname, password string) error

func SetKeFuAvatarByPath

func SetKeFuAvatarByPath(accessToken, account, imgPath string) error

func SetKeFuAvatarByUrl

func SetKeFuAvatarByUrl(accessToken, account, imgUrl string) error

func SetKeFuTypeStatus

func SetKeFuTypeStatus(accesstoken, userOpenID string, status TypeStatus) error

func UpdateKeFu

func UpdateKeFu(accessToken, account, nickname, password string) error

Types

type KeFuInfo

type KeFuInfo struct {
	KfAccount string `json:"kf_account"`
	NickName  string `json:"nickname"`
	Password  string `json:"password"`
	KfID      int    `json:"kf_id,omitempty"`
}

客服人员信息

func NewKeFu

func NewKeFu(account, nickname, password string) *KeFuInfo

type KeFuList

type KeFuList struct {
	KeFus []*KeFuInfo `json:"kf_list"`
}

func GetKeFuList

func GetKeFuList(accessToken string) (*KeFuList, error)

func (*KeFuList) AddKeFu

func (kfl *KeFuList) AddKeFu()

type KeFuTypeStatus

type KeFuTypeStatus struct {
	ToUser  string     `json:"touser,omitempty"`
	Command TypeStatus `json:"command,omitempty"`
}

type TypeStatus

type TypeStatus string
const (
	TYPE_STATUS_TYPING        TypeStatus = "Typing"
	TYPE_STATUS_TYPING_CANCLE            = "CancelTyping"
)

Jump to

Keyboard shortcuts

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