{"id":13994386,"url":"https://github.com/coderhs/ruby_open_weather_map","last_synced_at":"2025-04-06T00:09:24.591Z","repository":{"id":9167368,"uuid":"10965333","full_name":"coderhs/ruby_open_weather_map","owner":"coderhs","description":"A ruby wrapper for open weather map","archived":false,"fork":false,"pushed_at":"2022-07-21T08:07:38.000Z","size":82,"stargazers_count":79,"open_issues_count":12,"forks_count":52,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T23:09:14.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderhs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-26T10:43:45.000Z","updated_at":"2023-08-06T16:44:17.000Z","dependencies_parsed_at":"2022-08-30T10:31:25.060Z","dependency_job_id":null,"html_url":"https://github.com/coderhs/ruby_open_weather_map","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderhs%2Fruby_open_weather_map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderhs%2Fruby_open_weather_map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderhs%2Fruby_open_weather_map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderhs%2Fruby_open_weather_map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderhs","download_url":"https://codeload.github.com/coderhs/ruby_open_weather_map/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415967,"owners_count":20935387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:02:50.673Z","updated_at":"2025-04-06T00:09:24.571Z","avatar_url":"https://github.com/coderhs.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"## Inviting maintainers\n\nKindly create an issue and tag me if you wish to become a maintainer. \n\n\n## A ruby wrapper for Open Weather Map API.\n\n[![Build Status](https://travis-ci.org/coderhs/ruby_open_weather_map.svg?branch=master)](https://travis-ci.org/coderhs/ruby_open_weather_map)\n\n## Installation\n\nLatest version `0.12.0`\n\nAdd the following to your **Gemfile**\n\n    gem 'open-weather'\n\n  or\n\n    $ gem install open-weather\n\n## Usage\n\n\n#### Getting and using the API key\n\nHow to get an API key and tips for an effective usage of the API:\nhttp://openweathermap.org/appid\n\n\n```ruby\n# get current weather by city name\noptions = { units: \"metric\", APPID: \"1111111111\" }\nOpenWeather::Current.city(\"Berlin, DE\", options)\n```\n\n### Current weather information API\n\n\n```ruby\nrequire 'open_weather'\n\n# get current weather by city name\nOpenWeather::Current.city(\"Cochin, IN\", options)\n\n# get current weather by city id\nOpenWeather::Current.city_id(\"1273874\", options)\n\n# get current weather by geocode. (lat, lon)\nOpenWeather::Current.geocode(9.94, 76.26 , options)\n\n# get current weather for a list of city ids\nOpenWeather::Current.cities([524901, 703448, 2643743], options)\n\n# get current weather for a bounding box\nOpenWeather::Current.rectangle_zone(12, 32, 15, 37, 10, options)\n\n# get current weather for cities around a point\nOpenWeather::Current.circle_zone(55.5, 37.5, 10, options)\n\n# By default temperature is returned in fahrenheit to get the current weather in degrees celsius use unit as follows.\noptions = { units: \"metric\", APPID: \"1111111111\" }\nOpenWeather::Current.city(\"Cochin, IN\", options)\n```\n\nDocumentation about the current weather end-point:\nhttp://openweathermap.org/current\n\n\n### Weather forecast API\n\n```ruby\nrequire 'open_weather'\n\n# get weather forecast by city name\nOpenWeather::Forecast.city(\"Cochin, IN\", options)\n\n# get weather forecast by city name in fahrenheit\nOpenWeather::Forecast.city(\"Cochin, IN\", options)\n\n# get weather forecast by city id\nOpenWeather::Forecast.city_id(\"1273874\", options)\n\n# get weather forecast by geocode. (lat, lon)\nOpenWeather::Forecast.geocode(9.94, 76.26, options)\n\n# get daily weather forecast by city name\nOpenWeather::ForecastDaily.city(\"Cochin, IN\", options)\n\n# get daily weather forecast by city name in fahrenheit\nOpenWeather::ForecastDaily.city(\"Cochin, IN\", options)\n\n# get daily weather forecast by city id\nOpenWeather::ForecastDaily.city_id(\"1273874\", options)\n\n# get daily weather forecast by geocode. (lat, lon)\nOpenWeather::ForecastDaily.geocode(9.94, 76.26, options)\n\n# get daily weather forecast for 6 days\noptions[:cnt] = 6\nOpenWeather::ForecastDaily.city_id(\"1273874\", options)\n```\n\n### Weather history API\n\n\n```ruby\nrequire 'open_weather'\n\n# get weather history by city name\nOpenWeather::History.city(\"Cochin, IN\", options)\n\n# get weather history by city id\nOpenWeather::History.city_id(\"1273874\", options)\n\n# get weather history by geocode. (lat, lon)\nOpenWeather::History.geocode(9.94, 76.26, options)\n```\n\nDoucumentation about the weather forecast end-point:\nhttp://openweathermap.org/forecast\n\n\n\n#### Multilingual support\n\n```ruby\n# get current weather in german\noptions[:lang] = \"de\"\nOpenWeather::Current.city(\"Berlin, DE\",options)\n```\n\nAvailable languages are listed at:\nhttp://openweathermap.org/current#multi\n\n\n## Contributing\n\n  Fork it\n\n  Create your feature branch (git checkout -b my-new-feature)\n\n  Commit your changes (git commit -am 'Added some feature')\n\n  Push to the branch (git push origin my-new-feature)\n\n  Create new Pull Request\n\n--------\n\n**This gem was created during the Hacker Saturdays hosted by [Kerala/Kochi Ruby Users Group](https://krug.github.io)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderhs%2Fruby_open_weather_map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderhs%2Fruby_open_weather_map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderhs%2Fruby_open_weather_map/lists"}