PHP Steem Tools - An Open Source Library For The Steem Blockchain (Updated Method for this tool)

2년 전

PHP Steem Tools - An Open Source Library For The Steem Blockchain (Updated Method for this tool)

Repository

https://github.com/dragosroua/php-steem-tools

What is the project about?

I was thinking of developing a PHP library for steem to use for a personal project of mine but then decided to check if something of such already exist. Fortunately, i found PHP-Steem Tool. This tool is an open source PHP library built by @dragosroua and is currently used as a tool for building steem.supply

Checkout his post for more info

According to the project owner, PHP Steem Tools wants to be a wrapper on top of a few APIs, including, but not limited to the Steem blockchain API.

Currently, it is packaged as a composer module and it has the following features:

  • alternative transport: cURL / websocket
  • get user JSON data
  • get current prices for Steem / SBD from coinmarketcap.com
  • converts vests to Steem Power
  • access the following endpoints:
    -- get_discussions_by_author_before_date,
    -- get_replies_by_last_update,
    -- get_current_median_history_price
    -- get_content
    -- get_content_replies
    -- get_discussions_by_comments
    -- get_account_votes
    -- get_account_history
    -- get_followers
    -- lookup_accounts
    -- get_accounts
    -- get_api_by_name
    -- get_dynamic_global_properties

Update

While making use of this tool, i noticed over 80% of steemjs api methods are not included and this is quiet understandable because according to the project owner

I decided to open source parts of the code I used when I created steem.supply, namely the formalizable parts, in an Open Source library called PHP Steem Tools.

Methods available in this tool were methods only used by the project owner in creating steem.supply. So i decided to update this tool and making it a more complete library by adding all available API Methods on api.steemjs.com

How i implement this?

All API methods were from api.steemjs.com

// Contributions by @profchydon
+   // Getting this tool up to date with all available methods on api.steemjs documentation
+
+   public function setSubscribeCallback ($params)
+   {
+           $result = $this->SteemLayer->call('set_subscribe_callback', $params);
+           return $result;
+   }
+
+   public function setPendingTransactionCallback ($params)
+   {
+           $result = $this->SteemLayer->call('set_pending_transaction_callback', $params);
+           return $result;
+   }
+
+   public function setBlockAppliedCallback ($params)
+   {
+           $result = $this->SteemLayer->call('set_block_applied_callback', $params);
+           return $result;
+   }
+
+   public function cancelAllSubscriptions ($params)
+   {
+           $result = $this->SteemLayer->call('cancel_all_subscriptions', $params);
+           return $result;
+   }
+

Merged Pull Request

Pull Request 1

Pull request 2

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!
STEEMKR.COM IS SPONSORED BY
ADVERTISEMENT
Sort Order:  trending

Thank you for your contribution. A great thing I liked about this contribution is that you are not reinventing the wheel and fixing something which is already available.

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]

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

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

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

Vote for Utopian Witness!

Congratulations @profchydon! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard!


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!