Documentation ¶
Index ¶
- Constants
- func GetAccessToken(tk token.Token, d data.D) (access.Token, error)
- func GetDepartmentUser(api *token.Api)
- func GetDepartmentUserDetail(api *token.Api)
- func GetRootGroups(api *token.Api, page_size int) ([]Group, *Page, error)
- func GetService() token.Service
- func GetSubDepartmentList(api *token.Api)
- func GetUserGroups(api *token.Api, page_size int) ([]Group, *Page, error)
- func GetUserWithEmailByBatch(api *token.Api, emails ...string) (map[string]User, error)
- func GetUserWithMobileByBatch(api *token.Api, mobiles ...string) (map[string]User, error)
- func NewToken(app token.App) token.Token
- func Notify(option *config.Options, content interface{}, call FillContentCallback) error
- func PutImage(api *token.Api, image Image) (string, error)
- func RobotToChat(api *token.Api, chatId string) error
- func SendMessage(api *token.Api, msg *MsgText) (string, error)
- type AccessToken
- type ContentImage
- type ContentRichText
- type ContentText
- type DepartmentInfo
- type DepartmentList
- type FillContentCallback
- type Group
- type Image
- type MsgHead
- type MsgImage
- type MsgRichText
- type MsgText
- type Page
- type PostRichText
- type PostText
- type Response
- type User
- type UserDetail
Constants ¶
View Source
const ApiPrefixUrl = "https://open.feishu.cn/open-apis"
Variables ¶
This section is empty.
Functions ¶
func GetDepartmentUserDetail ¶
GetDepartmentUserDetail * * 获取部门成员详细信息
func GetRootGroups ¶
GetRootGroups * 获取机器人所在的群列表
func GetService ¶ added in v1.0.28
func GetSubDepartmentList ¶
GetSubDepartmentList * * 获取子部门列表
func GetUserGroups ¶
GetUserGroups *获取用户所在的群列表
func GetUserWithEmailByBatch ¶
func GetUserWithMobileByBatch ¶
GetUserWithMobileByBatch *
- 根据用户邮箱或手机号查询用户 open_id 和 user_id,支持批量查询。
- 调用该接口需要申请 通过手机号或者邮箱获取用户ID 权限
Types ¶
type AccessToken ¶
func (AccessToken) GetAccessToken ¶
func (a AccessToken) GetAccessToken() access.Value
func (AccessToken) GetRefAccessToken ¶
func (a AccessToken) GetRefAccessToken() access.Value
type ContentRichText ¶
type ContentRichText struct {
Post PostRichText `json:"post"`
}
type ContentText ¶
type ContentText struct {
Text string `json:"text"`
}
type DepartmentInfo ¶
type DepartmentInfo struct { Id string `json:"id"` OpenDepartmentId string `json:"open_department_id"` LeaderEmployeeId string `json:"leader_employee_id"` LeaderOpenId string `json:"leader_open_id"` ChatId string `json:"chat_id"` MemberCount int `json:"member_count"` Name string `json:"name"` ParentId string `json:"parent_id"` ParentOpenDepartmentId string `json:"parent_open_department_id"` Status int `json:"status"` }
func GetDepartmentInfo ¶
func GetDepartmentInfo(api *token.Api, odId string) (*DepartmentInfo, error)
GetDepartmentInfo * * 获取部门信息 * @return
type DepartmentList ¶
type DepartmentList struct { AuthedDepartments []string `json:"authed_departments,omitempty"` AuthedOpenDepartments []string `json:"authed_open_departments,omitempty"` AuthedEmployeeIds []string `json:"authed_employee_ids,omitempty"` AuthedOpenIds []string `json:"authed_open_ids,omitempty"` }
func GetDepartmentList ¶
func GetDepartmentList(api *token.Api) (*DepartmentList, error)
GetDepartmentList * * 获取授权的部门id列表 * @return array
type FillContentCallback ¶ added in v1.8.4
type Group ¶
type Group struct { Avatar string `json:"avatar"` ChatId string `json:"chat_id"` Desc string `json:"description"` Name string `json:"name"` OwnerOpenId string `json:"owner_open_id"` OwnerUserId string `json:"owner_user_id"` }
群信息
type MsgImage ¶
type MsgImage struct { MsgHead Content ContentImage `json:"content"` }
msg_type="image"
type MsgRichText ¶
type MsgRichText struct { MsgHead Content ContentRichText `json:"content"` }
msg_type="image"
type PostRichText ¶
type PostText ¶
type PostText struct { Title string `json:"title"` Content []interface{} `json:"content"` }
type User ¶
type UserDetail ¶
type UserDetail struct { User Name string `json:"name"` NamePy string `json:"name_py"` NameEn string `json:"en_name"` EmployeeId string `json:"employee_id"` EmployeeNo string `json:"employee_no"` OpenId string `json:"open_id"` UnionId string `json:"union_id"` Status int `json:"status"` EmployeeType int `json:"employee_type"` Email string `json:"email"` Mobile string `json:"mobile"` LeaderEmployeeId string `json:"leader_employee_id"` LeaderOpenId string `json:"leader_open_id"` LeaderUnionId string `json:"leader_union_id"` Departments []string `json:"departments"` OpenDepartments []string `json:"open_departments"` }
func GetUserDetailByBatch ¶
func GetUserDetailByBatch(api *token.Api, openIds ...string) ([]UserDetail, error)
GetUserDetailByBatch /*批量获取用户信息*/
Click to show internal directories.
Click to hide internal directories.