easy_weather 0.1.0 → 1.0.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/README.md +25 -1
- data/lib/easy_weather/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 163888b82fca17ecc215573bd146aa20ead012673535eadf5e369191ec0e0bc2
|
4
|
+
data.tar.gz: d043a7545b2e2ef3ab10030c3e42156c0dc6415fe3ef8b114e15fa0fadb868db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae74d27c104b9e21bf8f7bbf1f5cdcc8d034455e42f1e116b4363119d3af96cd6241ef2e62d369f04a15102e6f2fdc422101f25a40bfb994026d97089a9ba632
|
7
|
+
data.tar.gz: 3971be70a552ec050f2394e7d8e5d2f18a9352d724bb62e194034cef5ccf9488ce948535237a334f0173eea79263da574fc82d1d4edf8052e78b9fe10897860f
|
data/README.md
CHANGED
@@ -22,8 +22,32 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
First, you need to create an acount at https://api.openweathermap.org/
|
26
|
+
in order to get an API KEY.
|
26
27
|
|
28
|
+
Then, you need to set your API KEY as an environment variable:
|
29
|
+
- Write in the console export API_KEY_NAME=VALUE
|
30
|
+
|
31
|
+
So, with that set you can start using the gem by creating an instance
|
32
|
+
of the Weather class like this:
|
33
|
+
weather = Weather.new("Your city")
|
34
|
+
|
35
|
+
Then, you can do the following actions:
|
36
|
+
|
37
|
+
Get the forecast data:
|
38
|
+
weather.forecast_data
|
39
|
+
|
40
|
+
Get the astronomy data:
|
41
|
+
weather.astronomy_data
|
42
|
+
|
43
|
+
Get the current temperature:
|
44
|
+
weather.temperature
|
45
|
+
|
46
|
+
Get the current wind data:
|
47
|
+
weather.wind
|
48
|
+
|
49
|
+
Get the atmosphere data:
|
50
|
+
weather.atmosphere_data
|
27
51
|
## Development
|
28
52
|
|
29
53
|
After checking out the repo, 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.
|
data/lib/easy_weather/version.rb
CHANGED