dblock / open-weather-ruby-client Goto Github PK
View Code? Open in Web Editor NEWOpenWeather Ruby Client
License: MIT License
OpenWeather Ruby Client
License: MIT License
Hello Daniel,
I am writing programming in python to send my weather data to the OpenWeather site.
Unfortunately the documentation (https://openweathermap.org/stations) is not very detailed...
I create the stations, transmit the data, retrieve it without problem.
However, I cannot change and delete the stations linked to my openweather account.
The documentation says [GET] /stations/{:id} - [PUT] /stations/{:id} and [DELETE] /stations/{:id} but I can't find how "{:id}" must be formulated! :-(
I saw that you had written the same thing in ruby but couldn't find any inspiration! :-(
Would you be kind enough to email me a simple example showing how these [GET] [PUT] and [DELETE] requests should be formulated with the {:id} field?
Thanking you - Very kind regards
Looks like some properties are missing, like summary
of a forecast. I might be able to help by adding them.
Also, I assume you don't want to support geocoding a name (city "New York City", for example) in order to return Forecast data? The user of this gem should do that?
Also, Is there a reason you don't include state or country in your examples? Aren't both supported?
data = client.current_weather(city: 'London') # => OpenWeather::Models::City::Weather
data = client.current_weather(city: 'London, UK') # => OpenWeather::Models::City::Weather
Inspired by https://github.com/dblock/strava-ruby-cli, create an open-weather-cli.
Not a huge deal, but data = client.current_weather(city: city, units: units)
seems to blow up with Faraday::ResourceNotFoundError
error when given given Atlanta, GA
, imperial
, but works fine with Atlanta, Georgia
, imperial
. Data issue?
Got this email.
We would like to inform you about our plans to complete the migration from One Call 2.5 to One Call 3.0 that started 2 years ago. In line with this, access to One Call 2.5 will be finally closed in June 2024.
One Call 3.0 provides you with significantly advanced business-demanded features such as a minute forecast for 1 hour, 4 days forecast for any timestamp, a daily forecast for 8 days, including a human-readable summary, historical data (45-year archive) for timestamps, and with daily aggregation, 1.5-year long-term forecast with daily aggregation, and others.
https://openweathermap.org/one-call-transfer
There are quite a few 2.5 references
As is, the README for stations API will not work because you need to use the api.openweathermap.org/data/3.0
endpoint.
I propose to add api_root
(e.g. https://api.openweathermap.org
), api_path
, e.g. data
, and api_version
, then combine these into endpoint
.
Then document that this now supports 2.5 and 3.0 endpoints.
When using Heroku’s default stack, using this gem generates an SSL error.
This is due to Ruby not being able to find the certification authority certificates (CA Certs) used to verify the authenticity of the request.
Rate limit returns a 429
{
"cod": 429,
"message": "Your account is temporary blocked due to exceeding of requests limitation of your subscription type.
Please choose the proper subscription http://openweathermap.org/price"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.