Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A Ruby Wrapper to the OpenWeatherMap API
This readme is available in pt-br
This gem is only available for development, so you can clone the repo and build it yourself:
git clone https://github.com/souzagab/ropenweather.git
cd ropenweather
bundle exec rake install
Or reference the repo in your Gemfile:
gem 'ropenweather', git: 'https://github.com/souzagab/ropenweather.git'
And then execute:
bundle install
This gem uses OpenWeatherMap API and you need to register and get it here.
To use this gem, you will need to create an instance of the Ropenweather::Client
class, the constructor can receive four parameters: api_key, base_uri, lang, units
.
param | required | default | accepted values |
---|---|---|---|
api_key | yes | api-key from openweathermap | |
base_uri | no | http://api.openweathermap.org/data/2.5 | api url |
lang | no | en | check the accepted values here |
units | no | metric | standard metric imperial |
client = Ropenweather::Client.new(api_key:'y0ur-4pi-k3y',lang:'pt_br')
Returns an hash
client = Ropenweather::Client.new(api_key:'y0ur-4pi-k3y',lang:'pt_br')
client.get_weather(city:'London')
Returns an hash with an list of forecasts
client = Ropenweather::Client.new(api_key:'y0ur-4pi-k3y',lang:'pt_br')
response = client.get_weather(city:'London', action:'forecast')
response[:list] # Array of forecasts
After cloning, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
This project is at the beginning of development and has a lot to be improved, contributions are welcome, and here is a list of possible improvements:
And more..
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that ropenweather demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.