{ "HIGHLIGHTSTROKECOLORS": { "external": "#000000" }, "ARGPLUGINS": { "weatherincity": "var block = logo.blocks.blockList[blk];var apiURL = 'https://george-vustrey-weather.p.mashape.com/api.php?location=';var conns = block.connections;var city = logo.parseArg(logo, turtle, conns[1]);var daysAhead = parseInt(logo.parseArg(logo, turtle, conns[2]));if (daysAhead < -1 || daysAhead > 5) { logo.errorMsg('Days ahead must be in the range of -1 to 5.', blk); daysAhead = 0;}if (block.cacheCity === city && block.cache !== undefined) { var response = block.cache;} else { var request = new XMLHttpRequest(); request.open('GET', apiURL + city, false); request.setRequestHeader('X-Mashape-Authorization', weatherMashapeKey); request.send(null); var response = request.responseText; block.cacheCity = city; block.cache = response;}var forecast = JSON.parse(response);block.value = forecast[daysAhead + 1]['condition'];", "weatherincitylow": "var block = logo.blocks.blockList[blk];var apiURL = 'https://george-vustrey-weather.p.mashape.com/api.php?location=';var conns = block.connections;var city = logo.parseArg(logo, turtle, conns[1]);var daysAhead = parseInt(logo.parseArg(logo, turtle, conns[2]));if (daysAhead < -1 || daysAhead > 5) { logo.errorMsg(_('Days ahead must be in the range of -1 to 5.'), blk); daysAhead = 0;}if (block.cacheCity === city && block.cache !== undefined) { var response = block.cache;} else { var request = new XMLHttpRequest(); request.open('GET', apiURL + city, false); request.setRequestHeader('X-Mashape-Authorization', weatherMashapeKey); request.send(null); var response = request.responseText; block.cacheCity = city; block.cache = response;}var forecast = JSON.parse(response);block.value = parseInt(forecast[daysAhead + 1]['low_celsius']);", "weatherincityhigh": "var block = logo.blocks.blockList[blk];var apiURL = 'https://george-vustrey-weather.p.mashape.com/api.php?location=';var conns = block.connections;var city = logo.parseArg(logo, turtle, conns[1]);var daysAhead = parseInt(logo.parseArg(logo, turtle, conns[2]));if (daysAhead < -1 || daysAhead > 5) { logo.errorMsg(_('Days ahead must be in the range of -1 to 5.'), blk); daysAhead = 0;}if (block.cacheCity === city && block.cache !== undefined) { var response = block.cache;} else { var request = new XMLHttpRequest(); request.open('GET', apiURL + city, false); request.setRequestHeader('X-Mashape-Authorization', weatherMashapeKey); request.send(null); var response = request.responseText; block.cacheCity = city; block.cache = response;}var forecast = JSON.parse(response);block.value = parseInt(forecast[daysAhead + 1]['high_celsius']);" }, "GLOBALS": "weatherMashapeKey = '3Rfxc7fwp2mshJxgtDxKSueYna8Ap1qZfAcjsn2hjpuWPuBCrI';", "PALETTEHIGHLIGHTCOLORS": { "external": "#9DC4FF" }, "PALETTEPLUGINS": { "external": "" }, "BLOCKPLUGINS": { "weatherincity": "var weatherBlock = new ProtoBlock('weatherincity');weatherBlock.palette = palettes.dict['external'];blocks.protoBlockDict['weatherincity'] = weatherBlock;weatherBlock.staticLabels.push(_('forecast'));weatherBlock.staticLabels.push(_('city'));weatherBlock.staticLabels.push(_('day'));weatherBlock.adjustWidthToLabel();weatherBlock.twoArgMathBlock();weatherBlock.dockTypes[0] = 'textout';weatherBlock.dockTypes[1] = 'anyin';weatherBlock.defaults.push('Canberra');weatherBlock.defaults.push(1);", "weatherincitylow": "var weatherLowBlock = new ProtoBlock('weatherincitylow');weatherLowBlock.palette = palettes.dict['external'];blocks.protoBlockDict['weatherincitylow'] = weatherLowBlock;weatherLowBlock.staticLabels.push(_('low'));weatherLowBlock.staticLabels.push(_('city'));weatherLowBlock.staticLabels.push(_('day'));weatherLowBlock.adjustWidthToLabel();weatherLowBlock.twoArgMathBlock();weatherLowBlock.dockTypes[1] = 'anyin';weatherLowBlock.defaults.push('Canberra');weatherLowBlock.defaults.push(1);", "weatherincityhigh": "var weatherHighBlock = new ProtoBlock('weatherincityhigh');weatherHighBlock.palette = palettes.dict['external'];blocks.protoBlockDict['weatherincityhigh'] = weatherHighBlock;weatherHighBlock.staticLabels.push(_('high'));weatherHighBlock.staticLabels.push(_('city'));weatherHighBlock.staticLabels.push(_('day'));weatherHighBlock.adjustWidthToLabel();weatherHighBlock.twoArgMathBlock();weatherHighBlock.dockTypes[1] = 'anyin';weatherHighBlock.defaults.push('Canberra');weatherHighBlock.defaults.push(1);" }, "PALETTEFILLCOLORS": { "external": "#59f" }, "PALETTESTROKECOLORS": { "external": "#3771c8" } }