cheetahmails 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cheetahmails.rb +6 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ac87fd52f32e584182c5cf06c60c123e1ad3255
|
4
|
+
data.tar.gz: be0f0e27b5b5fd6ea1041e7dfc84416b239a9f19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f98c72f1a28ac4144d7a00412e028fdbdc20ecfc24dcc3c14c6116ad17841197f2db76ab99235266d0238992ca8fe6edced3e22c5c4d5e430222db06922f5b80
|
7
|
+
data.tar.gz: e45614047fbe3d415c98cf338c27782a42490078b915d487f0b9f6f9e748d945e5891263e089fd97f35390ffb92febd858aecc156a60d94c5f87bb8f04429aec
|
data/lib/cheetahmails.rb
CHANGED
@@ -63,7 +63,7 @@ module Cheetahmails
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
def self.find_list_member(email)
|
66
|
+
def self.find_list_member(email, prop='')
|
67
67
|
tries ||= 2
|
68
68
|
|
69
69
|
faraday = Faraday.new(:url => @base_uri) do |faraday|
|
@@ -78,7 +78,7 @@ module Cheetahmails
|
|
78
78
|
|
79
79
|
params = {
|
80
80
|
"viewName" => Cheetahmails.configuration.view_name,
|
81
|
-
"prop" =>
|
81
|
+
"prop" => prop, #first_name,last_name
|
82
82
|
"columnName" => "email_address",
|
83
83
|
"operation" => "=",
|
84
84
|
"param" => email
|
@@ -89,13 +89,15 @@ module Cheetahmails
|
|
89
89
|
begin
|
90
90
|
jsonresponse = JSON.parse(response.body)
|
91
91
|
rescue JSON::ParserError => error
|
92
|
-
raise response.
|
92
|
+
raise response.statzus.to_s + " " + response.body
|
93
93
|
end
|
94
94
|
|
95
95
|
raise RetryException, jsonresponse["message"] if response.status == 401
|
96
96
|
|
97
|
+
return false if response.status == 404
|
98
|
+
|
97
99
|
begin
|
98
|
-
|
100
|
+
return jsonresponse[0]
|
99
101
|
rescue => error
|
100
102
|
return false
|
101
103
|
end
|