lark

package
v0.0.0-...-8c01324 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotifyBaseURL             = "https://open.feishu.cn/open-apis/message/v4/batch_send"
	GetTenantAccountTokenURL  = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
	GetLarkUserIDByMobilesURL = "https://open.feishu.cn/open-apis/contact/v3/users/batch_get_id"

	MessageTextType  = "text"
	MessageImageType = "image"
	MessageShareType = "share_chat"
)

Variables

This section is empty.

Functions

func GetLarkAccountToken

func GetLarkAccountToken() (at string, err error)

GetLarkAccountToken @Description: get lark tenant account token @return err

func GetLarkUserIDByMobiles

func GetLarkUserIDByMobiles(mobiles []string) (larkUserResponse map[string]interface{}, err error)

GetLarkUserIDByMobiles @Description: get userId of lark user by cell phone number @param mobiles @return larkUserResponse @return err

Types

type Interface

type Interface interface {
	Send(msg map[string]interface{}) (result map[string]interface{}, err error)
	SendText(content string) (result map[string]interface{}, err error)
	SendImage(mediaId string) (result map[string]interface{}, err error)
	SendShareChat(shareChatId string) (result map[string]interface{}, err error)
}

func New

func New(mobiles []string) Interface

Jump to

Keyboard shortcuts

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