Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TagApi

Hierarchy

  • TagApi

Index

Constructors

constructor

  • new TagApi(ajax: Ajax): TagApi

Methods

addTagByNoteId

  • addTagByNoteId(tagId: string, noteId: string): 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>

create

  • create(param: Pick<BaseProperties, "title">): Promise<TagGetRes>
  • Parameters

    • param: Pick<BaseProperties, "title">

    Returns Promise<TagGetRes>

get

  • get(id: string): Promise<TagGetRes>

list

  • list(): Promise<PageRes<TagGetRes>>
  • list<K>(pageParam: PageParam<BaseProperties> & FieldsParam<K>): Promise<PageRes<Pick<BaseProperties, K>>>
  • Returns Promise<PageRes<TagGetRes>>

  • Type parameters

    • K: keyof BaseProperties

    Parameters

    • pageParam: PageParam<BaseProperties> & FieldsParam<K>

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

notesByTagId

  • notesByTagId(__namedParameters: { id: string } & PageParam<BaseProperties>): Promise<PageRes<NoteGetRes>>
  • Parameters

    • __namedParameters: { id: string } & PageParam<BaseProperties>

    Returns Promise<PageRes<NoteGetRes>>

remove

  • remove(id: string): Promise<BaseProperties>
  • Parameters

    • id: string

    Returns Promise<BaseProperties>

removeTagByNoteId

  • removeTagByNoteId(tagId: string, noteId: string): Promise<void>
  • Parameters

    • tagId: string
    • noteId: string

    Returns Promise<void>

update

  • update(param: Pick<BaseProperties, "id" | "title">): Promise<TagGetRes>
  • Parameters

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

    Returns Promise<TagGetRes>

Generated using TypeDoc