Steemsnippets v1.1 : Posting, commenting and voting using steemjs

in utopian-io •  7 years ago  (edited)

This is the second update for steemsnippets, an open source collection of code snippets on steem-related libraries. You can find more info in it here.

Work done :

Added snippets :

Post (steemjs)

https://github.com/drov0/steemsnippets/blob/master/steemjs/post/post.js

Function header :

function post(username, password, main_tag, title, body, jsonMetadata, permlink)

Note that jsonMetadata and permlink are optional and that you can easily change this function to use a posting key instead of a password.

Comment (steemjs)

https://github.com/drov0/steemsnippets/blob/master/steemjs/comment/comment.js

function header :

function comment(username, password, author, permlink, text, jsonMetadata)

Note that jsonMetadata is optional and that you can easily change this function to use a posting key instead of a password.

Vote (steemjs)

https://github.com/drov0/steemsnippets/blob/master/steemjs/vote/vote.js

function header :

function vote(username, password, author, permlink, weight)

you also can easily change this function to use a posting key instead of a password.

I chose to use a password instead of a key all the time to it's easier for new programmers to use it but in a production environment you should always use the authentification with the smallest permission needed.

Now that I've covered a few basic function for steemjs, I will probably cover these same functions on other libs and then move onto some new functionalities.

commits :

image.png

github repos : https://github.com/drov0/steemsnippets

Proof of work can be found in the readme.



Posted on Utopian.io - Rewarding Open Source Contributors

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:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

  ·  7 years ago (edited)

It's planned ;)

Black magic for me😀 Pozdrawiam

What is the difference between your snippets and sc2-sdk?

sc2-sdk is a library for steemconnectv2. My snippets are small pieces of code for a specific purpose (post, vote comment etc) so you can just copy paste them and have working applications faster.

Hey @howo I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x