Date: 07/21/2022 - Upvotes : 460 - Words : 361
Introducing PHP HiveEngine Tools, your PHP companion to work with HiveEngine API
As you know, my @superhive project is coded with PHP. I had a problem with the wallet page, I needed to interact with HiveEngine API, but no PHP library existed.
That's why I've started to develop a PHP lib for that : php-he-tools !
What is it?
PHP HiveEngine Tools is a collection of methods made to interact with HiveEngine API.
Of course, this lib is released under MIT license, and it's fully open-source. You can find it on the official Github repo.
Mainly inspired by @dragosroua work (for his php-hive-tools library), I want to create methods to use HiveEngine API easily, without compromise.
How to use it?
If you have a PHP project which need this, just install this lib with Composer :
composer require fkosmala/php-he-tools
Next, just include the Composer's autoload in your PHP file and call the HiveEngine API :
require __DIR__ . '/vendor/autoload.php'; use FKosmala\PHPHeTools\HeApi as HeApi;
You can create a configuration array if you want to change settings :
$config = [ "debug" => false, 'throw_exception' => false, "heNode" => "api.hive-engine.com/rpc" ];
Last step, initiate the lib :
$api = new HeApi($config);
Mission successfully completed! You can use all the methods of this lib to your project! If you need a list, you can check the methods.md file.
If you need a small file to test, there is an example file in the
example/ folder of the repo
This library is in development state and there are only few methods right now, so I will create methods over time. If you need to add something into this lib, you have three choices :
- Ask me in comments
- Fork the php-he-tools repo, add your feature or methods, and make a pull request
- Add a ticket into the Issues page of the repo.
Have a nice day!
|Check my HIVE projects :|
|SuperHive||HiveLive||Hive Multi Staker|
|Build your own HIVE blog||Streamer's donation app||HiveEngine tokens app|