From 3f3585d3aac39d7f972090e21509f365a44f479a Mon Sep 17 00:00:00 2001 From: peetzaman <11132343+peetzaman@users.noreply.github.com> Date: Thu, 23 Jan 2025 22:26:01 -0600 Subject: [PATCH] Update IMPORTJSONAPI.gs match parameter name in help block to the declared param in the function, so the help tooltip properly displays all param. --- IMPORTJSONAPI.gs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/IMPORTJSONAPI.gs b/IMPORTJSONAPI.gs index 94e6ca6..383691f 100644 --- a/IMPORTJSONAPI.gs +++ b/IMPORTJSONAPI.gs @@ -18,14 +18,16 @@ /** * Return data from a JSON API. * - * @param {string} url The URL of the API endpoint. - * @param {string} query The JSONPath query expression. - * @param {string} columns A comma separated list of column path expressions. - * @param {string} [param] An optional parameter. + * @param {string} url The URL of the API endpoint. + * @param {string} query The JSONPath query expression. + * @param {string} cols A comma separated list of column path expressions. + * @param {string} [param] An optional parameter. + * * @return A two-dimensional array containing the data. * @customfunction */ -function IMPORTJSONAPI(url, query, cols) { +function IMPORTJSONAPI(url, query, cols, [param]) { + try { if (!(typeof url === "object" || typeof url === "string")) {