Skip to content

Documentation / joplin-api / TagApi

Class: TagApi

Constructors

new TagApi()

new TagApi(ajax): TagApi

Parameters

ajax: Ajax

Returns

TagApi

Defined in

api/TagApi.ts:10

Methods

addTagByNoteId()

addTagByNoteId(tagId, noteId): Promise<null | NoteTagRelated>

Post a note to this endpoint to add the tag to the note. The note data must at least contain an ID property (all other properties will be ignored).

Parameters

tagId: string

noteId: string

Returns

Promise<null | NoteTagRelated>

Defined in

api/TagApi.ts:46


create()

create(param): Promise<TagGetRes>

Parameters

param: Pick<BaseProperties, "title">

Returns

Promise<TagGetRes>

Defined in

api/TagApi.ts:24


get()

get(id): Promise<TagGetRes>

Parameters

id: string

Returns

Promise<TagGetRes>

Defined in

api/TagApi.ts:20


list()

list(undefined)

list(): Promise<PageRes<TagGetRes>>

Returns

Promise<PageRes<TagGetRes>>

Defined in

api/TagApi.ts:12

list(pageParam)

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

Type Parameters

K extends keyof BaseProperties

Parameters

pageParam: PageParam<BaseProperties> & FieldsParam<K>

Returns

Promise<PageRes<Pick<BaseProperties, K>>>

Defined in

api/TagApi.ts:13


notesByTagId()

notesByTagId(__namedParameters): Promise<PageRes<NoteGetRes>>

Parameters

__namedParameters: object & PageParam<BaseProperties>

Returns

Promise<PageRes<NoteGetRes>>

Defined in

api/TagApi.ts:37


remove()

remove(id): Promise<BaseProperties>

Parameters

id: string

Returns

Promise<BaseProperties>

Defined in

api/TagApi.ts:33


removeTagByNoteId()

removeTagByNoteId(tagId, noteId): Promise<void>

Parameters

tagId: string

noteId: string

Returns

Promise<void>

Defined in

api/TagApi.ts:52


update()

update(param): Promise<TagGetRes>

Parameters

param: Pick<BaseProperties, "id" | "title">

Returns

Promise<TagGetRes>

Defined in

api/TagApi.ts:28

Released under the MIT License.