fullcontact 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -2
- data/lib/fullcontact.rb +2 -2
- data/lib/fullcontact/client/person.rb +6 -0
- data/lib/fullcontact/configuration.rb +1 -1
- data/lib/fullcontact/request.rb +5 -5
- data/lib/fullcontact/version.rb +1 -1
- data/spec/fullcontact_spec.rb +7 -0
- metadata +27 -27
data/README.md
CHANGED
@@ -2,6 +2,11 @@ FullContact Ruby Gem
|
|
2
2
|
====================
|
3
3
|
A Ruby wrapper for the [FullContact API](http://www.fullcontact.com/)
|
4
4
|
|
5
|
+
Changes
|
6
|
+
-------
|
7
|
+
|
8
|
+
0.6.0 - Removal of timeoutSeconds parameter. This parameter is automatically stripped from your request if included.
|
9
|
+
|
5
10
|
Installation
|
6
11
|
------------
|
7
12
|
gem install fullcontact
|
@@ -23,9 +28,15 @@ Usage Examples
|
|
23
28
|
# Get information about a email address
|
24
29
|
person = FullContact.person(email: "brawest@gmail.com")
|
25
30
|
|
26
|
-
# Get information about a twitter
|
31
|
+
# Get information about a twitter handle
|
27
32
|
person2 = FullContact.person(twitter: "brawest")
|
28
33
|
|
34
|
+
# Get information about a facebook username
|
35
|
+
person3 = FullContact.person(facebookUsername: "bart.lorang")
|
36
|
+
|
37
|
+
# Get information from a phone number
|
38
|
+
person4 = FullContact.person(phone:13037170414)
|
39
|
+
|
29
40
|
# Get information about a twitter and ensure a 30s socket open timeout and a 15s socket read timeout
|
30
41
|
# Can throw a Faraday::Error::TimeoutError if timeouts are exceeded
|
31
42
|
person3 = FullContact.person({:twitter => "brawest"}, {:request => {:timeout => 15, :open_timeout => 30}})
|
@@ -41,6 +52,6 @@ Contributions
|
|
41
52
|
|
42
53
|
Copyright
|
43
54
|
---------
|
44
|
-
Copyright (c)
|
55
|
+
Copyright (c) 2013 FullContact, Brandon West
|
45
56
|
|
46
57
|
See [LICENSE](https://github.com/brandonmwest/rainmaker/blob/master/LICENSE.md) for details.
|
data/lib/fullcontact.rb
CHANGED
@@ -8,6 +8,12 @@ module FullContact
|
|
8
8
|
warn "[DEPRECATION] supplying an email address directly is deprecated. Please use {email: #{options}} instead."
|
9
9
|
options = {:email => options}
|
10
10
|
end
|
11
|
+
|
12
|
+
if options.has_key?(:timeoutSeconds)
|
13
|
+
options.delete(:timeoutSeconds)
|
14
|
+
warn '[DEPRECATION] timeoutSeconds is no longer a supported parameter. It has been removed from your request.'
|
15
|
+
end
|
16
|
+
|
11
17
|
response = get('person', options, false, faraday_options)
|
12
18
|
format.to_s.downcase == 'xml' ? response['person'] : response
|
13
19
|
end
|
data/lib/fullcontact/request.rb
CHANGED
@@ -10,13 +10,13 @@ module FullContact
|
|
10
10
|
|
11
11
|
# Perform an HTTP request
|
12
12
|
def request(method, path, options, raw=false, faraday_options={})
|
13
|
-
|
13
|
+
options[:apiKey] = FullContact.options[:api_key]
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
response = connection(raw, faraday_options).send(method) do |request|
|
16
|
+
request.url(formatted_path(path), options)
|
17
|
+
end
|
18
18
|
|
19
|
-
|
19
|
+
raw ? response : response.body
|
20
20
|
end
|
21
21
|
|
22
22
|
def formatted_path(path)
|
data/lib/fullcontact/version.rb
CHANGED
data/spec/fullcontact_spec.rb
CHANGED
@@ -29,6 +29,13 @@ describe FullContact do
|
|
29
29
|
.should have_been_made
|
30
30
|
end
|
31
31
|
|
32
|
+
it "should strip the timeoutSeconds parameter" do
|
33
|
+
FullContact.person(email: "brawest@gmail.com", timeoutSeconds: 30)
|
34
|
+
a_get("person.json")
|
35
|
+
.with(:query => {:apiKey => "api_key", :email => "brawest@gmail.com"})
|
36
|
+
.should have_been_made
|
37
|
+
end
|
38
|
+
|
32
39
|
it "should return the same results as a client by email" do
|
33
40
|
FullContact.person(:email => "brawest@gmail.com").should == FullContact::Client.new.person(:email => "brawest@gmail.com")
|
34
41
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fullcontact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05
|
12
|
+
date: 2013-11-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: maruku
|
16
|
-
requirement: &
|
16
|
+
requirement: &70315754526940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0.6'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70315754526940
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: nokogiri
|
27
|
-
requirement: &
|
27
|
+
requirement: &70315754526220 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.4'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70315754526220
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70315754525280 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0.9'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70315754525280
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rspec
|
49
|
-
requirement: &
|
49
|
+
requirement: &70315754524760 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '2.6'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70315754524760
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: simplecov
|
60
|
-
requirement: &
|
60
|
+
requirement: &70315754524100 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0.4'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70315754524100
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: webmock
|
71
|
-
requirement: &
|
71
|
+
requirement: &70315754523620 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '1.6'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70315754523620
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: yard
|
82
|
-
requirement: &
|
82
|
+
requirement: &70315754523000 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0.7'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70315754523000
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: hashie
|
93
|
-
requirement: &
|
93
|
+
requirement: &70315754538900 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '2.0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70315754538900
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: faraday
|
104
|
-
requirement: &
|
104
|
+
requirement: &70315754538320 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0.8'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70315754538320
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: faraday_middleware
|
115
|
-
requirement: &
|
115
|
+
requirement: &70315754537700 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0.9'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70315754537700
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: multi_xml
|
126
|
-
requirement: &
|
126
|
+
requirement: &70315754536780 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '0.5'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70315754536780
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: rash
|
137
|
-
requirement: &
|
137
|
+
requirement: &70315754535620 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,7 +142,7 @@ dependencies:
|
|
142
142
|
version: '0.4'
|
143
143
|
type: :runtime
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70315754535620
|
146
146
|
description: A Ruby wrapper for the FullContact API
|
147
147
|
email:
|
148
148
|
- support@fullcontact.com
|
@@ -195,7 +195,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
195
195
|
version: '0'
|
196
196
|
segments:
|
197
197
|
- 0
|
198
|
-
hash:
|
198
|
+
hash: -4290604781805604645
|
199
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
200
|
none: false
|
201
201
|
requirements:
|