Steemit API Voting Tutorial
Hey Steemians In this post i going to assume that you have a basic understanding of Javascript and you are here to get familiar with how the Steem API works and what you can do with it.
You can either use steem API from your Machine or Online.In this tutorial i am going to highlight the online version because it might be easier for people to follow that.
npm install steem --save
<script src="https://cdn.steemjs.com/lib/latest/steem.min.js"></script>
Now you should have everything configured and you should be able to use the API calls.
We will use the broadcast vote function with the following parameters.
steem.broadcastVote(privatepostingkey,usernameofvoter,'Usernamevotee','permanent link of the post',vote Percentage,callbackfunction())
Don't worry if you are confused by Permanent link.Here is a screenshot highlighting what it is.
Finally here is an example to help you out.
var username = 'ajkapss';
var privPostingWif ='yourprivatepostingkey'
steem.broadcast.vote(privPostingWif, username, 'ajkapss', 'c5umhlzr', 10000, function(err, result) {
console.log(err, result);
});
This is how your code should look like if you are using JsFiddle.
Leave Steemit API Voting Tutorial to:
Read more #steemtutorial posts
Best Posts From ajkapss
We have not curated any of ajkapss's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From ajkapss
- MIT Race Car Project Autopilot Test
- SteemAPI Tutorial How to get User Information ?
- MIT Self Driving Race Car Preliminary Test Net
- SteemAPI Tutorial Getting the latest post of a user?
- Steemit API Voting Tutorial
- MIT Self Driving Race Car Ultra Sonic Sensor Test
- MIT Race Car Project Wireless Controller Code
- MIT Race Car Motor and Steering Test
- MIT Project Race Day Self Driving Car
- Ultra-sonic Sensor Unit Testing