The cards layout needs to have a way to hide the image container when there is no image to display. Otherwise, it’s just ugly:
Thoughts on how to address this in the meanwhile?
EDIT: used a generate image column to fill the gap for now, but it still sticks out like a sore thumb.
The good news is when the api column arrives you can use that image search to automatically fill in blank images with a if then column, if blank then api image otherwise use their image.
functionGetAPI(){
var response =
UrlFetchApp.fetch("https://www.thecocktaildb.com/api/json/v1/1/randomselection.php")
Logger.log(response.getContentText());
var fact = response.getContentText();
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A5').activate();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Sheet1'), true);
spreadsheet.getRange(spreadsheet.getLastRow() + 1,1).setValue([fact]);
}
Then you would just have to get the info from the call like this
function callDrink() {
var response = UrlFetchApp.fetch("https://www.thecocktaildb.com/api/json/v1/1/filter.php?
a=Alcoholic");
// Parse the JSON reply
var json = response.getContentText();
var data = JSON.parse(json);
Logger.log(data);
Logger.log(data["results"]);
Logger.log(data["results"][0]);
Logger.log(data["results"][0]["artistName"]);
Logger.log(data["results"][0]["collectionName"]);
Logger.log(data["results"][0]["artworkUrl60"]);
Logger.log(data["results"][0]["previewUrl"]);
}
This one listed doesn’t actually work with this url i was just copying and pasting from my scripts real quick.