{"_id":"oexchange","_rev":"9-494c0f33caff91a9129df9cf92ae6df4","name":"oexchange","description":"Module that handles OExchange host discovery","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"oexchange","version":"0.1.0","description":"Module that handles OExchange host discovery","homepage":"https://github.com/bashofmann/node_oexchange","keywords":["oexchange"],"author":{"name":"Bastian Hofmann","email":"bashofmann@googlemail.com"},"contributors":[],"repository":{"type":"git","url":"git://github.com/bashofmann/node_oexchange.git"},"dependencies":{"xml2js":">= 0.1.11","request":">= 2.1.1"},"devDependencies":{},"main":"index","engines":{"node":">= 0.4.11"},"_npmJsonOpts":{"file":"/Users/bastian/.npm/oexchange/0.1.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"oexchange@0.1.0","_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"0934b86e0528b3ede5e1e119275b29dfe16cb7f3","tarball":"https://registry.npmjs.org/oexchange/-/oexchange-0.1.0.tgz","integrity":"sha512-o5FcivQ0rM6KJhSUiY8H/uKR+fHcpLhuxcu7zJzseQwL+IP7mOfL5qlq7pbd0xoIqem3KrYcQBAheziCtE82Sg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHfGo2ewxr/VSVWObREMwkI5FiAbOXAcr66GglZDrYRmAiBSI72i73BHdAE2gJgkMkgEu/Ve5kKpC+x17M3AeFdD/A=="}]},"maintainers":[{"name":"bashofmann","email":"bashofmann@googlemail.com"}]},"0.1.1":{"name":"oexchange","version":"0.1.1","description":"Module that handles OExchange host discovery","homepage":"https://github.com/bashofmann/node_oexchange","keywords":["oexchange"],"author":{"name":"Bastian Hofmann","email":"bashofmann@googlemail.com"},"contributors":[],"repository":{"type":"git","url":"git://github.com/bashofmann/node_oexchange.git"},"dependencies":{"xml2js":">= 0.1.11","request":">= 2.1.1"},"devDependencies":{},"main":"index","engines":{"node":">= 0.4.11"},"_npmJsonOpts":{"file":"/Users/bastian/.npm/oexchange/0.1.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"oexchange@0.1.1","_engineSupported":true,"_npmVersion":"1.0.27","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"f02115105fe71104beec93c9d11ff215dc6c5361","tarball":"https://registry.npmjs.org/oexchange/-/oexchange-0.1.1.tgz","integrity":"sha512-Ptgt7GJ3/PRjFhnTlouVQmrYhrGcH/ixQ9BBbOaCg6ueQkcJvQacury7TLbQuKD7eUsdZ/HM1y9viUDw+S6nfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXUdUNHKxL+SLNVz8bJapl0wvakFCFIKb4YXX671rOJAIhAOGuPIPtGEu/8anP+nFq3NlOMBe16v6mXyFulVR5nygg"}]},"maintainers":[{"name":"bashofmann","email":"bashofmann@googlemail.com"}]},"0.1.2":{"name":"oexchange","version":"0.1.2","description":"Module that handles OExchange host discovery","homepage":"https://github.com/bashofmann/node_oexchange","keywords":["oexchange"],"author":{"name":"Bastian Hofmann","email":"bashofmann@googlemail.com"},"contributors":[],"repository":{"type":"git","url":"git://github.com/bashofmann/node_oexchange.git"},"dependencies":{"xml2js":"0.1.11","request":"2.1.1"},"devDependencies":{},"main":"index","engines":{"node":">= 0.4.11"},"readme":"==============\nnode_oexchange\n==============\n\nA module for handling OExchange host discovery (see http://www.oexchange.org/).\n\nInstallation\n------------\n\n::\n\n npm install oexchange\n \nUsage\n-----\n\nFirst you have to require the oexchange package\n\n::\n\n  var oexchange = require('oexchange');\n  \nnode_oexchange exposes two methods:\n\n\"getSharingUrl\" which can be used to get a valid sharing URL based on a given hostname and sharing object. The sharing object can contain all fiels that are specified in the OExchange specification (see http://www.oexchange.org/spec/#offer-parameters)\n\n::\n\n var sharingObject = {\n     'url': 'http://www.example.com/foo',\n     'title': 'Example site'\n };    \n oexchange.getSharingUrl('www.researchgate.net', sharingObject, function(result) {\n\t console.log(result); // either the sharing url or \"false\"\n });\n \nand \"getSharingObject\" wich not only returns the sharing URL but also all other information that is specified in the OExchange XRD (see http://www.oexchange.org/spec/#discovery-targetxrd), so that you can build a linked sharing button for example\n\n::\n\n var sharingObject = {\n    'url': 'http://www.example.com/foo',\n    'title': 'Example site'\n };    \n oexchange.getSharingObject('www.researchgate.net', sharingObject, function(result) {\n\t console.log(result); // either the sharing object url or \"false\"\n\t // to render a the result sharing object you should use a templating language, e.g. Mustache.js (see https://github.com/janl/mustache.js/)\n\t var template = '<a href=\"{{sharingUrl}}\"><img src=\"{{icon32}}\" /></a>';\n\t var html = Mustache.to_html(template, sharingObject);\n });","_id":"oexchange@0.1.2","dist":{"shasum":"a6acb5df6d65cadbe3bd55630f6d79d936958840","tarball":"https://registry.npmjs.org/oexchange/-/oexchange-0.1.2.tgz","integrity":"sha512-1fPblcnw3xodcwC0smB6Ozb6O3noHPklqG966SUbe2KSjXZkmhsQ7Lz0wiKGoOcFWZBW2WhI9tAssnRTCy+XgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID3UO+1VS/KVc/IE60MQRSHniE4+J+kFZDzossKjKa24AiBDtZgo4cvbjqxbEsOY52E7ntgc+2MP8gV9hiUuEOzp/g=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"bashofmann","email":"bashofmann@googlemail.com"},"maintainers":[{"name":"bashofmann","email":"bashofmann@googlemail.com"}]}},"maintainers":[{"name":"bashofmann","email":"bashofmann@googlemail.com"}],"time":{"modified":"2022-06-22T19:20:44.373Z","created":"2011-10-02T11:46:14.939Z","0.1.0":"2011-10-02T11:46:16.323Z","0.1.1":"2011-10-03T11:58:59.222Z","0.1.2":"2012-09-26T22:20:44.250Z"},"author":{"name":"Bastian Hofmann","email":"bashofmann@googlemail.com"},"repository":{"type":"git","url":"git://github.com/bashofmann/node_oexchange.git"}}