From 80931a318f4a22ad27fa66672b035e9a4a78c09a Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 19 Feb 2019 21:29:41 +0100 Subject: [PATCH] exposing APIs to get month and year note, #416 --- src/services/backend_script_api.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/services/backend_script_api.js b/src/services/backend_script_api.js index 5347bcfbf..d22ada7eb 100644 --- a/src/services/backend_script_api.js +++ b/src/services/backend_script_api.js @@ -206,14 +206,32 @@ function BackendScriptApi(currentNote, apiParams) { 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 - * @param {string} date + * @param {string} date in YYYY-MM-DD format * @returns {Promise} */ 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} + */ + 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} + */ + this.getYearNote = dateNoteService.getYearNote; + /** * @method * @param {string} parentNoteId - this note's child notes will be sorted