webfinger.js
A webfinger client that runs both in the browser and in node.js.
Features
Initialize
node.js
In node.js you should first require the module:
var WebFinger = require('webfinger.js');
Browser
When you include the src/webfinger.js
script, a WebFinger
object will be exposed.
Use
var webfinger = new WebFinger({
webfist_fallback: true,
tls_only: true,
uri_fallback: false,
request_timeout: 10000,
});
webfinger.lookup('nick@silverbucket.net', function (err, p) {
if (err) {
console.log('error: ', err.message);
} else {
console.log(p);
}
});
webfinger.lookupLink('nick@silverbucket.net', 'remotestorage' function (err, p) {
if (err) {
console.log('error: ', err.message);
} else {
console.log(p);
}
});
Demo
See a working demo here
License
webfinger.js
is released under the LGPL. See LICENSE