dev-identify
v3.1.1
Published
Dev Identify fetches the name and profile picture associated with an email address
Downloads
5
Readme
Dev Identify
Dev Identify fetches the name and profile picture associated with an email address. An API is also available at devidentify.com.
Installation
npm i dev-identify
Usage
var devIdentify = require("dev-identify")
var email = "[email protected]"
devIdentify(email)
.then(function(result) {
console.log(result)
})
Interested in hosting your own API? You can read about it here or directly download our complete API package here.
Sources
Currently, Dev Identify fetches data from:
- Gravatar
- Google Plus (Requires extra setup)
We're working on adding more sources soon.
Customizing Dev Identify
Dev Identify contains a utility class which you can use to create any feature you can dream of or even change the default source ordering logic.
var dev = new devIdentify.utility(optionalGooglePlusKey)
dev.identify(email) //Identifies email
dev.checkGravatar(email) //Only checks Gravatar.
dev.checkGoogle(email) //Only checks Google.
dev.checkGooglePlus(googleId) //Only checks Google Plus.
dev.validateEmail(email) //Validates email address format (BOOL)
All the dev.check functions return an associative array with a success boolean. If the request was successful, they will also contain name, profile_picture and source key/values.
The dev.identify() function returns the same format as the dev.check functions except if the request was unsuccessful, it will also contain an error key and value.