Skip to content

Update IMPORTJSONAPI.gs #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions IMPORTJSONAPI.gs
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down