Navi, Get Hidden Data From Our Steemit Post

in #utopian-io6 years ago

Imagen1.png

Repository

https://github.com/Carlososuna11/Navi-Trail-Bot

What is Navi?

Navi is a bot (programmed with the wonderful language of JS) which helps the users of steemit with the dynamics of the trail. Sometimes, the beginning in steemit is difficult, not many vote your posts, and that discourages; This is where Navi comes in, where users who register can enjoy a vote trail with all other users, and without the worry and annoyance that "this is not my vote, my post" "I was just voted by 3 people" "I voted for all of you and very few vote for me".

Get Hidden Data From Our Steemit Post

Sometimes, we want to obtain data from a post, but the truth is very frustrating (we ended up dying in the attempt), today I bring a complement to the previous update, which you can see by clicking the following link.

Recapitulating the information of the previous chapter, he told us that we can access the data of who we vote and with how much voting power; Today, we will see that not only can we know who votes us, but we can also know who the beneficiaries are, how much we are going to win, whether or not we have a JSON in our post, etcetera.

Now, when we go to execute the command $ Votes + steemit post , the result is returned from the post content as a JSON object with the following properties:

imgagaga.png

From this result, you have access to everything associated with the selected post, including additional metadata which is a JSON string that must be decoded to use.

id - Unique identifier that is mostly an implementation detail (best to ignore). To uniquely identify content, it’s best to use author/permlink.
author - The author account name of the content.
permlink - Permanent link of the content, must be unique in the scope of the author.
category - The main category/tag this content belongs to.
parent_author - Parent author, in case this content is a comment (reply).
parent_permlink - Parent permanent link, this will be the same as category for posts and will contain the permlink of the content being replied to in the case of a comment.
title - Title of the content.
body - Body of the content.
json_metadata - JSON metadata that holds extra information about the content. Note: The format for this field is not guaranteed to be valid JSON.
last_update - The date and time of the last update to this content.
created - The date and time this content was created.
active - The last time this content was “touched” by voting or reply.
last_payout - Time of last payout.
depth - Used to track max nested depth.
children - Used to track the total number of children, grandchildren, etc. …
net_rshares - Reward is proportional to liniar rshares, this is the sum of all votes (positive and negative reward sum)
abs_rshares - This was used to track the total absolute weight of votes for the purpose of calculating cashout_time.
vote_rshares - Total positive rshares from all votes. Used to calculate delta weights. Needed to handle vote changing and removal.
children_abs_rshares - This was used to calculate cashout time of a discussion.
cashout_time - 7 days from the created date.
max_cashout_time - Unused.
total_vote_weight - The total weight of voting rewards, used to calculate pro-rata share of curation payouts.
reward_weight - Weight/percent of reward.
total_payout_value - Tracks the total payout this content has received over time, measured in the debt asset.
curator_payout_value - Tracks the curator payout this content has received over time, measured in the debt asset.
author_rewards - Tracks the author payout this content has received over time, measured in the debt asset.
net_votes- Net positive votes
root_comment - ID of the original content.
max_accepted_payout- Value of the maximum payout this content will receive.
percent_steem_dollars - The percent of Steem Dollars to key, unkept amounts will be received as STEEM Power.
allow_replies - Allows content to disable replies.
allow_votes - Allows content to receive votes.
allow_curation_rewards - Allows curators of this content receive rewards.
beneficiaries - The list of up to 8 beneficiary accounts for this content as well as the percentage of the author reward they will receive in STEEM Power.
url- The end of the url to this content.
root_title - Title of the original content (useful in replies).
pending_payout_value - Pending payout amount if 7 days has not yet elapsed.
total_pending_payout_value - Total pending payout amount if 7 days has not yet elapsed.
active_votes - The entire voting list array, including upvotes, downvotes, and unvotes; used to calculate net_votes.
replies - Unused.
author_reputation - Author’s reputation.
promoted - If post is promoted, how much has been spent on promotion.
body_length - Total content length.
reblogged_by - Unused.

This update is already available in the repository, where I also attach a documentation (this time in English, as requested) of the voter.js code.

Roadmap

High priority:

  • I just made the request for a steemit account which will be the official account of Navi, which I will use to comment on all the post voted by the bot-trail. Below I attach part of the code that I will use to make that function possible:
steem.broadcast.comment(wif, parentAuthor, parentPermlink, author, permlink, title, body, jsonMetadata, function(err, result) {
  console.log(err, result);
});

Medium priority:

  • Export this bot to a web page, so that all users use the same bot.
  • Vote randomly by rank.
  • Make an official bot logo.

How to contribute?

If you have any ideas, improve, or just help with the work of this bot, let me know through the comments of this post, or write me by discord (Anonym0us#7823).

GitHub Account

https://github.com/Carlososuna11

Sort:  

Thank you for your contribution. As suggested by Amos in the previous review still applicable for this contribution which can be improved. Few thoughts:

  • It's good that you add features to teh bot but try to add more features in a single contribution.
  • Try to add descriptive commit messages.
  • Try to use embed which is a Discord feature and will make the message looks good.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @codingdefined!

So far this week you've reviewed 7 contributions. Keep up the good work!

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://github.com/steemit/devportal-tutorials-js/tree/master/tutorials/05_get_post_details

Hello, I'm a human, I invite you to compare that code with mine, the related text is nothing more than variables definition duh! , please read that code, and then read mine

Your code

My Code

And therefore, this structured different but returns the same value, which with these defined variables, my readers can understand, thank you!