Skip to content

Commit cd874da

Browse files
committed
Added tests and updated README.
1 parent b39676c commit cd874da

12 files changed

+566
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ OpenWeather::Forecast.city_id("1273874")
5151

5252
# get weather forecast by geocode. (lat, lon)
5353
OpenWeather::Forecast.geocode(9.94, 76.26)
54+
55+
# get daily weather forecast by city name
56+
OpenWeather::ForecastDaily.city("Cochin, IN")
57+
58+
# get daily weather forecast by city name in fahrenheit
59+
OpenWeather::ForecastDaily.city("Cochin, IN", units: 'imperial')
60+
61+
# get daily weather forecast by city id
62+
OpenWeather::ForecastDaily.city_id("1273874")
63+
64+
# get daily weather forecast by geocode. (lat, lon)
65+
OpenWeather::ForecastDaily.geocode(9.94, 76.26)
66+
67+
# get daily weather forecast for 6 days
68+
OpenWeather::ForecastDaily.city_id("1273874", cnt: 6)
5469
```
5570

5671
Doucumentation about the weather forecast end-point:

spec/fixtures/cassettes/api/forecast_daily_city_id_invalid.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/cassettes/api/forecast_daily_city_id_valid.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/cassettes/api/forecast_daily_city_imperial_valid.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/cassettes/api/forecast_daily_city_metric_valid.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/cassettes/api/forecast_daily_city_valid.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/cassettes/api/forecast_daily_cnt_6.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/cassettes/api/forecast_daily_cnt_default.yml

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)