Last active
December 1, 2017 11:29
-
-
Save hiroto3432/af9f4753b3e14623c70a798eb3de6c0c to your computer and use it in GitHub Desktop.
This file contains 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 myFunction() { | |
var response = UrlFetchApp.fetch("https://so2-api.mutoys.com/json/sale/all.json"); | |
var json = JSON.parse(response.getContentText()); | |
var n = 0; | |
while(1){ | |
try{ | |
var item = json[n]["item_id"]; | |
var area = json[n]["area_id"]; | |
if(item == 106){ | |
if(area == 2){ | |
var p = json[n]["price"]; | |
var u = json[n]["unit"]; | |
Logger.log(p + "," + u); | |
} | |
} | |
n++; | |
} | |
catch(e){ | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment