apiverve_zipcodes 1.2.4 → 1.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd478615f7084c93c13e48a5270d82c58c3e5bb2f822ea608407775c6425bc14
4
- data.tar.gz: 63b74a88db06cb6dd7f020fd19443f88e336e9339834a8884f500742ae073bc3
3
+ metadata.gz: 5904114612604d0c253b69322fd04c5373dd4738940f4841cc2e8de37d58b72f
4
+ data.tar.gz: 5a00c26ac19306457d0cf5e40ee09c729304091de0e36d486a81bc6d4bef18a3
5
5
  SHA512:
6
- metadata.gz: 78cc079bdbab46a0995c2e6fdc3cb82848cf579626254ed4a1808772004047353411cd5c1cc5ce85c86c02d530275add5c9aa0e1273ca81b1295b1aa45c14c24
7
- data.tar.gz: 1ae553297f937ea1c4fdb1c60608f458a9dcef9f1f552f22bbba615ceb47b1b7601c7c1db705c3d0e465b9245bceb648ff699f583f2baa1cf50b0fae840d08ca
6
+ metadata.gz: 192414fa992ee78d9a39407c170710db4f465b09a48556672065b0da0f0dd068615a3bae58eb939e7a6f6736c40f4893edd1b1104891c8ade92e49a2434d352f
7
+ data.tar.gz: '09688b5050f88664f48d4885ea7cbb92d0cfb3550433d0f3360cf164e312583327f20d63b1108c70ed7d88cc3f4e80f3859c7a6f46b80abe33075709d4797972'
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Zip Codes Lookup API - Ruby Gem
2
2
 
3
- Zip Codes Lookup finds all postal codes within a US city or resolves a five-digit ZIP code to its city and state. Paid plans add geographic coordinates.
3
+ Zip Codes Lookup finds all postal codes within a US city or resolves a five-digit ZIP code to its city and state. Paid plans add the IANA time zone, geographic coordinates and the distance from the ZIP to a second ZIP.
4
4
 
5
5
  ## Installation
6
6
 
@@ -35,7 +35,10 @@ require 'apiverve_zipcodes'
35
35
  client = APIVerve::Zipcodes::Client.new(api_key: "YOUR_API_KEY")
36
36
 
37
37
  # Make a request
38
- response = client.execute({ zip: "64082" })
38
+ response = client.execute({
39
+ zip: "64082",
40
+ distanceTo: "64106"
41
+ })
39
42
 
40
43
  # Print the response
41
44
  puts response
@@ -46,7 +49,7 @@ puts response
46
49
 
47
50
  ```ruby
48
51
  begin
49
- response = client.execute({ zip: "64082" })
52
+ response = client.execute({ zip: "64082", distanceTo: "64106" })
50
53
  puts response["data"]
51
54
  rescue APIVerve::Zipcodes::ValidationError => e
52
55
  puts "Validation error: #{e.errors.join(', ')}"
@@ -78,7 +81,15 @@ client = APIVerve::Zipcodes::Client.new(
78
81
  "latitude": "38.850243",
79
82
  "longitude": "-94.39570",
80
83
  "city": "Lees Summit",
81
- "state": "Missouri"
84
+ "state": "Missouri",
85
+ "timezone": "America/Chicago",
86
+ "distance": {
87
+ "zipcode": "64106",
88
+ "city": "Kansas City",
89
+ "state_abbr": "MO",
90
+ "miles": 19.94,
91
+ "kilometers": 32.09
92
+ }
82
93
  }
83
94
  }
84
95
  ```
@@ -10,7 +10,7 @@ module APIVerve
10
10
  #
11
11
  # @example Basic usage
12
12
  # client = APIVerve::Zipcodes::Client.new(api_key: "your_api_key")
13
- # response = client.execute({ zip: "64082" })
13
+ # response = client.execute({ zip: "64082", distanceTo: "64106" })
14
14
  # puts response
15
15
  #
16
16
  # @see https://apiverve.com/marketplace/zipcodes?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 = { 'zip' => { type: 'string', required: true, min_length: 5, max_length: 5 } }
22
+ VALIDATION_RULES = { 'zip' => { type: 'string', required: true, min_length: 5, max_length: 5 }, 'distanceTo' => { type: 'string', required: false, min_length: 5, max_length: 5 } }
23
23
 
24
24
  # Format validation patterns
25
25
  FORMAT_PATTERNS = {
@@ -4,6 +4,6 @@ require_relative "apiverve_zipcodes/client"
4
4
 
5
5
  module APIVerve
6
6
  module Zipcodes
7
- VERSION = "1.2.4"
7
+ VERSION = "1.2.5"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiverve_zipcodes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIVerve
@@ -58,7 +58,8 @@ dependencies:
58
58
  - !ruby/object:Gem::Version
59
59
  version: '2.0'
60
60
  description: Zip Codes Lookup finds all postal codes within a US city or resolves
61
- a five-digit ZIP code to its city and state. Paid plans add geographic coordinates.
61
+ a five-digit ZIP code to its city and state. Paid plans add the IANA time zone,
62
+ geographic coordinates and the distance from the ZIP to a second ZIP.
62
63
  email:
63
64
  - hello@apiverve.com
64
65
  executables: []