Updated Steem Module for Node.JS

in nodejs •  8 years ago 

I was unhappy with the module that kept coming up when doing searches because it required tanspiling and didn't work right out of the box on a normal Node.JS installation.  I came across https://github.com/adcpm/steem and really liked how it was built but didn't like the fact that it didn't follow the standard callback pattern of callback(err, results).  I have changed up the code to follow the standard callback pattern and submitted a pull request to the original author.  In the meantime if you want to use my version you can find it here: https://github.com/KaptainKrayola/steem.

The difference is subtle yet important if you've been a node.js developer for a while and expect modules to follow the standard callback pattern.  If you're not sure what I mean, here's an example:

Original Version:

steem.getAccounts(['ned', 'dan'], function(result, err) {
   console.log(result, err);
});

My Updated Version:

steem.getAccounts(['ned', 'dan'], function(err, result) {
   console.log(err, result);
});


Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Update: the original author just merged my code into the repository.

Thank you @kaptainkrayola for the contribution! Pull requests are more than welcome! I'm the author of SteemJS repository i'm now working on the next version. I will keep you updated, if you have some suggests i'm available on Slack with "adcpm" username.

I hope the original creator accepts your pull request, that would be smoother.

At the bottom of the README it talks about the slack, but I need a certain email to register? Wtf?

I think that's the normal Steem Slack, not sure what email or anything it requires. Sorry I can't be more help there.

Awesome work @kaptainkrayola. I look forward to some of the other stuff I know you have in works.

Thanks! I think the next thing that I'll work on is the Steem Search Engine

Thanks! I thought of doing this, but ran out of time.