rails_whitepages 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 4e06ab82e03bce622985d34d066ae1dbab5c616a
4
- data.tar.gz: 4c5c6b44d60231f380a7c94eb1980edd28167c82
3
+ metadata.gz: fb1be28a2eb42bdb4ebc4981f149489770868ce2
4
+ data.tar.gz: 2829e56899be4b43ea5b35a56a76f7b00e5ac329
5
5
  SHA512:
6
- metadata.gz: 770a2d38b5d55bd47a01c5f376997c32cb6f065325b49b856e74f983809e8eba09bdb4116d545560c95ad9348e32cc1f56725178b9ccd7f679f590805814f1c4
7
- data.tar.gz: dbd67d168b0cc45ab8ee1e44f8dd6eb1a2017bcc99ff939c0d83b7c6cf78739cc1d9cda6d75a0d809307fd03ff03483b2f412b125cfe5917f2f0aa5baf114bc1
6
+ metadata.gz: ae5eb980144fdb1c90f7d5c5e2b8741873f75fb82d1a0cc0ee8831577cec151d3aa921ab7751bb64093a5ee772f6671b375d3547075008fa741e97c2d126f312
7
+ data.tar.gz: c776eddc774ef3b46caa135c6bd670354ea014dea377989705c16300f52655be1155d03900e1c3daf364b83ab1930353db6046909bbb84092a1ca9c81b4d8583
@@ -16,19 +16,36 @@ module RailsWhitepages
16
16
  end
17
17
 
18
18
  def find_person(query)
19
- make_http_call(query, "person")
19
+ make_http_call(query, "person.json")
20
20
  end
21
21
 
22
22
  def reverse_phone(phone)
23
23
  query["phone_number"] = phone
24
- make_http_call(query, "phone")
24
+ make_http_call(query, "phone.json")
25
25
  end
26
-
26
+
27
+ def email_validation(email)
28
+ query = Hash.new
29
+ query["email_address"] = email
30
+ make_http_call(query, "identity_score/email_address_", "2.0")
31
+ end
32
+
33
+ def reverse_address(query)
34
+ make_http_call(query, "location.json")
35
+ end
36
+
37
+ def find_business(name,city)
38
+ query = Hash.new
39
+ query["name"] = name
40
+ query["city"] = city
41
+ make_http_call(query, "business.json")
42
+ end
43
+
27
44
  private
28
45
 
29
- def make_http_call(request, endpoint)
46
+ def make_http_call(request, endpoint, api_version = @api_version)
30
47
  request["api_key"] = @api_key
31
- url = URI.parse( @base_uri + @api_version + "/" + endpoint + ".json?" + request.to_query )
48
+ url = URI.parse( @base_uri + api_version + "/" + endpoint + "?" + request.to_query )
32
49
  response = Net::HTTP.get( url )
33
50
  return JSON.parse(response)
34
51
  end
@@ -1,3 +1,3 @@
1
1
  module RailsWhitepages
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_whitepages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ellery J. Durgin