Socket
Book a DemoInstallSign in
Socket

yahoo_weather

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yahoo_weather

1.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

yahoo_weather Build Status

A Ruby object-oriented interface to the Yahoo! Weather JSON API.

It supports caching and i18n.

Installation

$ gem install yahoo_weather

Include in your Gemfile:

gem 'yahoo_weather'

API

http://developer.yahoo.com/weather/

Example

Fetch by woeid:

client = YahooWeather::Client.new
response = client.fetch(12797168)
response.units.temperature        # "F"
response.condition.temp           # 60
response.wind.direction           # 110
response.wind.direction('string') # "ESE"
response.condition.code           # 29
response.condition.code('string') # "Partly cloudy (night)"

FYI: If you want to use string condition code don't forget to copy locales

Fetch by location:

client = YahooWeather::Client.new
response = client.fetch_by_location('New York')

Locales

Copy locale command:

rails g yahoo_weather:copy_locale en

Available Locales

Available locales are:

en, ru

License

MIT License. Copyright 2013 Ildar Manzhikov manzhikov@gmail.com. http://manzhikov.com

FAQs

Package last updated on 30 Mar 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.