maju 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -11
  3. data/lib/maju/version.rb +1 -1
  4. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6ab7a0d58a2f7843f8d0ad2afa25104d250a41f6076fa99d177390d2cd86d61
4
- data.tar.gz: 4652573cf447bc766a453089b8f49d96b60772492e15c7b61f94b8feae7d77ab
3
+ metadata.gz: a623699dbdaf465d675b52e625cab7b1aeb2900100b870b03edd89a142be49e7
4
+ data.tar.gz: e57d7febcdf1b7618d32f39bdc164bf2fc1b35f7274520c1e5fdf514eeccd8d8
5
5
  SHA512:
6
- metadata.gz: 223ab97a989fbec10ac2b2028da93863d5bbd963b8a75e8453b11b78aa1092e7b83c34e2539cf054fca0a142e32d6dd15240756310d12a4b78fd269f2ae58d30
7
- data.tar.gz: 67a4c843e7d26d01d5be68e058ed358cd230ec60881bb9db3a7fa4f5c0cd86689c00696997d2953a543140cd2982a62871711c4ef4078ac61f9125d958df5fd6
6
+ metadata.gz: 11e29d154a1f69492a1b705e4a49d2a23e275b2fd033037ff2fdca363f0cc72770e392ea5f724726ed06319bed54e8031613293f8d32ff781a2910077fe29a0d
7
+ data.tar.gz: d256a2c72c6bf1fa991e2ebe9f5cd377ebc87f4daf67c21b4f5f407f672ba17f23e2d9bafa7a26d366bb7a1f4df7bd5a89f46d9737ff29c17308da829a038b36
data/README.md CHANGED
@@ -1,47 +1,66 @@
1
1
  # StringHelpers
2
- Get weather informations from OpenWeather
2
+ Get weather information about a city easily with Maju.
3
+
4
+
3
5
 
4
6
  ## Install
7
+ Maju is a rubygem package, and it can be installed via gem install command
5
8
 
6
9
  ```sh
7
10
  gem install maju
8
11
  ```
9
- or add to your Gemfile
12
+
13
+ or you can add to your Gemfile
10
14
 
11
15
  ```sh
12
16
  gem maju
13
17
  ```
18
+ and then run
19
+
20
+ ```sh
21
+ bundle install
22
+ ```
23
+
14
24
 
15
25
  ## Configuration
16
- Before usage, you need to create a account on[Open Weather Site](https://openweathermap.org/) and gerenate a API key. To create an API key, follow the steps in [this tutorial](https://openweathermap.org/guide)
26
+ After instalation and before usage, you need to create a account on[Open Weather Site](https://openweathermap.org/) and gerenate a API key. To create an API key, follow the steps in [this tutorial](https://openweathermap.org/guide)
17
27
 
18
- After get your API KEY, you need to start the client.
28
+ After get your API KEY, you need to start a maju client.
19
29
 
20
30
  ```ruby
21
- client = Maju::Client.new(api_token: 'YOUR_API_KEY_HERE')
31
+ client = Maju::Client.new(api_token: 'YOUR_API_KEY_HERE', lang: 'pt_BR', unit: 'celsius')
22
32
  ```
23
33
 
34
+ Now you will use the instance 'client' to call all public method
24
35
 
25
36
 
26
37
  ## Usage
27
- Get today information about weather. You need to pass city name params
38
+ To get today information about weather.
39
+
40
+ You need to pass city name with params 'city'
28
41
 
29
42
  ```ruby
30
43
  client.current(city: 'Monte Santo de Minas')
31
44
  ```
32
- or to pass lat and long cordinates
45
+
46
+ or to pass a lat and long cordinates
33
47
 
34
48
  ```ruby
35
49
  client.current(lat: '-21.2049202', long: '-47.0943532')
36
50
  ```
37
51
 
38
- ## Geocode
52
+ If you don't know lat and long from city, use geocode method.
39
53
 
54
+ ## Geocode
40
55
  if you need to find out lat and long of some city you can use geocode method
41
56
  ```ruby
42
57
  client.geocode(city: 'Monte Santo de Minas')
43
58
  ```
44
- will returns:
59
+
60
+
61
+ it will returns the array.
62
+
63
+ NOTE: if the return contains only one object, that is, only one city was found, it will return a direct object. If there is more than one city, an array containing objects will be returned, in the same structure.
45
64
 
46
65
  ```json
47
66
  [
@@ -55,14 +74,14 @@ will returns:
55
74
  ]
56
75
  ```
57
76
 
77
+
58
78
  ## Forecasts
59
79
  To get forecast for the days ahead, you can use the forecast method. If you don't know lat and long informations, use the geocode method.
60
80
 
61
81
  ```ruby
62
- client.current(lat: '-21.2049202', long: '-47.0943532')
82
+ client.forecast(lat: '-21.2049202', long: '-47.0943532')
63
83
  ```
64
84
 
65
-
66
85
  ## License
67
86
  StringHelper is available under the MIT license.
68
87
 
data/lib/maju/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Maju
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maju
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raphael Ivan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-13 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2023-02-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rest-client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.1.0
13
27
  description: Get weather information directly from the console or easily integrate
14
28
  your application with OpenWeather
15
29
  email: