STEEM.JS - NPM Package and some basic examples of it.

in steemit •  7 years ago 

"Every great developer you know got there by solving problems they were unqualified to solve until they actually did it."
-"Patrick McKenzie".
Quote from medium.com


What's up guys!. In my last post, I had a little talk about how to setup SteemConnect V2.

Today we are gonna see some examples of the main library of STEEM aka Steem.js.

It is really simple to use, as we will see below. Basically after install it through NPM, the library itself provides us with everything we need: API Methods.

So.. Let's start!


First things first. Let's install the STEEM package.
npm install --save steem

With that ready, let's get into the action. As always, i will keep it short. So let's see some examples of this package.

Get Accounts





Get Trending Posts





Get Content







So yeah.
Basically the usage is the same for all the methods the library offers to us.
I'm gonna leave a link to their main Github Repo, in which you can check all the methods and some more basic info.

This is all for now guys. Hope this post helps you all a bit.
See you on the next one, and remember to stay cool.
@selected

The thumbnail of the post, was created by me. The gifs of this post, does not belongs to me.
Thanks you!
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:  

For every API method a variant with the suffix Async exists, returning a Promise instead of expecting a callback function. This helps to write cleaner code à la

const content = await steem.api.getContentAsync(author, permlink);

Thanks you, and yeah totally true. Well was some fast examples, but yeah that's right, and i should apply it to myself too.

Thanks!

In your tutorial is really easy and helpful for us . Thanks for sharing this post sir @selected.

Sir @selected,

Great another tutorial. Many types of websites and apps are waiting for this sir. Go on. Thanks for your kind sharing sir.

Thanks sir : )

welcome

Dear @selected sir,Thank you very much for this awesome tutorial.. I will surely follow this steps.. You are really doing a great job sir.. And the quote is realistic sir.. waiting for more tutorial like this sir!! love u a lot.

Thanks you sir. Love u a lot too! :)

You are most welcome sir.

Thanks for the upvote @gogreenbuddy

Have a good day mate ^^

You got a 36.27% upvote from @upmewhale courtesy of @selected!

Earn 100% earning payout by delegating SP to @upmewhale. Visit http://www.upmewhale.com for details!

Hello @promobot i submitted a request for vote hours ago, can you please check it? Thanks.