sdk

package
v0.0.0-...-a9d1e40 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppTicketResend

func AppTicketResend(appId, appSecret string) (*vo.CommonVo, error)

重新推送 app_ticket https://open.feishu.cn/document/ukTMukTMukTM/uQjNz4CN2MjL0YzM

func AuthenAccessToken

func AuthenAccessToken(appAccessToken string, grantType string, code string) (*vo.AuthenAccessTokenResp, error)

func GetAppAccessToken

func GetAppAccessToken(appId, appSecret, appTicket string) (*vo.AppAccessTokenRespVo, error)

获取 app_access_token(应用商店应用)https://open.feishu.cn/document/ukTMukTMukTM/uEjNz4SM2MjLxYzM

func GetAppAccessTokenInternal

func GetAppAccessTokenInternal(appId, appSecret string) (*vo.AppAccessTokenInternalRespVo, error)

获取 app_access_token(企业自建应用)https://open.feishu.cn/document/ukTMukTMukTM/uADN14CM0UjLwQTN

func GetOAuth2UserInfo

func GetOAuth2UserInfo(userAccessToken string) (*vo.OAuth2UserInfoRespVo, error)

获取用户信息 https://open.feishu.cn/document/ukTMukTMukTM/uAjNz4CM2MjLwYzM

func GetTenantAccessToken

func GetTenantAccessToken(appAccessToken string, tenantKey string) (*vo.TenantAccessTokenRespVo, error)

获取 tenant_access_token(应用商店应用)https://open.feishu.cn/document/ukTMukTMukTM/uMjNz4yM2MjLzYzM

func GetTenantAccessTokenInternal

func GetTenantAccessTokenInternal(appId string, appSecret string) (*vo.TenantAccessTokenRespVo, error)

获取 tenant_access_token(企业自建应用)https://open.feishu.cn/document/ukTMukTMukTM/uIjNz4iM2MjLyYzM

func RefreshUserAccessToken

func RefreshUserAccessToken(appId, appSecret, appTicket, refreshToken string) (*vo.RefreshAccessTokenResp, error)

刷新access_token https://open.feishu.cn/document/ukTMukTMukTM/uQDO4UjL0gDO14CN4gTN

Types

type App

type App struct {
	AppId          string
	AppSecret      string
	AppAccessToken string
}

func BuildApp

func BuildApp(appId, appSecret, appTicket string) (*App, error)

func BuildInternalApp

func BuildInternalApp(appId, appSecret string) (*App, error)

type Tenant

type Tenant struct {
	TenantAccessToken string
}

func BuildTenant

func BuildTenant(appAccessToken, tenantKey string) (*Tenant, error)

func BuildTenantInternal

func BuildTenantInternal(appId, appSecret string) (*Tenant, error)

func (Tenant) AddCalendarAclV4

func (t Tenant) AddCalendarAclV4(calendarId string, userIdType string, body vo.AddCalendarAclV4Req) (*vo.AddCalendarAclV4Resp, error)

创建访问控制 https://open.feishu.cn/document/ukTMukTMukTM/uUjM3YjL1IzN24SNycjN

func (Tenant) AddCalendarAttendeesAcl

func (t Tenant) AddCalendarAttendeesAcl(calendarId string, bodyParams vo.AddCalendarAttendeesAclReq) (*vo.GetCalendarAttendeesResp, error)

创建访问控制 https://open.feishu.cn/document/ukTMukTMukTM/uQjM14CNyUjL0ITN

func (Tenant) AddCalendarEventAttendeesV4

func (t Tenant) AddCalendarEventAttendeesV4(calendarId string, eventId string, userIdType string, bodyParams vo.AddCalendarEventAttendeesV4Req) (*vo.AddCalendarEventAttendeesV4Resp, error)

创建日程参与人v4 https://open.feishu.cn/document/ukTMukTMukTM/uAjM3YjLwIzN24CMycjN

func (Tenant) AdminUserList

func (t Tenant) AdminUserList() (*vo.AdminUserListResp, error)

查询应用管理员列表 https://open.feishu.cn/document/ukTMukTMukTM/ucDOwYjL3gDM24yN4AjN

func (Tenant) BatchGetId

func (t Tenant) BatchGetId(emails []string, mobiles []string) (*vo.BatchGetIdResp, error)

使用手机号或邮箱获取用户ID https://open.feishu.cn/document/ukTMukTMukTM/uUzMyUjL1MjM14SNzITN

func (Tenant) ChatList

func (t Tenant) ChatList(pageSize int, pageToken string) (*vo.GroupListRespVo, error)

获取群列表 https://open.feishu.cn/document/ukTMukTMukTM/uITO5QjLykTO04iM5kDN

func (Tenant) ChatMembers

func (t Tenant) ChatMembers(userAccessToken string, chatId string, pageSize int, pageToken string) (*vo.ChatMembersRespVo, error)

获取群成员列表 https://open.feishu.cn/document/ukTMukTMukTM/uUzMwUjL1MDM14SNzATN

func (Tenant) ChatSearch

func (t Tenant) ChatSearch(userAccessToken string, query string, pageSize int, pageToken string) (*vo.GroupListRespVo, error)

搜索用户所在的群列表 https://open.feishu.cn/document/ukTMukTMukTM/uUTOyUjL1kjM14SN5ITN

func (Tenant) CheckUser

func (t Tenant) CheckUser(req vo.CheckUserReq) (*vo.CheckUserResp, error)

查询用户是否在应用开通范围 https://open.feishu.cn/document/ukTMukTMukTM/uATNwUjLwUDM14CM1ATN

func (Tenant) CreateCalendarV4

func (t Tenant) CreateCalendarV4(bodyParams vo.CreateCalendarV4Req) (*vo.CommonCalendarV4Resp, error)

CreateCalendarV4 创建日历v4版本 https://open.feishu.cn/document/ukTMukTMukTM/uUDM3YjL1AzN24SNwcjN

func (Tenant) DeleteCalendarAclV4

func (t Tenant) DeleteCalendarAclV4(calendarId string, aclId string) (*vo.CommonVo, error)

删除访问控制 https://open.feishu.cn/document/ukTMukTMukTM/uYjM3YjL2IzN24iNycjN

func (Tenant) DeleteCalendarAttendeesAcl

func (t Tenant) DeleteCalendarAttendeesAcl(calendarId string, ruleId string) (*vo.CommonVo, error)

删除访问控制 https://open.feishu.cn/document/ukTMukTMukTM/uUjM14SNyUjL1ITN

func (Tenant) DeleteCalendarEvent

func (t Tenant) DeleteCalendarEvent(calendarId string, eventId string) (*vo.CommonVo, error)

删除日程 https://open.feishu.cn/document/ukTMukTMukTM/uAjM14CMyUjLwITN?lang=zh-CN

func (Tenant) DeleteCalendarEventAttendeesV4

func (t Tenant) DeleteCalendarEventAttendeesV4(calendarId string, eventId string, userIdType string, bodyParams vo.DeleteCalendarEventAttendeesV4Req) (*vo.CommonVo, error)

删除日程参与人v4 https://open.feishu.cn/document/ukTMukTMukTM/uAzM3YjLwMzN24CMzcjN

func (Tenant) DeleteCalendarEventV4

func (t Tenant) DeleteCalendarEventV4(calendarId string, eventId string) (*vo.CommonVo, error)

删除日程v4 https://open.feishu.cn/document/ukTMukTMukTM/ucTM3YjL3EzN24yNxcjN

func (Tenant) DeleteCalendarV4

func (t Tenant) DeleteCalendarV4(calendarId string) (*vo.VoidV4Resp, error)

DeleteCalendarV4 删除日历 https://open.feishu.cn/document/ukTMukTMukTM/uYDM3YjL2AzN24iNwcjN

func (Tenant) GetCalendarAclList

func (t Tenant) GetCalendarAclList(calendarId string, pageSize int, pageToken string) (*vo.GetCalendarAclListV4Resp, error)

获取访问控制列表 https://open.feishu.cn/document/ukTMukTMukTM/ucjM3YjL3IzN24yNycjN

func (Tenant) GetCalendarAttendeesAcl

func (t Tenant) GetCalendarAttendeesAcl(calendarId string) (*vo.GetCalendarAttendeesResp, error)

获取访问控制列表 https://open.feishu.cn/document/ukTMukTMukTM/uMjM14yMyUjLzITN

func (Tenant) GetCalendarEventAttendeesChatMembersV4

func (t Tenant) GetCalendarEventAttendeesChatMembersV4(calendarId string, eventId string, attendeeId string, pageSize int, pageToken *string, userIdType string) (*vo.GetCalendarEventAttendeesV4Resp, error)

获取参与人群成员列表v4 https://open.feishu.cn/document/ukTMukTMukTM/uATN3YjLwUzN24CM1cjN

func (Tenant) GetCalendarEventAttendeesV4

func (t Tenant) GetCalendarEventAttendeesV4(calendarId string, eventId string, pageSize int, pageToken *string, userIdType string) (*vo.GetCalendarEventAttendeesV4Resp, error)

获取日程参与人列表v4 https://open.feishu.cn/document/ukTMukTMukTM/uEzM3YjLxMzN24SMzcjN

func (Tenant) GetCalendarEventList

func (t Tenant) GetCalendarEventList(calendarId string, maxResults *int64, pageToken *string, syncToken *string) (*vo.CalendarEventListResp, error)

获取日程列表 https://open.feishu.cn/document/ukTMukTMukTM/ukTM14SOxUjL5ETN

func (Tenant) GetCalendarEventListV4

func (t Tenant) GetCalendarEventListV4(calendarId string, eventId string, pageSize int, pageToken *string, syncToken *string) (*vo.GetCalendarEventListV4Resp, error)

获取日程列表v4 https://open.feishu.cn/document/ukTMukTMukTM/ukTM3YjL5EzN24SOxcjN

func (Tenant) GetCalendarEventV4

func (t Tenant) GetCalendarEventV4(calendarId string, eventId string) (*vo.CalendarEventInfoV4Resp, error)

获取日程v4 https://open.feishu.cn/document/ukTMukTMukTM/ugTM3YjL4EzN24COxcjN

func (Tenant) GetCalendarList

func (t Tenant) GetCalendarList(maxResults *int64, pageToken *string, syncToken *string) (*vo.CalendarListResp, error)

获取日历列表

func (Tenant) GetCalendarListV4

func (t Tenant) GetCalendarListV4(pageSize int, pageToken, syncToken string) (*vo.GetCalendarListV4Resp, error)

获取日历列表 https://open.feishu.cn/document/ukTMukTMukTM/ugDM3YjL4AzN24COwcjN todo

func (Tenant) GetCalendarV4

func (t Tenant) GetCalendarV4(calendarId string) (*vo.GetCalendarV4Resp, error)

GetCalendarV4 获取日历 https://open.feishu.cn/document/ukTMukTMukTM/ucDM3YjL3AzN24yNwcjN

func (Tenant) GetDepartmentInfo

func (t Tenant) GetDepartmentInfo(departmentId string) (*vo.GetDepartmentInfoRespVo, error)

获取部门详情 https://open.feishu.cn/document/ukTMukTMukTM/uAzNz4CM3MjLwczM

func (Tenant) GetDepartmentInfoBatch

func (t Tenant) GetDepartmentInfoBatch(depIds []string) (*vo.GetDepartmentInfoBatchRespVo, error)

批量获取部门详情 https://bytedance.feishu.cn/docs/doccnOcR1fnxBACchoY9tlg7Amg#

func (Tenant) GetDepartmentSimpleList

func (t Tenant) GetDepartmentSimpleList(departmentId string, offset, pageSize int, fetchChild bool) (*vo.GetDepartmentSimpleListRespVo, error)

获取子部门列表 https://open.feishu.cn/document/ukTMukTMukTM/ugzN3QjL4czN04CO3cDN

func (Tenant) GetDepartmentSimpleListV2

func (t Tenant) GetDepartmentSimpleListV2(id string, pageToken string, pageSize int, fetchChild bool) (*vo.GetDepartmentSimpleListV2RespVo, error)

获取子部门列表v2 https://open.feishu.cn/document/ukTMukTMukTM/ugzN3QjL4czN04CO3cDN

func (Tenant) GetDepartmentUserDetailList

func (t Tenant) GetDepartmentUserDetailList(departmentId string, offset, pageSize int, fetchChild bool) (*vo.GetDepartmentUserDetailListRespVo, error)

获取部门用户详情列表 https://open.feishu.cn/document/ukTMukTMukTM/uYzN3QjL2czN04iN3cDN?lang=zh-CN

func (Tenant) GetDepartmentUserDetailListV2

func (t Tenant) GetDepartmentUserDetailListV2(departmentId string, pageToken string, pageSize int, fetchChild bool) (*vo.GetUserBatchGetV2Resp, error)

获取部门用户详情列表V2 https://open.feishu.cn/document/ukTMukTMukTM/uYzN3QjL2czN04iN3cDN?lang=zh-CN

func (Tenant) GetDepartmentUserList

func (t Tenant) GetDepartmentUserList(departmentId string, offset, pageSize int, fetchChild bool) (*vo.GetDepartmentUserListRespVo, error)

获取部门用户列表 https://open.feishu.cn/document/ukTMukTMukTM/uEzNz4SM3MjLxczM

func (Tenant) GetDepartmentUserListV2

func (t Tenant) GetDepartmentUserListV2(departmentId string, pageToken string, pageSize int, fetchChild bool) (*vo.GetDepartmentUserListV2RespVo, error)

获取部门用户列表 https://open.feishu.cn/document/ukTMukTMukTM/uEzNz4SM3MjLxczM

func (Tenant) GetDocMeta

func (t Tenant) GetDocMeta(userAccessToken string, docToken string) (*vo.GetDocMetaRespVo, error)

获取文档元信息 https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uczN3UjL3czN14yN3cTN

func (Tenant) GetImage

func (t Tenant) GetImage(imageKey string, isApp bool) (io.ReadCloser, error)

func (t Tenant) GetImage(imageKey string) ([]byte, error) {

func (Tenant) GetJsTicket

func (t Tenant) GetJsTicket() (*vo.GetJsTicketResp, error)

func (Tenant) GetOrderInfo

func (t Tenant) GetOrderInfo(orderId string) (*vo.OrderInfoResp, error)

查询订单详情 https://open.feishu.cn/document/ukTMukTMukTM/uITNwUjLyUDM14iM1ATN

func (Tenant) GetOrderList

func (t Tenant) GetOrderList(req vo.GetOrderListReq) (*vo.GetOrderListResp, error)

查询租户购买的付费方案 https://open.feishu.cn/document/ukTMukTMukTM/uETNwUjLxUDM14SM1ATN

func (Tenant) GetScope

func (t Tenant) GetScope() (*vo.GetScopeRespVo, error)

获取通讯录授权范围 https://open.feishu.cn/document/ukTMukTMukTM/ugjNz4CO2MjL4YzM?lang=zh-CN

func (Tenant) GetScopeV2

func (t Tenant) GetScopeV2() (*vo.GetScopeRespV2Vo, error)

获取通讯录授权范围 v2 https://open.feishu.cn/document/ukTMukTMukTM/ugjNz4CO2MjL4YzM?lang=zh-CN

func (Tenant) GetScopes

func (t Tenant) GetScopes() (*vo.GetScopesResp, error)

1.查询租户授权状态 https://bytedance.feishu.cn/docs/doccnHJx2UbLZh5kiWjNawICyNd#dCNL6V

func (Tenant) GetUserBatchGet

func (t Tenant) GetUserBatchGet(employeeIds []string, openIds []string) (*vo.GetUserBatchGetRespVo, error)

批量获取用户信息 https://open.feishu.cn/document/ukTMukTMukTM/uIzNz4iM3MjLyczM

func (Tenant) GetUserBatchGetV2

func (t Tenant) GetUserBatchGetV2(employeeIds []string, openIds []string) (*vo.GetUserBatchGetV2Resp, error)

批量获取用户信息 https://open.feishu.cn/document/ukTMukTMukTM/uIzNz4iM3MjLyczM

func (Tenant) GetUsersV3

func (t Tenant) GetUsersV3(userIdType, departmentIdType, departmentId, pageToken string, pageSize int) (*vo.GetUsersV3Resp, error)

func (Tenant) GroupList

func (t Tenant) GroupList(userAccessToken string, pageSize int, pageToken string) (*vo.GroupListRespVo, error)

获取用户所在的群列表 https://open.feishu.cn/document/ukTMukTMukTM/uQzMwUjL0MDM14CNzATN

func (Tenant) ImChatInfo

func (t Tenant) ImChatInfo(userAccessToken string, chatId string) (*vo.ImChatInfoRespVo, error)

获取群信息 https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/get

func (Tenant) ImChatList

func (t Tenant) ImChatList(userAccessToken string, pageSize int, pageToken string, userIdType *string) (*vo.ImChatListRespVo, error)

获取用户或机器人所在的群列表 https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/list

func (Tenant) IsUserAdmin

func (t Tenant) IsUserAdmin(openId string, employeeId string) (*vo.IsUserAdminResp, error)

校验应用管理员 https://open.feishu.cn/document/ukTMukTMukTM/uITN1EjLyUTNx4iM1UTM

func (Tenant) NewFileUploadRequest

func (t Tenant) NewFileUploadRequest(uri string, params map[string]string, paramName, path string) (string, error)

func (Tenant) SearchCalendarV4

func (t Tenant) SearchCalendarV4(bodyParams vo.SearchCalendarV4Req, pageToken string, pageSize int) (*vo.SearchCalendarV4Resp, error)

SearchCalendarV4 搜索日历 https://open.feishu.cn/document/ukTMukTMukTM/uATM3YjLwEzN24CMxcjN

func (Tenant) SendMessage

func (t Tenant) SendMessage(msg vo.MsgVo) (*vo.MsgResp, error)

发送消息卡片 https://open.feishu.cn/document/ukTMukTMukTM/uYTNwUjL2UDM14iN1ATN

func (Tenant) SendMessageBatch

func (t Tenant) SendMessageBatch(msg vo.BatchMsgVo) (*vo.MsgResp, error)

发送消息卡片 https://open.feishu.cn/document/ukTMukTMukTM/uYTNwUjL2UDM14iN1ATN

func (Tenant) SubscribeCalendarV4

func (t Tenant) SubscribeCalendarV4(calendarId string) (*vo.SubscribeCalendarV4Resp, error)

SubscribeCalendarV4 订阅日历 https://open.feishu.cn/document/ukTMukTMukTM/ucDO3YjL3gzN24yN4cjN

func (Tenant) SubscriptionCalendarV4

func (t Tenant) SubscriptionCalendarV4() (*vo.VoidV4Resp, error)

SubscriptionCalendarV4 订阅日历变更事件 https://open.feishu.cn/document/ukTMukTMukTM/ugTO2YjL4kjN24CO5YjN/subscribe%20calendar%20changed%20event

func (Tenant) UnsubscribeCalendarV4

func (t Tenant) UnsubscribeCalendarV4(calendarId string) (*vo.VoidV4Resp, error)

UnsubscribeCalendarV4 取消订阅日历 https://open.feishu.cn/document/ukTMukTMukTM/ugDO3YjL4gzN24CO4cjN

func (Tenant) UpdateCalendarEvent

func (t Tenant) UpdateCalendarEvent(calendarId string, eventId string, bodyParams vo.CreateCalendarEventReq) (*vo.CommonCalendarEventResp, error)

更新日程 https://open.feishu.cn/document/ukTMukTMukTM/uEjM14SMyUjLxITN

func (Tenant) UpdateCalendarEventAttendees

func (t Tenant) UpdateCalendarEventAttendees(calendarId string, eventId string, bodyParams vo.UpdateCalendarEventAtendeesReq) (*vo.UpdateCalendarEventAtendeesResp, error)

邀请/移除日程参与者 https://open.feishu.cn/document/ukTMukTMukTM/uIjM14iMyUjLyITN

func (Tenant) UpdateCalendarEventV4

func (t Tenant) UpdateCalendarEventV4(calendarId string, eventId string, bodyParams vo.UpdateCalendarEventV4Req) (*vo.CalendarEventInfoV4Resp, error)

更新日程v4 https://open.feishu.cn/document/ukTMukTMukTM/uAjM3YjLwIzN24CMycjN

func (Tenant) UpdateCalendarV4

func (t Tenant) UpdateCalendarV4(calendarId string, bodyParams vo.UpdateCalendarV4Req) (*vo.CommonCalendarV4Resp, error)

UpdateCalendarV4 更新日历 https://open.feishu.cn/document/ukTMukTMukTM/ukDM3YjL5AzN24SOwcjN

type User

type User struct {
	UserAccessToken string
}

func (User) SearchUser

func (u User) SearchUser(query string, pageSize int, pageToken string) (*vo.SearchUserResp, error)

搜索用户 https://bytedance.feishu.cn/docs/doccnizryz7NKuUmVfkRJWeZGVc

Jump to

Keyboard shortcuts

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