Created
May 8, 2025 04:58
-
-
Save ochilab/75ccc333ad536ef0907a1c190c3d3895 to your computer and use it in GitHub Desktop.
GASのサンプル(実習課題)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet(e) { | |
const keyword = (e.parameter.keyword || "").trim(); | |
if (!keyword) { | |
return ContentService.createTextOutput( | |
JSON.stringify({ error: "No keyword provided" }) | |
).setMimeType(ContentService.MimeType.JSON); | |
} | |
result = getSheetData(keyword); | |
const output = result ? JSON.stringify(result) : JSON.stringify({}); | |
return ContentService | |
.createTextOutput(output) | |
.setMimeType(ContentService.MimeType.JSON); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment