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

weather-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weather-api

  • 1.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Weather-API

A Ruby wrapper for the Yahoo! Weather XML RSS feed.

Installation

[sudo] gem install weather-api

Description

Weather-API provides an object-oriented interface to the Yahoo! Weather XML RSS feed service.

Details on the service can be found here.

Usage

A simple example:

require 'rubygems'
require 'weather-api'

# look up WOEID via http://weather.yahoo.com; enter location by city
# name or zip and WOEID is at end of resulting page url.
response = Weather.lookup(9830, Weather::Units::CELSIUS)

print <<EOT
#{response.title}
#{response.condition.temp} degrees
#{response.condition.text}
EOT

This produces:

 Conditions for Ladysmith, CA at 5:00 pm PDT
 13 degrees
 Cloudy

Lookup via location name

response = Weather.lookup_by_location('San Francisco, CA', Weather::Units::FAHRENHEIT)

Copyright (c) 2012 Andrew Stewart. See LICENSE file for more details.

FAQs

Package last updated on 07 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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