permission

package
v1.0.0-beta.6 Latest Latest
Warning

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

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

Documentation

Overview

Package permission 云文档/permission

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func MemberCreate

func MemberCreate(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)

增加权限

该接口用于根据 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

func MemberDelete(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)

移除协作者权限

该接口用于根据 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

func MemberList(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)

获取协作者列表

该接口用于根据 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

func MemberPermitted(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)

判断协作者是否有某权限

该接口用于根据 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

func MemberTransfer(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)

转移拥有者

该接口用于根据文档信息和用户信息转移文档的所有者。

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

func MemberUpdate(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)

更新协作者权限

该接口用于根据 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

func PublicUpdate(ctx *feishu.App, payload []byte, accessToken string) (resp []byte, err error)

更新文档公共设置

该接口用于根据 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.

Jump to

Keyboard shortcuts

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