Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silverbucket/webfinger.js
library for easily querying a useraddress for its webfinger record
https://github.com/silverbucket/webfinger.js
Last synced: 13 days ago
JSON representation
library for easily querying a useraddress for its webfinger record
- Host: GitHub
- URL: https://github.com/silverbucket/webfinger.js
- Owner: silverbucket
- License: lgpl-3.0
- Created: 2012-11-17T18:36:07.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T19:21:54.000Z (about 2 months ago)
- Last Synced: 2024-10-12T17:30:41.001Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 529 KB
- Stars: 51
- Watchers: 5
- Forks: 11
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webfinger.js
A WebFinger client that runs both in the browser and in node.js.
[![Build Status](http://img.shields.io/travis/silverbucket/webfinger.js.svg?style=flat)](http://travis-ci.org/silverbucket/webfinger.js)
[![license](https://img.shields.io/npm/l/webfinger.js.svg?style=flat)](https://npmjs.org/package/webfinger.js)
[![downloads](http://img.shields.io/npm/dm/webfinger.js.svg?style=flat)](https://npmjs.org/package/webfinger.js)
[![release](http://img.shields.io/github/release/silverbucket/webfinger.js.svg?style=flat)](https://github.com/silverbucket/webfinger.js/releases)## Features
* defaults to TLS only
* optional URI fallback (for older services which use `host-meta` or `host-meta.json` URI endpoints)
* optional support for [WebFist](http://webfist.org)
## Initialize
### node.js
In node.js you should first require the module:```javascript
var WebFinger = require('webfinger.js');
```### Browser
When you include the `src/webfinger.js` script, a `WebFinger` object will be exposed.## Use
```javascript
var webfinger = new WebFinger({
webfist_fallback: true, // defaults to false
tls_only: true, // defaults to true
uri_fallback: false, // defaults to false
request_timeout: 10000, // defaults to 10000
});webfinger.lookup('[email protected]', function (err, p) {
if (err) {
console.log('error: ', err.message);
} else {
console.log(p);
}
});// example output:
// {
// idx: {
// properties: {
// name: "Nick Jennings"
// },
// links: {
// avatar: [{ href: '' }],
// blog: [{ href: '' }],
// vcard: [href: '