Skip to content

Commit 062a861

Browse files
committed
documentation and licence
1 parent a5b358c commit 062a861

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2014 HsPS <[email protected]>, Deepak Kumar<[email protected]>
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## A ruby wrapper for Open Weather Map API.
2+
3+
## Installation
4+
5+
Add the following to your **Gemfile**
6+
7+
gem 'open_weather'
8+
9+
or
10+
11+
$ gem install open_weather
12+
13+
## Usage
14+
15+
require 'open_weather'
16+
17+
# current weather APIs
18+
19+
# get current weather by city name
20+
OpenWeather::Current.city("Cochin, IN")
21+
22+
# get current weather by city id
23+
OpenWeather::Current.city_id("1273874")
24+
25+
# get current weather by geocode. (lat, lon)
26+
OpenWeather::Current.geocode(9.94, 76.26)
27+
28+
# weather forecast APIs
29+
30+
# get weather forecast by city name
31+
OpenWeather::Forecast.city("Cochin, IN")
32+
33+
# get weather forecast by city id
34+
OpenWeather::Forecast.city_id("1273874")
35+
36+
# get weather forecast by geocode. (lat, lon)
37+
OpenWeather::Forecast.geocode(9.94, 76.26)
38+
39+
## Contributing
40+
41+
Fork it
42+
Create your feature branch (git checkout -b my-new-feature)
43+
Commit your changes (git commit -am 'Added some feature')
44+
Push to the branch (git push origin my-new-feature)
45+
Create new Pull Request

0 commit comments

Comments
 (0)