Skip to content

Instantly share code, notes, and snippets.

View S-Keilani's full-sized avatar

Seiffeddeen Keilani S-Keilani

  • Jordan
View GitHub Profile
@ydn
ydn / node-weather.js
Last active November 19, 2022 15:36
Weather API
var YQL = require('yql');
var query = new YQL('select * from weather.forecast where (location = 94089)');
query.exec(function(err, data) {
var location = data.query.results.channel.location;
var condition = data.query.results.channel.item.condition;
console.log('The current weather in ' + location.city + ', ' + location.region + ' is ' + condition.temp + ' degrees.');
});