Skip to content

Documentation / joplin-api / FolderApi

Class: FolderApi

目录相关 api

Constructors

new FolderApi()

new FolderApi(ajax): FolderApi

Parameters

ajax: Ajax

Returns

FolderApi

Defined in

api/FolderApi.ts:21

Methods

create()

create(param): Promise<FolderCreateRes>

Parameters

param: RequiredField<Partial<FolderProperties>, "title">

Returns

Promise<FolderCreateRes>

Defined in

api/FolderApi.ts:44


get()

get(id): Promise<FolderGetRes>

Parameters

id: string

Returns

Promise<FolderGetRes>

Defined in

api/FolderApi.ts:40


list()

list(undefined)

list(): Promise<PageRes<FolderListRes>>

Returns

Promise<PageRes<FolderListRes>>

Defined in

api/FolderApi.ts:23

list(pageParam)

list<K>(pageParam): Promise<PageRes<Pick<FolderProperties, K>>>

Type Parameters

K extends keyof FolderProperties = "id" | "title" | "parent_id"

Parameters

pageParam: PageParam<FolderProperties> & FieldsParam<K>

Returns

Promise<PageRes<Pick<FolderProperties, K>>>

Defined in

api/FolderApi.ts:24


listAll()

listAll(): Promise<FolderListAllRes[]>

使用特殊的 as_tree 参数来恢复旧的行为

Returns

Promise<FolderListAllRes[]>

Defined in

api/FolderApi.ts:34


notesByFolderId()

notesByFolderId(id)

notesByFolderId(id): Promise<NoteGetRes[]>

Parameters

id: string

Returns

Promise<NoteGetRes[]>

Defined in

api/FolderApi.ts:57

notesByFolderId(id, fields)

notesByFolderId<K>(id, fields): Promise<Pick<NoteProperties, K>[]>

Type Parameters

K extends keyof NoteProperties = "id" | "title" | "parent_id"

Parameters

id: string

fields: K[]

Returns

Promise<Pick<NoteProperties, K>[]>

Defined in

api/FolderApi.ts:58


remove()

remove(id): Promise<string>

Parameters

id: string

Returns

Promise<string>

Defined in

api/FolderApi.ts:53


update()

update(param): Promise<FolderUpdateRes>

Parameters

param: RequiredField<Partial<FolderProperties>, "id">

Returns

Promise<FolderUpdateRes>

Defined in

api/FolderApi.ts:48

Released under the MIT License.