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
febbb79f
Commit
febbb79f
authored
Dec 03, 2015
by
Arnout Kazemier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14 from karlclement/master
Added webhookBody to the query params
parents
a90fece9
f1f57b91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
person.js
endpoints/person.js
+2
-2
index.js
index.js
+7
-0
person.test.js
test/person.test.js
+16
-0
No files found.
endpoints/person.js
View file @
febbb79f
...
@@ -18,14 +18,14 @@ function Person(api) {
...
@@ -18,14 +18,14 @@ function Person(api) {
* Retrieve contact information by e-mail.
* Retrieve contact information by e-mail.
*
*
* ```js
* ```js
* fullcontact.person.email('opensource@observe.it', [queue], [webhookUrl], [webhookId], fn);
* fullcontact.person.email('opensource@observe.it', [queue], [webhookUrl], [webhookId],
[webhookBody], [style],
fn);
* ```
* ```
*
*
* @returns {Person}
* @returns {Person}
* @api public
* @api public
*/
*/
Person
.
prototype
.
email
=
function
email
()
{
Person
.
prototype
.
email
=
function
email
()
{
var
args
=
this
.
api
.
args
(
arguments
,
'queue'
,
'webhookUrl'
,
'webhookId'
);
var
args
=
this
.
api
.
args
(
arguments
,
'queue'
,
'webhookUrl'
,
'webhookId'
,
'webhookBody'
,
'style'
);
this
.
send
({
email
:
args
.
value
},
args
);
this
.
send
({
email
:
args
.
value
},
args
);
return
this
;
return
this
;
...
...
index.js
View file @
febbb79f
...
@@ -62,6 +62,13 @@ FullContact.prototype.process = function req(api, query, args) {
...
@@ -62,6 +62,13 @@ FullContact.prototype.process = function req(api, query, args) {
if
(
args
.
webhookId
)
{
if
(
args
.
webhookId
)
{
query
.
webhookId
=
args
.
webhookId
;
query
.
webhookId
=
args
.
webhookId
;
}
}
if
(
args
.
webhookBody
)
{
query
.
webhookBody
=
args
.
webhookBody
;
}
if
(
args
[
'style'
])
{
query
[
'style'
]
=
args
[
'style'
];
}
//
//
// The packet that is send to the server or queued when we are in queuing
// The packet that is send to the server or queued when we are in queuing
...
...
test/person.test.js
View file @
febbb79f
...
@@ -39,6 +39,22 @@ describe('FullContact.Person', function () {
...
@@ -39,6 +39,22 @@ describe('FullContact.Person', function () {
it
(
'provides the proper casing'
);
it
(
'provides the proper casing'
);
});
});
describe
(
'#email with webhook url/id/bodyType'
,
function
()
{
it
(
'retrieves data by e-mail and sets up a webhook with the right url and id and body type'
,
function
(
done
)
{
api
.
person
.
email
(
'arnout@observe.it'
,
null
,
'http://requestb.in/1bxgb751'
,
'webhookTest'
,
'json'
,
done
);
});
it
(
'provides the proper casing'
);
});
describe
(
'#email with webhook url/id/bodyType/style'
,
function
()
{
it
(
'retrieves data by e-mail and sets up a webhook with the right url and id'
,
function
(
done
)
{
api
.
person
.
email
(
'arnout@observe.it'
,
null
,
'http://requestb.in/1bxgb751'
,
'webhookTest'
,
'json'
,
'dictionary'
,
done
);
});
it
(
'provides the proper casing'
);
});
describe
(
'#md5'
,
function
()
{
describe
(
'#md5'
,
function
()
{
var
md5
=
require
(
'crypto'
).
createHash
(
'md5'
)
var
md5
=
require
(
'crypto'
).
createHash
(
'md5'
)
...
...
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