Documentation / joplin-api / FolderApi
Class: FolderApi
目录相关 api
Constructors
new FolderApi()
new FolderApi(
ajax
):FolderApi
Parameters
• ajax: Ajax
Returns
Defined in
Methods
create()
create(
param
):Promise
<FolderCreateRes
>
Parameters
• param: RequiredField
<Partial
<FolderProperties
>, "title"
>
Returns
Promise
<FolderCreateRes
>
Defined in
get()
get(
id
):Promise
<FolderGetRes
>
Parameters
• id: string
Returns
Promise
<FolderGetRes
>
Defined in
list()
list(undefined)
list():
Promise
<PageRes
<FolderListRes
>>
Returns
Promise
<PageRes
<FolderListRes
>>
Defined in
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
listAll()
listAll():
Promise
<FolderListAllRes
[]>
使用特殊的 as_tree 参数来恢复旧的行为
Returns
Promise
<FolderListAllRes
[]>
Defined in
notesByFolderId()
notesByFolderId(id)
notesByFolderId(
id
):Promise
<NoteGetRes
[]>
Parameters
• id: string
Returns
Promise
<NoteGetRes
[]>
Defined in
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
remove()
remove(
id
):Promise
<string
>
Parameters
• id: string
Returns
Promise
<string
>
Defined in
update()
update(
param
):Promise
<FolderUpdateRes
>
Parameters
• param: RequiredField
<Partial
<FolderProperties
>, "id"
>
Returns
Promise
<FolderUpdateRes
>