Comparing version 1.0.9 to 1.0.10
23
index.js
@@ -197,2 +197,25 @@ var CryptoJS = require('crypto-js') | ||
}, | ||
getTrendingDiscussions: (author, link, cb) => { | ||
if (!author && !link) | ||
fetch(avalon.randomNode()+'/trending', { | ||
method: 'get', | ||
headers: { | ||
'Accept': 'application/json, text/plain, */*', | ||
'Content-Type': 'application/json' | ||
} | ||
}).then(res => res.json()).then(function(res) { | ||
cb(null, res) | ||
}) | ||
else | ||
fetch(avalon.randomNode()+'/trending/'+author+'/'+link, { | ||
method: 'get', | ||
headers: { | ||
'Accept': 'application/json, text/plain, */*', | ||
'Content-Type': 'application/json' | ||
} | ||
}).then(res => res.json()).then(function(res) { | ||
cb(null, res) | ||
}) | ||
}, | ||
getFeedDiscussions: (username, author, link, cb) => { | ||
@@ -199,0 +222,0 @@ if (!author && !link) |
{ | ||
"name": "javalon", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "javascript api for the avalon blockchain", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
19967
460
21