Documentation ¶
Overview ¶
Package permission 云文档/permission
Index ¶
- func MemberCreate(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)
- func MemberDelete(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)
- func MemberList(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)
- func MemberPermitted(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)
- func MemberTransfer(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)
- func MemberUpdate(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)
- func PublicUpdate(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MemberCreate ¶
增加权限
该接口用于根据 filetoken 给用户增加文档的权限
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uMzNzUjLzczM14yM3MTN
POST https://open.feishu.cn/open-apis/drive/permission/member/create
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/permission" ) func main() { var ctx *feishu.App payload := []byte("{}") accessToken := "" resp, err := permission.MemberCreate(ctx, payload, accessToken) fmt.Println(resp, err) }
Output:
func MemberDelete ¶
移除协作者权限
该接口用于根据 filetoken 移除文档协作者的权限
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uYTN3UjL2UzN14iN1cTN
POST https://open.feishu.cn/open-apis/drive/permission/member/delete
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/permission" ) func main() { var ctx *feishu.App payload := []byte("{}") accessToken := "" resp, err := permission.MemberDelete(ctx, payload, accessToken) fmt.Println(resp, err) }
Output:
func MemberList ¶
获取协作者列表
该接口用于根据 filetoken 查询协作者,目前包括人('user')和群('chat')
**你能获取到协作者列表的前提是你对该文档有权限**
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uATN3UjLwUzN14CM1cTN
POST https://open.feishu.cn/open-apis/drive/permission/member/list
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/permission" ) func main() { var ctx *feishu.App payload := []byte("{}") accessToken := "" resp, err := permission.MemberList(ctx, payload, accessToken) fmt.Println(resp, err) }
Output:
func MemberPermitted ¶
判断协作者是否有某权限
该接口用于根据 filetoken 判断当前登录用户是否具有某权限
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uYzN3UjL2czN14iN3cTN
POST https://open.feishu.cn/open-apis/drive/permission/member/permitted
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/permission" ) func main() { var ctx *feishu.App payload := []byte("{}") accessToken := "" resp, err := permission.MemberPermitted(ctx, payload, accessToken) fmt.Println(resp, err) }
Output:
func MemberTransfer ¶
转移拥有者
该接口用于根据文档信息和用户信息转移文档的所有者。
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uQzNzUjL0czM14CN3MTN
POST https://open.feishu.cn/open-apis/drive/permission/member/transfer
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/permission" ) func main() { var ctx *feishu.App payload := []byte("{}") accessToken := "" resp, err := permission.MemberTransfer(ctx, payload, accessToken) fmt.Println(resp, err) }
Output:
func MemberUpdate ¶
更新协作者权限
该接口用于根据 filetoken 更新文档协作者的权限
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/ucTN3UjL3UzN14yN1cTN
POST https://open.feishu.cn/open-apis/drive/permission/member/update
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/permission" ) func main() { var ctx *feishu.App payload := []byte("{}") accessToken := "" resp, err := permission.MemberUpdate(ctx, payload, accessToken) fmt.Println(resp, err) }
Output:
func PublicUpdate ¶
更新文档公共设置
该接口用于根据 filetoken 更新文档的公共设置
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/ukTM3UjL5EzN14SOxcTN
POST https://open.feishu.cn/open-apis/drive/permission/public/update
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/permission" ) func main() { var ctx *feishu.App payload := []byte("{}") accessToken := "" resp, err := permission.PublicUpdate(ctx, payload, accessToken) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.