The project PHP Client of Utopian API wraps the Utopian APIs and yesterday, the sub class Moderators has been added to the project, see Adding Moderator Class to PHP Client of Utopian API. Today, Sponsors have been added to the project so it is now very convenient to know, with a few lines of code, for example, the list of sponsors that are also witnesses or who opt-out receiving steem payout.
What is the project about?
The project is to wrap the public utopian APIs in PHP Class. I have seen @emrebeyler 's contribution on Python client, so I think it is a good idea to provide a PHP implementation.
Technology Stack
PHP 7.0
Roadmap
The next release will be adding more unit tests and more other advance API wrappers such as statistics helpers.
How to contribute?
Github: https://github.com/DoctorLai/utopian-api-php-client
This will re-fetch the data from Utopian API.
$sponsors->Reload();
$sponsors->GetRawData();
print_r($sponsors->GetList());
echo "there are " . $sponsors->GetTotal() . " sponsors.";
$ned = $sponsors->GetSponsor('ned');
print_r($ned);
echo "Total Paid Rewards: " . $sponsors->GetTotalPaidRewards();
echo "Should Receive Total: " . $sponsors->GetShouldReceiveRewards();
echo "Steem: " . $sponsors->GetTotalPaidRewardsSteem();
echo "Total Vesting by all sponsors: " . $sponsors->GetTotalVesting();
foreach ($sponsors->GetListOfWitness() as $acc) {
echo "Witness: " . $acc;
}
echo "Total Paid Rewards Steem: " . $sponsors->GetTotalPaidRewardsSteem();
foreach ($sponsors->GetListOfOptedOutSponsors() as $acc) {
echo "Opted_out: " . $acc;
}