Skip to content

Instantly share code, notes, and snippets.

@ochilab
Created May 8, 2025 04:58
Show Gist options
  • Save ochilab/75ccc333ad536ef0907a1c190c3d3895 to your computer and use it in GitHub Desktop.
Save ochilab/75ccc333ad536ef0907a1c190c3d3895 to your computer and use it in GitHub Desktop.
GASのサンプル(実習課題)
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