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

city_detail

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

city_detail

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

CityDetail

A wrapper for openweathermap.org api.

Installation

Add this line to your application's Gemfile:

gem 'city_detail'

And then execute:

$ bundle

Or install it yourself as:

$ gem install city_detail

Usage

This is a wrapper for openweathermap.org api. With this gem, You can get details like weather, longitude, latitude, country it belongs to, etc for any given city.

This gem provides u access to following methods..

CityDetail::Info.coord("New York") # => {"lon"=>-74.01, "lat"=>40.71}


CityDetail::Info.weather("New York") # => {"id"=>741, "main"=>"Fog", "description"=>"fog", "icon"=>"50n", "temp"=>272.71, "pressure"=>1014, "humidity"=>92, "temp_min"=>268.15, "temp_max"=>278.15}

 CityDetail::Info.country("New York") # => "United States of America"



CityDetail::Info.all("New York") 
# => {"coord"=>{"lon"=>-74.01, "lat"=>40.71}, "sys"=>{"message"=>0.0513, "country"=>"United States of America", "sunrise"=>1393069152, "sunset"=>1393108777}, "weather"=>[{"id"=>741, "main"=>"Fog", "description"=>"fog", "icon"=>"50n"}, {"id"=>701, "main"=>"Mist", "description"=>"mist", "icon"=>"50n"}], "base"=>"cmc stations", "main"=>{"temp"=>272.71, "pressure"=>1014, "humidity"=>92, "temp_min"=>268.15, "temp_max"=>278.15}, "wind"=>{"speed"=>2.8, "deg"=>258.503}, "clouds"=>{"all"=>1}, "dt"=>1393058100, "id"=>5128581, "name"=>"New York", "cod"=>200}

Contributing

  1. Fork it ( http://github.com/Manik-Ratnas/city_detail/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

:collision: :collision: :collision:

FAQs

Package last updated on 24 Feb 2014

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