Documentation ¶
Overview ¶
Package folder 云文档/folder
Index ¶
- func Children(ctx *feishu.App, params url.Values, accessToken string) (resp []byte, err error)
- func Create(ctx *feishu.App, payload []byte, params url.Values, accessToken string) (resp []byte, err error)
- func Meta(ctx *feishu.App, params url.Values, accessToken string) (resp []byte, err error)
- func RootFolderMeta(ctx *feishu.App, accessToken string) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Children ¶
获取文件夹下的文档清单
该接口用于根据 folderToken 获取该文件夹的文档清单,如 doc、sheet、folder
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uEjNzUjLxYzM14SM2MTN
GET https://open.feishu.cn/open-apis/drive/explorer/v2/folder/:folderToken/children
Example ¶
package main import ( "fmt" "net/url" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/folder" ) func main() { var ctx *feishu.App params := url.Values{} accessToken := "" resp, err := folder.Children(ctx, params, accessToken) fmt.Println(resp, err) }
Output:
func Create ¶
func Create(ctx *feishu.App, payload []byte, params url.Values, accessToken string) (resp []byte, err error)
新建文件夹
该接口用于根据 folderToken 在该 folder 下创建文件夹
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/ukTNzUjL5UzM14SO1MTN
POST https://open.feishu.cn/open-apis/drive/explorer/v2/folder/:folderToken
Example ¶
package main import ( "fmt" "net/url" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/folder" ) func main() { var ctx *feishu.App payload := []byte("{}") params := url.Values{} accessToken := "" resp, err := folder.Create(ctx, payload, params, accessToken) fmt.Println(resp, err) }
Output:
func Meta ¶
获取文件夹元信息
该接口用于根据 folderToken 获取该文件夹的元信息
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uAjNzUjLwYzM14CM2MTN
GET https://open.feishu.cn/open-apis/drive/explorer/v2/folder/:folderToken/meta
Example ¶
package main import ( "fmt" "net/url" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/folder" ) func main() { var ctx *feishu.App params := url.Values{} accessToken := "" resp, err := folder.Meta(ctx, params, accessToken) fmt.Println(resp, err) }
Output:
func RootFolderMeta ¶
获取root folder(我的空间) meta
该接口用于获取 "我的空间" 的元信息
See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uAjNzUjLwYzM14CM2MTN
GET https://open.feishu.cn/open-apis/drive/explorer/v2/root_folder/meta
Example ¶
package main import ( "fmt" "github.com/ylck/feishu" "github.com/ylck/feishu/apis/capabilities/document/folder" ) func main() { var ctx *feishu.App accessToken := "" resp, err := folder.RootFolderMeta(ctx, accessToken) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.