Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fullcontact
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
prospector
fullcontact
Commits
8cc191ea
Commit
8cc191ea
authored
Jun 09, 2017
by
Vitalik Ovcharenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support proxy
parent
2ddd53de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
index.js
index.js
+6
-3
No files found.
index.js
View file @
8cc191ea
...
...
@@ -12,14 +12,16 @@ var slice = Array.prototype.slice;
* @param {String} api The API key for the Full Contact service.
* @api public
*/
function
FullContact
(
api
)
{
function
FullContact
(
api
,
proxy
)
{
if
(
!
(
this
instanceof
FullContact
))
{
return
new
FullContact
(
api
);
return
new
FullContact
(
api
,
proxy
);
}
this
.
key
=
api
;
// API key
this
.
version
=
'v2'
;
// API version
this
.
proxy
=
proxy
||
null
;
this
.
remaining
=
0
;
// How many API calls are remaining
this
.
ratelimit
=
0
;
// The amount of API calls allowed
this
.
ratereset
=
0
;
// In how many seconds is the rate limit reset
...
...
@@ -211,7 +213,8 @@ FullContact.prototype.exec = function exec(fn) {
requests
:
requests
.
map
(
function
urlsonly
(
data
)
{
return
data
.
url
;
})
}
},
proxy
:
this
.
proxy
},
function
requested
(
err
,
res
,
body
)
{
if
(
err
)
{
return
bailout
(
err
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment