API/Tool Update: Steem Mutual Witness Report

API/Tool Update: Steem Mutual Witness Report

A while ago, I implemented this tool: https://steemyy.com/mutual-witness/ which allows you to see who you vote, who also vote you back, and who hasn’t.

The API was based on SteemSQL but fortunately, this can be easily replaced using SteemJS.

The following SteemJS search the proxy chain:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
async function getWitnessProxy(id) {
return new Promise((resolve, reject) => {
steem.api.getAccounts([id], async function(err, result) {
if (err || (!result) || (!result[0]) || (result.length === 0)) {
resolve("");
}
if (result && result[0] && result[0].proxy) {
const data = await getWitnessProxy(result[0].proxy);
resolve(result[0].proxy + " " + data);
}
resolve("");
});
});
}

The API: https://steemyy.com/api/steemit/witness_voters/?cached&id=STEEM_ID will return the following JSON object.

1
2
3
4
5
6
{
votes: [], // who you vote
both: [], // and who have voted you back
not: [], // and who haven't voted you back
proxy_chain: [] // the proxy chain separated by space.
}

You can invoke the API via GET or POST by passing the parameter id.

The GUI tool that calls the API looks something like this: https://steemyy.com/mutual-witness/?id=justyy

image.png

image.png


I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘API/Tool Update: Steem Mutual Witness Report’

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×