folder

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: 5 Imported by: 0

Documentation

Overview

Package folder 云文档/folder

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Children

func Children(ctx *feishu.App, params url.Values, accessToken string) (resp []byte, err error)

获取文件夹下的文档清单

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

func Meta(ctx *feishu.App, params url.Values, accessToken string) (resp []byte, err error)

获取文件夹元信息

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

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

获取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.

Jump to

Keyboard shortcuts

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