Documentation / joplin-api / NoteApi
Class: NoteApi
TODO 可以考虑使用 fields() 方法设置然后产生一个新的 Api 实例
Constructors
new NoteApi()
new NoteApi(
ajax
):NoteApi
Parameters
• ajax: Ajax
Returns
Defined in
Methods
create()
create(
param
):Promise
<NoteCreateRes
>
Parameters
• param: RequiredField
<Partial
<NoteProperties
>, "title"
>
Returns
Promise
<NoteCreateRes
>
Defined in
get()
get(id)
get(
id
):Promise
<NoteGetRes
&CommonType
>
Parameters
• id: string
Returns
Promise
<NoteGetRes
& CommonType
>
Defined in
get(id, fields)
get<
K
>(id
,fields
?):Promise
<Pick
<NoteProperties
,K
> &CommonType
>
Type Parameters
• K extends keyof NoteProperties
= "id"
| "title"
| "parent_id"
Parameters
• id: string
• fields?: K
[]
Returns
Promise
<Pick
<NoteProperties
, K
> & CommonType
>
Defined in
list()
list(undefined)
list():
Promise
<PageRes
<NoteGetRes
>>
Returns
Promise
<PageRes
<NoteGetRes
>>
Defined in
list(pageParam)
list<
K
>(pageParam
):Promise
<PageRes
<Pick
<NoteProperties
,K
>>>
Type Parameters
• K extends keyof NoteProperties
= "id"
| "title"
| "parent_id"
Parameters
• pageParam: PageParam
<NoteProperties
> & FieldsParam
<K
>
Returns
Promise
<PageRes
<Pick
<NoteProperties
, K
>>>
Defined in
remove()
remove(
id
):Promise
<void
>
Parameters
• id: string
Returns
Promise
<void
>
Defined in
resourcesById()
resourcesById(id)
resourcesById(
id
):Promise
<ResourceGetRes
[]>
Parameters
• id: string
Returns
Promise
<ResourceGetRes
[]>
Defined in
resourcesById(id, fields)
resourcesById<
K
>(id
,fields
):Promise
<Pick
<ResourceProperties
,K
> &CommonType
[]>
Type Parameters
• K extends keyof ResourceProperties
= "id"
| "title"
Parameters
• id: string
• fields: K
[]
Returns
Promise
<Pick
<ResourceProperties
, K
> & CommonType
[]>
Defined in
tagsById()
tagsById(
id
):Promise
<TagGetRes
[]>
Parameters
• id: string
Returns
Promise
<TagGetRes
[]>
Defined in
update()
update(
param
):Promise
<NoteUpdateRes
>
Parameters
• param: RequiredField
<Partial
<NoteProperties
>, "id"
>
Returns
Promise
<NoteUpdateRes
>