I’m trying to download the json that Trello itself makes available because I have some power ups that are not listed in the REST API.
My idea is to download the json automatically, but I can only perform this procedure on public boards.
My idea is to download the json link and place it in a cloud bucket to process and consume in a dw.
Does anyone have any ideas on how I can perform this procedure?
getWholeBoardData = async (shortLink, name, key, token) => {
// NOTE: There is an issue here if the board has a "/" in the name.
// So we have to parse it out so that we can access the data properly.
if (name.indexOf("/") > 0 || name.indexOf("\\")) {
name = name.replace(/\\/g, " - ").replace(/\//g, "-");
}
/** @type {String} */
const uri = `https://trello.com/b/${shortLink}/${name}.json?key=${key}&token=${token}`;
/** @type {Response} */
const response = await fetch(uri, { method: 'get' });
/** @type {JSON} */
const json = await response.json();
if (json !== undefined && json !== null && json !== "") {
return json;
} else {
return null;
}
}
But it requires the service you are using to be authorized as a user and a member of that board.