Credit @klye
Hey developers, here is the news: Now you can upvote, downvote, comment and tranfert using Steem.js!
Here the package:
https://github.com/adcpm/steem
https://www.npmjs.com/package/steem
Here the examples:
UpVote
/* @params username, password, author, permlink, weight */
steem.broadcast.upvote('fabien', 'sgs56sd84hbr51qpodg1', 'steemjs', 'permlink-of-the-post', 10000, function(err, result) {
console.log(err, result);
});
DownVote
/* @params username, password, author, permlink, weight */
steem.broadcast.downvote('fabien', 'sgs56sd84hbr51qpodg1', 'steemjs', 'permlink-of-the-post', 10000, function(err, result) {
console.log(err, result);
});
Post
/* @params username, password, parentAuthor, parentPermlink, author, permlink, title, body, jsonMetadata */
steem.broadcast.comment('fabien', 'sgs56sd84hbr51qpodg1',
'',
'steemjs',
'fabien',
'this-is-the-slug-of-my-article',
'This is the title',
'This is the body',
{tags: ['steemjs', 'steem']},
function(err, result) {
console.log(err, result);
});
Transfer
/* @params username, password, from, to, amount, memo */
steem.broadcast.transfer('fabien', 'sgs56sd84hbr51qpodg1', 'you', 'steemjs', '50.000 SBD', 'Donation', function(err, result) {
console.log(err, result);
});
Thank's to @heimindanger who helped for the methods and browser side support. You also want to contribute and get rewarded for that? Contact me on the rocket chat @fabien or channel #steemjs.
More will come, stay tuned.
PS : This is not my real password on examples ;)
Fabien