First, I'm not a non-native, so there're some mistakes.And I'm a newbie. This's finish but wrong code.
function myFunction() {
var response = UrlFetchApp.fetch("https://api.ookami.me/v1/news/public?sport_id=1");
var json = JSON.parse(response.getContentText());
var news = JSON.parse(json.getContentText());
Logger.log("id");
Logger.log("url");
Logger.log("image");
}
I wrote "news" in line6's code, and that time, displayed the log. but wrote again, didn't display. And the log displayed with id, url, image and so on, so I added the code on line15 and wrote the code on line17 to line19. But a log displayed "undefined".
function myFunction() {
var response = UrlFetchApp.fetch("https://api.ookami.me/v1/news/public?sport_id=1");
var json = JSON.parse(response.getContentText());
Logger.log("news");
}
This CODE is spesific and find the lines.
I want to get data about id, url, image from this API with GAS. And the data, I'll export to spread sheet.
