@@ -12,11 +12,12 @@ Add the following to your **Gemfile**
12
12
13
13
## Usage
14
14
15
+
16
+ ### Current weather information API
17
+
15
18
``` ruby
16
19
require ' open_weather'
17
20
18
- # current weather APIs
19
-
20
21
# get current weather by city name
21
22
OpenWeather ::Current .city(" Cochin, IN" )
22
23
@@ -28,8 +29,16 @@ OpenWeather::Current.geocode(9.94, 76.26)
28
29
29
30
# get the current weather in degrees celsius
30
31
OpenWeather ::Current .city(" Cochin, IN" , units: ' metric' )
32
+ ```
33
+
34
+ Documentation about the current weather end-point:
35
+ http://openweathermap.org/current
36
+
31
37
32
- # weather forecast APIs
38
+ ### Weather forecast API
39
+
40
+ ``` ruby
41
+ require ' open_weather'
33
42
34
43
# get weather forecast by city name
35
44
OpenWeather ::Forecast .city(" Cochin, IN" )
@@ -44,6 +53,9 @@ OpenWeather::Forecast.city_id("1273874")
44
53
OpenWeather ::Forecast .geocode(9.94 , 76.26 )
45
54
```
46
55
56
+ Doucumentation about the weather forecast end-point:
57
+ http://openweathermap.org/forecast
58
+
47
59
#### Using the API key
48
60
49
61
``` ruby
@@ -52,6 +64,9 @@ options = { units: "metric", APPID: 1111111111 }
52
64
OpenWeather ::Current .city(" Berlin, DE" , options)
53
65
```
54
66
67
+ How to get an API key and tips for an effective usage of the API:
68
+ http://openweathermap.org/appid
69
+
55
70
56
71
## Contributing
57
72
0 commit comments