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
2ddd53de
Commit
2ddd53de
authored
May 15, 2017
by
Tristan Rubadeau
Committed by
Adri Van Houdt
May 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for new `macromeasures` opt (#24)
* macromeasures arg in Person endpoint * macromeasures test * moved macromeasures section below webhooks in the README
parent
8e2faeee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
README.md
README.md
+9
-0
person.js
endpoints/person.js
+2
-2
index.js
index.js
+4
-0
person.test.js
test/person.test.js
+8
-0
No files found.
README.md
View file @
2ddd53de
...
...
@@ -151,6 +151,7 @@ fullcontact.person.email('foo@bar.com', function (err, data) {
..
});
```
All
`Person`
API's accept the
`queue`
param.
```
js
...
...
@@ -168,6 +169,14 @@ fullcontact.person.email('foo@bar.com', null, 'https://mycallbackurl.com', 'webh
});
```
The
`Person`
API's now accept the
`macromeasures`
param as a boolean
```
js
fullcontact
.
person
.
email
(
'opensource@observe.it'
,
null
,
null
,
null
,
null
,
null
,
true
,
function
(
err
,
data
)
{
..
});
```
#### person.md5(address, [queue], fn);
Retrieves contact information by e-mail address but transforms the email to an
...
...
endpoints/person.js
View file @
2ddd53de
...
...
@@ -18,14 +18,14 @@ function Person(api) {
* Retrieve contact information by e-mail.
*
* ```js
* fullcontact.person.email('opensource@observe.it', [queue], [webhookUrl], [webhookId], [webhookBody], [style], fn);
* fullcontact.person.email('opensource@observe.it', [queue], [webhookUrl], [webhookId], [webhookBody], [style],
[macromeasures],
fn);
* ```
*
* @returns {Person}
* @api public
*/
Person
.
prototype
.
email
=
function
email
()
{
var
args
=
this
.
api
.
args
(
arguments
,
'queue'
,
'webhookUrl'
,
'webhookId'
,
'webhookBody'
,
'style'
);
var
args
=
this
.
api
.
args
(
arguments
,
'queue'
,
'webhookUrl'
,
'webhookId'
,
'webhookBody'
,
'style'
,
'macromeasures'
);
this
.
send
({
email
:
args
.
value
},
args
);
return
this
;
...
...
index.js
View file @
2ddd53de
...
...
@@ -70,6 +70,10 @@ FullContact.prototype.process = function req(api, query, args) {
query
[
'style'
]
=
args
[
'style'
];
}
if
(
args
[
'macromeasures'
])
{
query
[
'macromeasures'
]
=
args
[
'macromeasures'
]
}
//
// The packet that is send to the server or queued when we are in queuing
// mode.
...
...
test/person.test.js
View file @
2ddd53de
...
...
@@ -56,6 +56,14 @@ describe('FullContact.Person', function () {
it
(
'provides the proper casing'
);
});
describe
(
'#email with webhook url/id/bodyType/style/macromeasures'
,
function
()
{
it
(
'retrieves data by e-mail with macromeasures enabled'
,
function
(
done
)
{
api
.
person
.
email
(
'arnout@observe.it'
,
null
,
null
,
null
,
null
,
null
,
true
,
done
);
});
it
(
'provides the proper casing'
);
});
describe
(
'#md5'
,
function
()
{
var
md5
=
require
(
'crypto'
).
createHash
(
'md5'
)
.
update
(
'arnout@observe.it'
)
...
...
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