mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
exposing APIs to get month and year note, #416
This commit is contained in:
parent
16f16cb36a
commit
80931a318f
@ -206,14 +206,32 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
this.getRootCalendarNote = dateNoteService.getRootCalendarNote;
|
this.getRootCalendarNote = dateNoteService.getRootCalendarNote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns day note for given date (YYYY-MM-DD format). If such note doesn't exist, it is created.
|
* Returns day note for given date. If such note doesn't exist, it is created.
|
||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @param {string} date
|
* @param {string} date in YYYY-MM-DD format
|
||||||
* @returns {Promise<Note|null>}
|
* @returns {Promise<Note|null>}
|
||||||
*/
|
*/
|
||||||
this.getDateNote = dateNoteService.getDateNote;
|
this.getDateNote = dateNoteService.getDateNote;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns month note for given date. If such note doesn't exist, it is created.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {string} date in YYYY-MM format
|
||||||
|
* @returns {Promise<Note|null>}
|
||||||
|
*/
|
||||||
|
this.getMonthNote = dateNoteService.getMonthNote;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns year note for given year. If such note doesn't exist, it is created.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {string} year in YYYY format
|
||||||
|
* @returns {Promise<Note|null>}
|
||||||
|
*/
|
||||||
|
this.getYearNote = dateNoteService.getYearNote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method
|
* @method
|
||||||
* @param {string} parentNoteId - this note's child notes will be sorted
|
* @param {string} parentNoteId - this note's child notes will be sorted
|
||||||
|
Loading…
x
Reference in New Issue
Block a user