open-weather-ruby-client 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +40 -3
- data/lib/open-weather-ruby-client.rb +2 -1
- data/lib/open_weather/client.rb +1 -0
- data/lib/open_weather/config.rb +2 -0
- data/lib/open_weather/connection.rb +6 -7
- data/lib/open_weather/endpoints/hourly.rb +16 -0
- data/lib/open_weather/endpoints/one_call.rb +1 -1
- data/lib/open_weather/endpoints.rb +1 -0
- data/lib/open_weather/models/forecast/city.rb +17 -0
- data/lib/open_weather/models/forecast/forecast.rb +33 -0
- data/lib/open_weather/models/forecast/hourly.rb +25 -0
- data/lib/open_weather/models/forecast.rb +5 -0
- data/lib/open_weather/models/one_call/alert.rb +15 -0
- data/lib/open_weather/models/one_call/daily_weather.rb +1 -0
- data/lib/open_weather/models/one_call/weather.rb +2 -0
- data/lib/open_weather/models/one_call.rb +1 -0
- data/lib/open_weather/models.rb +1 -0
- data/lib/open_weather/raise_error.rb +1 -1
- data/lib/open_weather/version.rb +1 -1
- metadata +138 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50db5335dc75a5a05dceb8c71b9de5a46b325e15f3a4a7a61ea04e7667be4937
|
4
|
+
data.tar.gz: f0666d4eab1829d74d4a76c0ea484e8b555199ffdbfd6684f0dd259587e2f930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6cb7dc0addc30dbc76108b055ac1a36dcc5b9d91049af28ce8ee3c5e046c19a0431218ce037f2f7d1be550ae06c7faddf8ff33073a924b767d6ac4edcaed158
|
7
|
+
data.tar.gz: 818a28e582b0f359ce1005fcc0fead12135a2f0b1c8f0d2cd8a46dbebf11e66901937a351b09ce66589d9f98525a53cdc3c476a164e1f8ab98a259f183f2e68c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### 0.5.0 (2024/07/03)
|
2
|
+
|
3
|
+
* [#25](https://github.com/dblock/open-weather-ruby-client/pull/25): Exposed the national weather alerts response in the One Call API - [@troya2](https://github.com/troya2).
|
4
|
+
* [#38](https://github.com/dblock/open-weather-ruby-client/pull/38): Migrated to One Call 3.0 API - [@jeanmartin](https://github.com/jeanmartin).
|
5
|
+
* [#39](https://github.com/dblock/open-weather-ruby-client/pull/39): Added support for the hourly forecast in the pro 2.5 API - [@troya2](https://github.com/troya2).
|
6
|
+
|
7
|
+
### 0.4.0 (2023/08/13)
|
8
|
+
|
9
|
+
* [#33](https://github.com/dblock/open-weather-ruby-client/pull/33): Upgrade Faraday to 2.x - [@dgarwood](https://github.com/dgarwood).
|
10
|
+
|
1
11
|
### 0.3.0 (2023/03/25)
|
2
12
|
|
3
13
|
* [#30](https://github.com/dblock/open-weather-ruby-client/pull/30): Added support for Ruby 3.2 - [@petergoldstein](https://github.com/petergoldstein).
|
data/README.md
CHANGED
@@ -20,6 +20,7 @@ Unlike other clients, including [open-weather](https://github.com/coderhs/ruby_o
|
|
20
20
|
- [One Call](#one-call)
|
21
21
|
- [Current and Forecast Weather](#current-and-forecast-weather)
|
22
22
|
- [Historical Weather](#historical-weather)
|
23
|
+
- [Hourly Forecast (Pro)](#hourly-forecast-pro)
|
23
24
|
- [Stations](#stations)
|
24
25
|
- [Register a Station](#register-a-station)
|
25
26
|
- [List Stations](#list-stations)
|
@@ -87,10 +88,21 @@ data.main.temp # => 12
|
|
87
88
|
```
|
88
89
|
|
89
90
|
Returns weather by city, optional state (in the US) and optional ISO 3166 country code.
|
91
|
+
Names that cannot be resolved will cause the API call to raise a `Faraday::ResourceNotFound` error.
|
90
92
|
|
91
93
|
```ruby
|
92
|
-
client.current_city('
|
93
|
-
client.
|
94
|
+
client.current_city('Sydney')
|
95
|
+
client.current_city('London, UK')
|
96
|
+
client.current_city('London', 'UK')
|
97
|
+
client.current_city('Albany')
|
98
|
+
client.current_city('Albany, New York')
|
99
|
+
client.current_city('Albany, New York', 'US')
|
100
|
+
client.current_city('Albany, NY', 'US')
|
101
|
+
client.current_city('Albany', 'New York', 'US')
|
102
|
+
client.current_city('Albany', 'NY', 'US')
|
103
|
+
client.current_city('Albany', 'NY') # 2-letter state abbreviation w/o country will raise Faraday::ResourceNotFound
|
104
|
+
|
105
|
+
client.current_weather(city: 'Albany', state: 'NY', country: 'US')
|
94
106
|
```
|
95
107
|
|
96
108
|
Returns weather by city ID.
|
@@ -167,7 +179,7 @@ data.main.temp # => 285.15
|
|
167
179
|
|
168
180
|
### One Call
|
169
181
|
|
170
|
-
[One Call API](https://openweathermap.org/api/one-call-api) provides current weather, minute forecast for 1 hour, hourly forecast for 48 hours, daily forecast for 7 days,
|
182
|
+
[One Call API](https://openweathermap.org/api/one-call-api) provides current weather, minute forecast for 1 hour, hourly forecast for 48 hours, daily forecast for 7 days, historical weather data for 5 previous days for any geographical coordinate, and national weather alerts.
|
171
183
|
|
172
184
|
See [OpenWeather::Models::OneCall](lib/open_weather/models/one_call) for all available models and properties.
|
173
185
|
|
@@ -175,6 +187,7 @@ See [OpenWeather::Models::OneCall](lib/open_weather/models/one_call) for all ava
|
|
175
187
|
|
176
188
|
```ruby
|
177
189
|
data = client.one_call(lat: 33.441792, lon: -94.037689) # => OpenWeather::Models::OneCall::Weather
|
190
|
+
|
178
191
|
data.lat # => 33.44
|
179
192
|
data.lon # => -94.04
|
180
193
|
data.timezone # => 'America/Chicago'
|
@@ -182,6 +195,7 @@ data.current # => OpenWeather::Models::OneCall::CurrentWeather
|
|
182
195
|
data.minutely # => Array[OpenWeather::Models::OneCall::MinutelyWeather]
|
183
196
|
data.hourly # => Array[OpenWeather::Models::OneCall::HourlyWeather]
|
184
197
|
data.daily # => Array[OpenWeather::Models::OneCall::DailyWeather]
|
198
|
+
data.alerts # => Array[OpenWeather::Models::OneCall::Alert]
|
185
199
|
```
|
186
200
|
|
187
201
|
Exclude minutely and hourly data.
|
@@ -194,6 +208,7 @@ client.one_call(lat: 33.441792, lon: -94.037689, exclude: ['minutely', 'hourly']
|
|
194
208
|
|
195
209
|
```ruby
|
196
210
|
data = client.one_call(lat: 33.441792, lon: -94.037689, dt: Time.now - 24 * 60 * 60) # => OpenWeather::Models::OneCall::Weather
|
211
|
+
|
197
212
|
data.lat # => 33.44
|
198
213
|
data.lon # => -94.04
|
199
214
|
data.timezone # => 'America/Chicago'
|
@@ -201,6 +216,28 @@ data.current # => OpenWeather::Models::OneCall::CurrentWeather
|
|
201
216
|
data.hourly # => Array[OpenWeather::Models::OneCall::HourlyWeather]
|
202
217
|
```
|
203
218
|
|
219
|
+
### Hourly Forecast (Pro)
|
220
|
+
|
221
|
+
The [Hourly Forecast API](https://openweathermap.org/api/hourly-forecast) provides hourly weather forecast for 4 days. Note: This API requires a piad api-key from [OpenWeather.org](https://openweathermap.org/full-price#current).
|
222
|
+
|
223
|
+
```ruby
|
224
|
+
data = client.client.hourly(lat: 33.5312, lon: -111.9426) # => OpenWeather::Models::Forecast::Hourly
|
225
|
+
|
226
|
+
data.cnt # => 96 (number of entries)
|
227
|
+
data.list.first # => OpenWeather::Models::Forecast::Forecast
|
228
|
+
data.list.first.dt # => Time
|
229
|
+
data.list.first.main # => OpenWeather::Models::Forecast::Main
|
230
|
+
data.list.first.weather # => Array[OpenWeather::Models::Forecast::Weather]
|
231
|
+
data.list.first.clouds # => OpenWeather::Models::Forecast::Clouds or nil
|
232
|
+
data.list.first.wind # => OpenWeather::Models::Forecast::Wind or nil
|
233
|
+
data.list.first.visibility # => 10000
|
234
|
+
data.list.first.pop # => 0.1 (probability of precipitation from 0.0 to 1.0 (0% to 100%))
|
235
|
+
data.list.first.rain # => OpenWeather::Models::Forecast::Rain or nil
|
236
|
+
data.list.first.snow # => OpenWeather::Models::Forecast::Snow or nil
|
237
|
+
data.list.first.sys # => OpenWeather::Models::Forecast::Sys or nil
|
238
|
+
data.list.first.dt_txt # => String (Time of data forecasted, ISO, UTC)
|
239
|
+
```
|
240
|
+
|
204
241
|
### Stations
|
205
242
|
|
206
243
|
The [Stations API](https://openweathermap.org/stations) lets your manage personal weather stations and measurements.
|
data/lib/open_weather/client.rb
CHANGED
data/lib/open_weather/config.rb
CHANGED
@@ -6,6 +6,7 @@ module OpenWeather
|
|
6
6
|
|
7
7
|
ATTRIBUTES = %i[
|
8
8
|
endpoint
|
9
|
+
pro_endpoint
|
9
10
|
api_key
|
10
11
|
proxy
|
11
12
|
user_agent
|
@@ -22,6 +23,7 @@ module OpenWeather
|
|
22
23
|
|
23
24
|
def reset
|
24
25
|
self.endpoint = 'https://api.openweathermap.org/data'
|
26
|
+
self.pro_endpoint = 'https://pro.openweathermap.org/data'
|
25
27
|
self.api_key = nil
|
26
28
|
self.user_agent = "OpenWeather Ruby Client/#{OpenWeather::VERSION}"
|
27
29
|
self.ca_path = nil
|
@@ -26,13 +26,12 @@ module OpenWeather
|
|
26
26
|
request_options[:open_timeout] = open_timeout if open_timeout
|
27
27
|
options[:request] = request_options if request_options.any?
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
connection.adapter ::Faraday.default_adapter
|
29
|
+
Faraday.new(endpoint, options) do |f|
|
30
|
+
f.request :multipart
|
31
|
+
f.request :url_encoded
|
32
|
+
f.use ::OpenWeather::Response::RaiseError
|
33
|
+
f.response :json, content_type: /\bjson$/
|
34
|
+
f.response :logger, logger if logger
|
36
35
|
end
|
37
36
|
end
|
38
37
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenWeather
|
4
|
+
module Endpoints
|
5
|
+
module Hourly
|
6
|
+
def hourly(lat, lon = nil, options = {})
|
7
|
+
# default to the pro endpoint if not specified
|
8
|
+
endpoint = options.delete(:endpoint) || pro_endpoint
|
9
|
+
options = options.merge(endpoint: endpoint)
|
10
|
+
|
11
|
+
options = lat.is_a?(Hash) ? options.merge(lat) : options.merge(lat: lat, lon: lon)
|
12
|
+
OpenWeather::Models::Forecast::Hourly.new(get('2.5/forecast/hourly', options), options)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -7,7 +7,7 @@ module OpenWeather
|
|
7
7
|
options = lat.is_a?(Hash) ? options.merge(lat) : options.merge(lat: lat, lon: lon)
|
8
8
|
options[:exclude] = options[:exclude].join(',') if options[:exclude].is_a?(Array)
|
9
9
|
options[:dt] = options[:dt].to_i if options[:dt].is_a?(Time)
|
10
|
-
path = options.key?(:dt) ? '
|
10
|
+
path = options.key?(:dt) ? '3.0/onecall/timemachine' : '3.0/onecall'
|
11
11
|
OpenWeather::Models::OneCall::Weather.new(get(path, options), options)
|
12
12
|
end
|
13
13
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenWeather
|
4
|
+
module Models
|
5
|
+
module Forecast
|
6
|
+
class City < Model
|
7
|
+
property 'id' # City ID
|
8
|
+
property 'name' # City name
|
9
|
+
property 'coord', transform_with: ->(v) { OpenWeather::Models::Coord.new(v) } # City geo location
|
10
|
+
property 'country' # Country code (GB, JP etc.).
|
11
|
+
property 'timezone' # shift in seconds from UTC
|
12
|
+
property 'sunrise', transform_with: ->(v) { Time.at(v).utc } # Sunrise time, UTC
|
13
|
+
property 'sunset', transform_with: ->(v) { Time.at(v).utc } # Sunset time, UTC
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenWeather
|
4
|
+
module Models
|
5
|
+
module Forecast
|
6
|
+
class Forecast < Model
|
7
|
+
property 'dt', transform_with: ->(v) { Time.at(v).utc } # time of data forcasted, UTC
|
8
|
+
property 'dt_txt' # Time of data forecasted, ISO, UTC
|
9
|
+
property 'main'
|
10
|
+
property 'weather'
|
11
|
+
property 'clouds'
|
12
|
+
property 'wind'
|
13
|
+
property 'rain'
|
14
|
+
property 'snow'
|
15
|
+
property 'visibility' # Average visibility, metres. The maximum value of the visibility is 10km
|
16
|
+
property 'pop' # Probability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%
|
17
|
+
property 'sys'
|
18
|
+
|
19
|
+
def initialize(args = nil, options = {})
|
20
|
+
super args, options
|
21
|
+
|
22
|
+
self.main = OpenWeather::Models::Main.new(main, options) if main
|
23
|
+
self.weather = weather.map { |w| OpenWeather::Models::Weather.new(w, options) } if weather
|
24
|
+
self.clouds = OpenWeather::Models::Clouds.new(clouds, options) if clouds
|
25
|
+
self.wind = OpenWeather::Models::Wind.new(wind, options) if wind
|
26
|
+
self.rain = OpenWeather::Models::Rain.new(rain, options) if rain
|
27
|
+
self.snow = OpenWeather::Models::Snow.new(snow, options) if snow
|
28
|
+
self.sys = OpenWeather::Models::Sys.new(sys, options) if sys
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenWeather
|
4
|
+
module Models
|
5
|
+
module Forecast
|
6
|
+
class Hourly < Model
|
7
|
+
include Enumerable
|
8
|
+
|
9
|
+
property 'cod'
|
10
|
+
property 'calctime'
|
11
|
+
property 'cnt', from: 'count'
|
12
|
+
property 'list'
|
13
|
+
property 'message'
|
14
|
+
property 'city'
|
15
|
+
|
16
|
+
def initialize(args = nil, options = {})
|
17
|
+
super args, options
|
18
|
+
|
19
|
+
self.list = list.map { |forecast| OpenWeather::Models::Forecast::Forecast.new(forecast, options) } if list
|
20
|
+
self.city = OpenWeather::Models::Forecast::City.new(city, options) if city
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module OpenWeather
|
4
|
+
module Models
|
5
|
+
module OneCall
|
6
|
+
class Alert < Model
|
7
|
+
property 'sender_name'
|
8
|
+
property 'event'
|
9
|
+
property 'start', transform_with: ->(v) { Time.at(v).utc } # UTC
|
10
|
+
property 'end', transform_with: ->(v) { Time.at(v).utc } # UTC
|
11
|
+
property 'description'
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -11,6 +11,7 @@ module OpenWeather
|
|
11
11
|
property 'minutely' # minute forecast weather
|
12
12
|
property 'hourly' # hourly forecast weather
|
13
13
|
property 'daily' # daily forecast weather
|
14
|
+
property 'alerts' # weather alerts for the location
|
14
15
|
|
15
16
|
def initialize(args = nil, options = {})
|
16
17
|
super args, options
|
@@ -19,6 +20,7 @@ module OpenWeather
|
|
19
20
|
self.minutely = minutely.map { |i| OpenWeather::Models::OneCall::MinutelyWeather.new(i, options) } if minutely
|
20
21
|
self.hourly = hourly.map { |i| OpenWeather::Models::OneCall::HourlyWeather.new(i, options) } if hourly
|
21
22
|
self.daily = daily.map { |i| OpenWeather::Models::OneCall::DailyWeather.new(i, options) } if daily
|
23
|
+
self.alerts = alerts.map { |i| OpenWeather::Models::OneCall::Alert.new(i, options) } if alerts
|
22
24
|
end
|
23
25
|
end
|
24
26
|
end
|
data/lib/open_weather/models.rb
CHANGED
@@ -13,6 +13,7 @@ require_relative 'models/snow'
|
|
13
13
|
require_relative 'models/list'
|
14
14
|
require_relative 'models/city'
|
15
15
|
require_relative 'models/one_call'
|
16
|
+
require_relative 'models/forecast'
|
16
17
|
require_relative 'models/station'
|
17
18
|
require_relative 'models/stations/measurement'
|
18
19
|
require_relative 'models/stations/temp'
|
data/lib/open_weather/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open-weather-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,16 +30,16 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.0.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.0.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: faraday-multipart
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -66,6 +66,132 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: danger-changelog
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.4.2
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.4.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: danger-toc
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.1.3
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.1.3
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: dotenv
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.48.1
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.48.1
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: vcr
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: webmock
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
69
195
|
description:
|
70
196
|
email: dblock@dblock.org
|
71
197
|
executables: []
|
@@ -81,6 +207,7 @@ files:
|
|
81
207
|
- lib/open_weather/connection.rb
|
82
208
|
- lib/open_weather/endpoints.rb
|
83
209
|
- lib/open_weather/endpoints/current.rb
|
210
|
+
- lib/open_weather/endpoints/hourly.rb
|
84
211
|
- lib/open_weather/endpoints/one_call.rb
|
85
212
|
- lib/open_weather/endpoints/stations.rb
|
86
213
|
- lib/open_weather/errors.rb
|
@@ -91,6 +218,10 @@ files:
|
|
91
218
|
- lib/open_weather/models/city/weather.rb
|
92
219
|
- lib/open_weather/models/clouds.rb
|
93
220
|
- lib/open_weather/models/coord.rb
|
221
|
+
- lib/open_weather/models/forecast.rb
|
222
|
+
- lib/open_weather/models/forecast/city.rb
|
223
|
+
- lib/open_weather/models/forecast/forecast.rb
|
224
|
+
- lib/open_weather/models/forecast/hourly.rb
|
94
225
|
- lib/open_weather/models/list.rb
|
95
226
|
- lib/open_weather/models/main.rb
|
96
227
|
- lib/open_weather/models/mixins.rb
|
@@ -98,6 +229,7 @@ files:
|
|
98
229
|
- lib/open_weather/models/mixins/temp.rb
|
99
230
|
- lib/open_weather/models/model.rb
|
100
231
|
- lib/open_weather/models/one_call.rb
|
232
|
+
- lib/open_weather/models/one_call/alert.rb
|
101
233
|
- lib/open_weather/models/one_call/current_weather.rb
|
102
234
|
- lib/open_weather/models/one_call/daily_weather.rb
|
103
235
|
- lib/open_weather/models/one_call/feels_like.rb
|
@@ -138,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
270
|
- !ruby/object:Gem::Version
|
139
271
|
version: 1.3.6
|
140
272
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
273
|
+
rubygems_version: 3.5.6
|
142
274
|
signing_key:
|
143
275
|
specification_version: 4
|
144
276
|
summary: OpenWeather API Ruby client.
|