Previously on PHP Client of Utopian API, you see how beautiful the PHP is when it comes to wrap utopian APIs. And I am feeling excited to introduce a sub-class Moderators that extends the Utopian
base API class.
PHP Client of Utopian API
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.0Roadmap
The next release will be adding more unit tests and more about moderators in terms of rewards, payout etc.How to contribute?
Github: https://github.com/DoctorLai/utopian-api-php-client- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
This Commits
Reload the Data
This will re-fetch the data from Utopian API.
$moderators->Reload();
Raw Data
$moderators->GetRawData();
Get a list of Moderators
print_r($moderators->GetList());
Get Total Number of Moderators
echo "there are " . $moderators->GetTotal() . " moderators.";
Find a Moderator
$justyy = $moderators->GetModerator('justyy');
print_r($justyy);
Get Total Paid Rewards
echo "Total Paid Rewards: " . $moderators->GetTotalPaidRewards();
Get Total of should_receive_rewards
echo "Should Receive Total: " . $moderators->GetShouldReceiveRewards();
Get Total Moderated Count
echo "Total Moderated Count: " . $moderators->GetTotalModerated();
Get Total Sum of total_paid_rewards_steem
echo "Steem: " . $moderators->GetTotalPaidRewardsSteem();
Get a list of Super Moderators
foreach ($moderators->GetListOfSuperModerators() as $acc) {
echo "Boss: " . $acc;
}
Get a list of Apprentices
foreach ($moderators->GetListOfApprentice() as $acc) {
echo "Student: " . $acc;
}
Get a list of Banned Moderators
foreach ($moderators->GetListOfBannedModerators() as $acc) {
echo "Banned: " . $acc;
}
Get a list of Active Moderators
foreach ($moderators->GetListOfActiveModerators() as $acc) {
echo "Active: " . $acc;
}
Posted on Utopian.io - Rewarding Open Source Contributors
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @wehmoen, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Very interesting. Nice work!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
our images are soooooo similar!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @justyy I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit