xxxxxxxxxx
30
var town;
var url;
var name;
function setup() {
createCanvas(400, 300);
background(200,200,100);
town = createInput("london");
name = town.value();
url = "https://api.openweathermap.org/data/2.5/forecast?q=" + name + "&APPID=e4d37ccc2c4f3977c2e466fa78b38fcb&units=metric"
loadJSON(url,gotData);
}
function gotData(data){
console.log(data.list[0].main.temp);
text(data.list[0].main.temp,100,30);
}
function draw() {
}