| ... | ... | @@ -9,7 +9,7 @@ Example: |
|
|
|
var Ostatus = require('ostatus');
|
|
|
|
Ostatus.webfinger.lookup("acct:eschnou@identi.ca", function(err, result) {
|
|
|
|
console.log(util.inspect(result));
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
Will output:
|
|
|
|
|
| ... | ... | @@ -28,4 +28,34 @@ Will output: |
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
## hostXrd(host, callback)
|
|
|
|
|
|
|
|
Render the domain's host-meta XRD. In practice, it just render [[this template | http://github.com/eschnou/node-ostatus/blob/master/lib/ostatus/templates/hostXrd.xml.mu]] and replace the {{host}} variable with the argument.
|
|
|
|
|
|
|
|
_this could definitively be improved_
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
Ostatus.webfinger.hostXrd("example.com", function(err, result) {
|
|
|
|
console.log(result);
|
|
|
|
});
|
|
|
|
|
|
|
|
## userXrd(subject, alias, links, callback)
|
|
|
|
|
|
|
|
Render the user's XRD with the provided Subject, Alias and Links. In practice, it just render [[this template | http://github.com/eschnou/node-ostatus/blob/master/lib/ostatus/templates/userXrd.xml.mu]].
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
var links = [
|
|
|
|
{
|
|
|
|
rel: "http://microformats.org/profile/hcard",
|
|
|
|
href: "http://example.com/hcard/user"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
rel: "salmon",
|
|
|
|
href: "http://example.com/salmon/user"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
Ostatus.webfinger.userXrd("acct:user@example.com", "http://example.com/user", links, function(err, result) {
|
|
|
|
console.log(result);
|
|
|
|
}); |