elsewhere
Version:
A node project that aims to replicate the functionality of the Google Social Graph API
49 lines (40 loc) • 1.78 kB
HTML
<p>Elsewhere requires <a href='http://nodejs.org'>Node.js</a> to be installed first.</p>
<p>Clone the repo and start the server by running these commands in the terminal:</p>
<pre><code>git clone git@github.com:dharmafly/elsewhere.git
cd elsewhere
npm install
bin/elsewhere</code></pre>
<p>Now head to <a href='http://localhost:8888'><code>localhost:8888</code></a>. You can test the API on this page by entering a URL into the ‘url’ box and clicking ‘Parse’. This will render the graph as a list on the page, complete with the names of each page of the graph and their respective favicons.</p>
<p>You can also test the API by simply appending the target URL to your address bar like so:</p>
<pre><code>http://localhost:8888/?url=chrisnewtn.com</code></pre>
<p>This will return a JSON version of the graph e.g.</p>
<pre><code>{
results: [
{
url: "http://chrisnewtn.com",
title: "Chris Newton",
favicon: "http://chrisnewtn.com/favicon.ico",
outboundLinks: {
verified: [ ... ],
unverified: [ ]
},
inboundCount: {
verified: 4,
unverified: 0
},
verified: true,
urlAliases: [
"http://t.co/vV5BWNxil2"
]
}
],
warnings: [
"http error: 404 (Not Found) - http://twitter.com/statuses/user_timeline/chrisnewtn.rss"
],
query: "http://chrisnewtn.com",
created: "2012-10-12T16:30:57.270Z",
crawled: 9,
verified: 9
}</code></pre>
<p>The initial crawl will take a while, as each page needs to be visited, checked and cached. Once cached though, it should be pretty snappy.</p>
<p><strong><a href='reference/'>See the API Reference</a></strong> for more details.</p>