Documenting Reputation and Database API Definitions

in utopian-io •  10 months ago 

Repository

https://github.com/inertia186/devportal

Site

https://inertia186.github.io/devportal

Issue

  • For reputation_api, this is a new API, so I generated it from the rake commands included in the devportal project.
  • For database_api, some of the method notes were only stubs. But more importantly, there were "order" arguments that were not defined at all, which required digging in c++ to determine.
  • These changes fill in a lot of those blanks and synchronizes methods already documented in condenser_api to database_api where appropriate.

I've also included and will continue to submit pull requests for Steemit, Inc. in the event they want to sync up to the latest information I have available. This is just a courtesy on my part and have no bearing on my fork.

https://github.com/steemit/devportal/pull/405
https://github.com/steemit/devportal/pull/404

Just to clarify, since I've transitioned to my own fork, I'll likely stop including PR information in my blog entries about my fork to reduce confusion, but I plan to keep submitting them to Steemit, Inc.


Details on reputation_api

There's really not much to this API. It's really intended for API deploys that have hivemind. I think I'll add an issue on how this API enables you to run more complete full node with fewer steemd plugins, but that's a different document. All I'm doing here is capturing the facts about the new method and its origin.

Details on database_api

Here, I filled in details that were missing from database_api definitions. Some of them were outlined in condenser_api and copied over to database_api and then adjusted to the AppBase parameters. Some of them are unique to database_api. They all have curl examples that pass verification as of steem_rev: a99266.

$ rake test:curl[database_api]
node: https://api.steemit.com; blockchain_version: 0.20.6; steem_rev: a99266; fc_rev: a99266
Testing database_api.find_account_recovery_requests ... √
Testing database_api.find_accounts ... √
Testing database_api.find_change_recovery_account_requests ... √
Testing database_api.find_comments ... √
Testing database_api.find_decline_voting_rights_requests ... √
Testing database_api.find_escrows ... √
Testing database_api.find_limit_orders ... √
Testing database_api.find_owner_histories ... √
Testing database_api.find_savings_withdrawals ... √
Testing database_api.find_sbd_conversion_requests ... √
Testing database_api.find_vesting_delegation_expirations ... √
Testing database_api.find_vesting_delegations ... √
Testing database_api.find_votes ... √
Testing database_api.find_withdraw_vesting_routes ... √
Testing database_api.find_witnesses ... √
Testing database_api.get_active_witnesses ... √
Testing database_api.get_config ... √
Testing database_api.get_current_price_feed ... √
Testing database_api.get_dynamic_global_properties ... √
Testing database_api.get_feed_history ... √
Testing database_api.get_hardfork_properties ... √
Testing database_api.get_order_book ... √√
Testing database_api.get_potential_signatures ... √
Testing database_api.get_required_signatures ... √
Testing database_api.get_reward_funds ... √
Testing database_api.get_transaction_hex ... √
Testing database_api.get_version ... √
Testing database_api.get_witness_schedule ... √
Testing database_api.list_account_recovery_requests ... √
Testing database_api.list_accounts ... √
Testing database_api.list_change_recovery_account_requests ... √
Testing database_api.list_comments ... √
Testing database_api.list_decline_voting_rights_requests ... √
Testing database_api.list_escrows ... √
Testing database_api.list_limit_orders ... √
Testing database_api.list_owner_histories ... √
Testing database_api.list_savings_withdrawals ... √
Testing database_api.list_sbd_conversion_requests ... √
Testing database_api.list_vesting_delegation_expirations ... √
Testing database_api.list_vesting_delegations ... √
Testing database_api.list_votes ... √
Testing database_api.list_withdraw_vesting_routes ... √
Testing database_api.list_witness_votes ... √
Testing database_api.list_witnesses ... √
Testing database_api.verify_account_authority ... √
Testing database_api.verify_authority ... √
Testing database_api.verify_signatures ... √

Notes

These changes are now live:

https://inertia186.github.io/devportal/apidefinitions/#apidefinitions-reputation-api
https://inertia186.github.io/devportal/apidefinitions/#apidefinitions-database-api

GitHub Account

https://github.com/inertia186

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:  

Hello @inertia,

You have become quite an active contributor to the Steem documentation. That is going to be valuable since you fill the missing parts. It appears that Steemit didn't give a higher priority to the documentation. That is a shame since you add quite a lot of missing pieces.

There are, however, a few things that I would like to ask or point out.

  1. https://github.com/steemit/devportal/pull/405/files#diff-52c976fc38ed2b4e3b1192f8a8e24cffR95
    • You change the remote name, which I guess is a result of you having your fork. Though, is there a reason to push the change to the upstream?
  2. It looks like you did not separate commits in the PRs enough. You included commits for database_api in the PR for reputation_api.

I can see some added value because you also added examples of expected responses. Hopefully, Steemit team will have some time to see your additions so that you don't need to run another devportal. Developers may not be well aware of that and thus will not see the new updates.

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? Chat with us on Discord.
[utopian-moderator]

Though, is there a reason to push the change to the upstream?

No, it's an oversight on my part. Although this gives me an idea to parameterize the remote and default it back to origin.

You included commits for database_api in the PR for reputation_api.

It's due to commits like:

Maybe it's my lack of experience of forking repos, but I'm not sure how I could change the reputation related files without requiring those prior commits.

you wrote two same examples in there

Good catch.

Thank you for your review, @espoem! Keep up the good work!

You're doing vital work! Thanks!! 🙏

36268DCB-22A3-4C93-B6FB-734EB9772F00.jpeg

Hi @inertia!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 6.525 which ranks you at #152 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 391 contributions, your post is ranked at #33.

Evaluation of your UA score:
  • You've built up a nice network.
  • The readers appreciate your great work!
  • Good user engagement!

Feel free to join our @steem-ua Discord server

Hi, @inertia!

You just got a 1.88% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

This post has been included in today's SOS Daily News - a digest of all you need to know about the State of Steem.



Hey, @inertia!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!