open-meteo 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 823b394116c34b4acad4f7a01f7e48aa70db6b1953f316cf65c5fe7bc10c22fd
4
- data.tar.gz: 472b5dd09142afea3e1f496654719150fa3d172a05ef6519d188d558e8f6e2d5
3
+ metadata.gz: 1c6c6b4ccb93360c8c3f27479f8bc01cc5cc37a7d14f2ff6942d745e3bd243a8
4
+ data.tar.gz: e10768db1766c5c7a48f8c68e6b15d2e367aefa0dc1bc3fc9a3fa263ce7cca93
5
5
  SHA512:
6
- metadata.gz: c52a61be8ca120808d296925106c5d19c4486b6cf0835606a05484be01f4f25268af330baae510ce3dd0f6b240391673dca8e4bdcac5121742330c6a81b3c8e3
7
- data.tar.gz: 686bdb878b51779187d22b1262d479fedcff9f179761cfc4049754f7bd213d44ff19196f0ba5c4eb849de647722ab7694cda6f3c4190df491bef4e91776e3c1a
6
+ metadata.gz: 966bbb364b37dc3e4fe846516f862216c172e242949b5b64d45afded542336f704904e6725b7fcb867de0481a23988789c4392f7480c62dc24491d62b65740fa
7
+ data.tar.gz: 694c506e84309461346622763b562f34cd9f11d6fb34d7ab81b25faa7a808298cc07ecb58e02765ae9abd8a80b4122df388f9a57d657b7b63131e7cda07008ee
@@ -12,8 +12,9 @@ module OpenMeteo
12
12
  class WrongLocationType < StandardError
13
13
  end
14
14
 
15
- def initialize(client: OpenMeteo::Client.new)
15
+ def initialize(client: OpenMeteo::Client.new, response_wrapper: OpenMeteo::ResponseWrapper.new)
16
16
  @client = client
17
+ @response_wrapper = response_wrapper
17
18
  end
18
19
 
19
20
  def get(location:, variables:, model: :general)
@@ -49,7 +50,9 @@ module OpenMeteo
49
50
 
50
51
  def get_forecast(endpoint, location, variables)
51
52
  get_params = { **location.to_get_params, **variables.to_get_params }
52
- client.get(endpoint, **get_params)
53
+ response = client.get(endpoint, **get_params)
54
+
55
+ @response_wrapper.wrap(response, entity: OpenMeteo::Entities::Forecast)
53
56
  end
54
57
  end
55
58
  end
@@ -1,3 +1,3 @@
1
1
  module OpenMeteo
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open-meteo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Morgenstern