apiverve_reversegeocode 1.2.5 → 1.2.6
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.
- checksums.yaml +4 -4
- data/README.md +16 -4
- data/lib/apiverve_reversegeocode/client.rb +2 -2
- data/lib/apiverve_reversegeocode.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 394ca3d4f780ecaaba971a28c3fe67d8749a8d7d016bf3fcaacd643034db654c
|
|
4
|
+
data.tar.gz: c6a3e6118e7aa39028f707df7de70a7b70c3a0ff8841217886cd159953250666
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9bd40e93b456ec6329d548bda2d9b57de63a18818e699e136f0b64face1bd6916bfb87b4393fb05967b77314624bc5352f6ea1502675929d6cbe7be1afbbbcc1
|
|
7
|
+
data.tar.gz: c00331a7c5bb14284a04d42d05b301ef6baafb2252ec5a6ee3a2672ae20354fb6860ada648b59484387dece5b1cd54123172a0b4235786be301193004e51116f
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Reverse Geocode API - Ruby Gem
|
|
2
2
|
|
|
3
|
-
Reverse Geocode converts latitude and longitude coordinates into US and
|
|
3
|
+
Reverse Geocode converts latitude and longitude coordinates into US, Canada and Australia location details. Pass geographic coordinates to retrieve the corresponding city, state, postal code, country code, time zone and US county. Paid plans can add the point's geohash, plus code and degrees-minutes-seconds notation.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -37,7 +37,8 @@ client = APIVerve::Reversegeocode::Client.new(api_key: "YOUR_API_KEY")
|
|
|
37
37
|
# Make a request
|
|
38
38
|
response = client.execute({
|
|
39
39
|
lat: 40.714224,
|
|
40
|
-
lon: -73.961452
|
|
40
|
+
lon: -73.961452,
|
|
41
|
+
geocodes: true
|
|
41
42
|
})
|
|
42
43
|
|
|
43
44
|
# Print the response
|
|
@@ -49,7 +50,7 @@ puts response
|
|
|
49
50
|
|
|
50
51
|
```ruby
|
|
51
52
|
begin
|
|
52
|
-
response = client.execute({ lat: 40.714224, lon: -73.961452 })
|
|
53
|
+
response = client.execute({ lat: 40.714224, lon: -73.961452, geocodes: true })
|
|
53
54
|
puts response["data"]
|
|
54
55
|
rescue APIVerve::Reversegeocode::ValidationError => e
|
|
55
56
|
puts "Validation error: #{e.errors.join(', ')}"
|
|
@@ -93,7 +94,18 @@ client = APIVerve::Reversegeocode::Client.new(
|
|
|
93
94
|
"East Brooklyn",
|
|
94
95
|
"Brooklyn Center",
|
|
95
96
|
"Brooklyn Heights"
|
|
96
|
-
]
|
|
97
|
+
],
|
|
98
|
+
"timezone": "America/New_York",
|
|
99
|
+
"county": "Kings County",
|
|
100
|
+
"countyFips": "36047",
|
|
101
|
+
"geocodes": {
|
|
102
|
+
"geohash": "dr5rsgyct",
|
|
103
|
+
"plusCode": "87G8P27Q+MC",
|
|
104
|
+
"dms": {
|
|
105
|
+
"latitude": "40°42'51.2\"N",
|
|
106
|
+
"longitude": "73°57'41.2\"W"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
97
109
|
}
|
|
98
110
|
}
|
|
99
111
|
```
|
|
@@ -10,7 +10,7 @@ module APIVerve
|
|
|
10
10
|
#
|
|
11
11
|
# @example Basic usage
|
|
12
12
|
# client = APIVerve::Reversegeocode::Client.new(api_key: "your_api_key")
|
|
13
|
-
# response = client.execute({ lat: 40.714224, lon: -73.961452 })
|
|
13
|
+
# response = client.execute({ lat: 40.714224, lon: -73.961452, geocodes: true })
|
|
14
14
|
# puts response
|
|
15
15
|
#
|
|
16
16
|
# @see https://apiverve.com/marketplace/reversegeocode?utm_source=ruby&utm_medium=referral&utm_content=readme
|
|
@@ -19,7 +19,7 @@ module APIVerve
|
|
|
19
19
|
DEFAULT_TIMEOUT = 30
|
|
20
20
|
|
|
21
21
|
# Validation rules for parameters
|
|
22
|
-
VALIDATION_RULES = { 'lat' => { type: 'number', required: true, min: -90, max: 90 }, 'lon' => { type: 'number', required: true, min: -180, max: 180 } }
|
|
22
|
+
VALIDATION_RULES = { 'lat' => { type: 'number', required: true, min: -90, max: 90 }, 'lon' => { type: 'number', required: true, min: -180, max: 180 }, 'geocodes' => { type: 'boolean', required: false } }
|
|
23
23
|
|
|
24
24
|
# Format validation patterns
|
|
25
25
|
FORMAT_PATTERNS = {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiverve_reversegeocode
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- APIVerve
|
|
@@ -57,9 +57,10 @@ dependencies:
|
|
|
57
57
|
- - "~>"
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
59
|
version: '2.0'
|
|
60
|
-
description: Reverse Geocode converts latitude and longitude coordinates into US
|
|
61
|
-
Canada location details. Pass geographic coordinates to retrieve the
|
|
62
|
-
city, state, postal code, and
|
|
60
|
+
description: Reverse Geocode converts latitude and longitude coordinates into US,
|
|
61
|
+
Canada and Australia location details. Pass geographic coordinates to retrieve the
|
|
62
|
+
corresponding city, state, postal code, country code, time zone and US county. Paid
|
|
63
|
+
plans can add the point's geohash, plus code and degrees-minutes-seconds notation.
|
|
63
64
|
email:
|
|
64
65
|
- hello@apiverve.com
|
|
65
66
|
executables: []
|