Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

weather-yahoo

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weather-yahoo - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.travis.yml

4

package.json
{
"name": "weather-yahoo",
"version": "1.0.0",
"description": "Search by location, it gives you the weather",
"version": "1.0.1",
"description": "Search by location to get weather info from Yahoo",
"author": "Kevin Walchko",

@@ -6,0 +6,0 @@ "main": "yahoo-weather.js",

# Yahoo Weather
[![npm](https://img.shields.io/npm/v/weather-yahoo.svg)](https://github.com/walchko/weather-yahoo)
[![npm](https://img.shields.io/npm/l/weather-yahoo.svg)](https://github.com/walchko/weather-yahoo)
[![Travis](https://img.shields.io/travis/walchko/weather-yahoo.svg)](https://travis-ci.org/walchko/weather-yahoo)
[![NPM](https://nodei.co/npm/weather-yahoo.png)](https://nodei.co/npm/weather-yahoo/)
There are a ton of yahoo weather modules, mine allows access to all of the information or
just a subset.
# Usage
## Usage
To test it out, put the below code into Tonic and see the results, however, give it time
(a few seconds) to talk with yahoo servers and return an answer.
var yw = require('weather-yahoo');

@@ -20,2 +29,15 @@ var ans = {};

Also, Yahoo has a great [developer network](https://developer.yahoo.com/weather/) where you
can play with code and see the full json format they return.
## Examples
See the [example](https://github.com/walchko/yahoo-weather/blob/master/example/example.js)
to play with the output.
## Change Log
| Version | Date | Comments |
|---------|----------|----------|
| 1.0.1 | 11 Jan 16| clean up and doc updates |
| 1.0.0 | 10 Jan 16| Finally published it to npm |

@@ -189,37 +189,2 @@ "use strict";

//
// // returns a simple json response
// YahooWeather.prototype.getSimpleWeather = function (location) {
// return new Promise( function(response,reject){
// // var locationQuery = escape("select item from weather.forecast where woeid in (select woeid from geo.places where text='" + location + "') and u='f'");
// // var locationUrl = "https://query.yahooapis.com/v1/public/yql?q=" + locationQuery + "&format=json";
// //
// // https.get(locationUrl, function (res) {
// // res.setEncoding('binary');
// //
// // var resData = "";
// // res.on('data', function (chunk) {
// // return resData += chunk;
// // });
// // res.on('end', function () {
// // var result = JSON.parse(resData);
//
// getAllWeather(location).then( function(result){
//
// if (Array.isArray(result.query.results.channel)) {
// var returnMessage = result.query.results.channel[0].item.title + '\n`Current` ' + result.query.results.channel[0].item.condition.temp + ' degrees, ' + result.query.results.channel[0].item.condition.text + '\n`' + result.query.results.channel[0].item.forecast[0].day + '` High: ' + result.query.results.channel[0].item.forecast[0].high + ' Low: ' + result.query.results.channel[0].item.forecast[0].low + ', ' + result.query.results.channel[0].item.forecast[0].text + '\n`' + result.query.results.channel[0].item.forecast[1].day + '` High: ' + result.query.results.channel[0].item.forecast[1].high + ' Low: ' + result.query.results.channel[0].item.forecast[1].low + ', ' + result.query.results.channel[0].item.forecast[1].text;
// response(returnMessage);
// } else {
// var returnMessage = result.query.results.channel.item.title + '\n`Current` ' + result.query.results.channel.item.condition.temp + ' degrees, ' + result.query.results.channel.item.condition.text + '\n`' + result.query.results.channel.item.forecast[0].day + '` High: ' + result.query.results.channel.item.forecast[0].high + ' Low: ' + result.query.results.channel.item.forecast[0].low + ', ' + result.query.results.channel.item.forecast[0].text + '\n`' + result.query.results.channel.item.forecast[1].day + '` High: ' + result.query.results.channel.item.forecast[1].high + ' Low: ' + result.query.results.channel.item.forecast[1].low + ', ' + result.query.results.channel.item.forecast[1].text;
// response(returnMessage);
// }
//
// });
// // });
// // });
//
// });
// };
// module.exports.YahooWeather = new YahooWeather();
module.exports = new YahooWeather();
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc