ola_maps 0.1.0 → 0.1.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -110
  3. data/lib/ola_maps/version.rb +1 -1
  4. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ffdd3cbc975d235ec87c4484b194811bcba795b11662ff859b930085523b4ab
4
- data.tar.gz: ea2ffbff4838dc8b9c6e6ff373d01ec4fbddd92f410f02e628dc1601bfbbbcae
3
+ metadata.gz: 246a3bf364c2d2e2c8740748da563937eed8c2f8cef09dd3e6d106197c232645
4
+ data.tar.gz: 363e06fee9583c4cbf1977d41c1989dfe36ae56f6916ebf50cf81a8522b8e9a7
5
5
  SHA512:
6
- metadata.gz: dd9b986b1a9ee6b9d0b61efc17d847c106f3b58fa923bca07c5d55c21281f02ccea3fdda8fab64482849fd1045a8213b4e8de82495deef929e01b7a88c4d254a
7
- data.tar.gz: 29255ad6e54214869c9d4c362e4271b04b4278fa2ca9095416cae9c965eb608fc31faf47a90a51c38fb134f82cb19d07cdee2a521a0eea17d5742e5f3aded252
6
+ metadata.gz: 235ba4d6d5a5626e1fce7ff4132143b88ac9e57d5e3fb124161d3cbde7804a108a1b25af7ced563abab65f7985a9c7e2d23684f825993712016772396b2c60e5
7
+ data.tar.gz: 4145268c120530d65a97570a310d40ef562cbaf57ebff82a455d3fa2c30f40c29a0d2b230c723b809445abb43eb5def15480f5b5192cf9570f73c584e2033f5b
data/README.md CHANGED
@@ -12,17 +12,21 @@ gem 'ola_maps'
12
12
 
13
13
  Then, execute:
14
14
 
15
- `$ bundle install`
15
+ ```ruby
16
+ $ bundle install
17
+ ```
16
18
 
17
19
  If bundler is not being used to manage dependencies, install the gem by executing:
18
20
 
19
- ` $ gem install 'ola_maps'`
21
+ ```ruby
22
+ $ gem install 'ola_maps'
23
+ ```
20
24
 
21
25
  ## Configuration
22
26
 
23
27
  Before using the gem, set up your environment variables in a .env file:
24
28
 
25
- ```
29
+ ```ruby
26
30
  API_KEY=your_api_key
27
31
  CLIENT_ID=your_client_id
28
32
  CLIENT_SECRET=your_client_secret
@@ -32,7 +36,7 @@ CLIENT_SECRET=your_client_secret
32
36
 
33
37
  Here's how to use the `OlaMaps` gem:
34
38
 
35
- ```
39
+ ```ruby
36
40
  require 'dotenv/load'
37
41
  require 'ola_maps'
38
42
 
@@ -87,123 +91,21 @@ Returns reverse geocoded address information for a given latitude and longitude.
87
91
 
88
92
  To run the tests for this gem, ensure you have the required environment variables set in your .env file, then execute:
89
93
 
90
- ```
91
- bundle exec rspec
92
- ```
93
-
94
- ## Contributing
95
-
96
- Bug reports and pull requests are welcome on GitHub at [ola_maps](https://github.com/shobhit-shukla/ola_maps). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/shobhit-shukla/ola_maps/blob/main/CODE_OF_CONDUCT.md).
97
-
98
- ## License
99
-
100
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
101
- Here’s a template for your README file for the `OlaMaps` gem:
102
-
103
- ````markdown
104
- # OlaMaps
105
-
106
- A Ruby gem for interacting with the Ola Maps API, providing a simple interface for location-based services like autocomplete, geocoding, and reverse geocoding.
107
-
108
- ## Installation
109
-
110
- Add this line to your application's Gemfile:
111
-
112
94
  ```ruby
113
- gem 'ola_maps'
114
- ```
115
- ````
116
-
117
- Then, execute:
118
-
119
- ```bash
120
- bundle install
121
- ```
122
-
123
- ## Configuration
124
-
125
- ### Environment Variables
126
-
127
- Before using the gem, set up your environment variables in a `.env` file:
128
-
129
- ```plaintext
130
- API_KEY=your_api_key
131
- CLIENT_ID=your_client_id
132
- CLIENT_SECRET=your_client_secret
133
- ```
134
-
135
- ### Usage
136
-
137
- Here's how to use the `OlaMaps` gem:
138
-
139
- ```ruby
140
- require 'dotenv/load'
141
- require 'ola_maps'
142
-
143
- client = OlaMaps::Client.new(
144
- api_key: ENV['API_KEY'],
145
- client_id: ENV['CLIENT_ID'],
146
- client_secret: ENV['CLIENT_SECRET']
147
- )
148
-
149
- # Autocomplete
150
- autocomplete_response = client.autocomplete('kempe')
151
- puts autocomplete_response.body
152
-
153
- # Geocode
154
- geocode_response = client.geocode('Bangalore')
155
- puts geocode_response.body
156
-
157
- # Reverse Geocode
158
- reverse_geocode_response = client.reverse_geocode('12.931316595874005,77.61649243443775')
159
- puts reverse_geocode_response.body
160
- ```
161
-
162
- ## API Methods
163
-
164
- ### `#autocomplete(input, origin: nil, location: nil, radius: nil, strictbounds: nil)`
165
-
166
- Returns autocomplete suggestions based on the input string.
167
-
168
- - **Parameters:**
169
- - `input`: The input string for autocomplete.
170
- - `origin`: (Optional) The origin location.
171
- - `location`: (Optional) The location to bias the results.
172
- - `radius`: (Optional) The radius within which to return results.
173
- - `strictbounds`: (Optional) If true, restrict results to the specified area.
174
-
175
- ### `#geocode(address, bounds: nil, language: 'English')`
176
-
177
- Returns geocoded address information.
178
-
179
- - **Parameters:**
180
- - `address`: The address to geocode.
181
- - `bounds`: (Optional) The bounds within which to search.
182
- - `language`: (Optional) The language for the response (default is 'English').
183
-
184
- ### `#reverse_geocode(latlng)`
185
-
186
- Returns reverse geocoded address information for a given latitude and longitude.
187
-
188
- - **Parameters:**
189
- - `latlng`: The latitude and longitude in the format `lat,lng`.
190
-
191
- ## Running Tests
192
-
193
- To run the tests for this gem, ensure you have the required environment variables set in your `.env` file, then execute:
194
-
195
- ```bash
196
95
  bundle exec rspec
197
96
  ```
198
97
 
199
98
  ## Contributing
200
99
 
201
- 1. Fork it (https://github.com/yourusername/ola_maps/fork)
100
+ 1. Fork it (https://github.com/shobhit-shukla/ola_maps/fork)
202
101
  2. Create your feature branch (`git checkout -b feature/YourFeature`)
203
102
  3. Commit your changes (`git commit -m 'Add some feature'`)
204
103
  4. Push to the branch (`git push origin feature/YourFeature`)
205
104
  5. Create a new Pull Request
206
105
 
106
+ Bug reports and pull requests are welcome on GitHub at [ola_maps](https://github.com/shobhit-shukla/ola_maps). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/shobhit-shukla/ola_maps/blob/main/CODE_OF_CONDUCT.md).
107
+
108
+
207
109
  ## License
208
110
 
209
111
  This gem is available as open-source under the terms of the MIT License.
@@ -1,3 +1,3 @@
1
1
  module OlaMaps
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ola_maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shobhit
@@ -119,14 +119,14 @@ files:
119
119
  - lib/ola_maps.rb
120
120
  - lib/ola_maps/client.rb
121
121
  - lib/ola_maps/version.rb
122
- homepage: https://github.com/shobhit-shukla/ola-maps-ruby
122
+ homepage: https://github.com/shobhit-shukla/ola_maps
123
123
  licenses:
124
124
  - MIT
125
125
  metadata:
126
126
  allowed_push_host: https://rubygems.org
127
- homepage_uri: https://github.com/shobhit-shukla/ola-maps-ruby
128
- source_code_uri: https://github.com/shobhit-shukla/ola-maps-ruby
129
- changelog_uri: https://github.com/shobhit-shukla/ola-maps-ruby
127
+ homepage_uri: https://github.com/shobhit-shukla/ola_maps
128
+ source_code_uri: https://github.com/shobhit-shukla/ola_maps
129
+ changelog_uri: https://github.com/shobhit-shukla/ola_maps
130
130
  post_install_message:
131
131
  rdoc_options: []
132
132
  require_paths: