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.
Github: PHP Client of Utopian API
Reload the Data (Moderator)
This will re-fetch the data from Utopian API.
Raw Data
1
| $moderators->GetRawData(); |
$moderators->GetRawData();
Get a list of Moderators
1
| print_r($moderators->GetList()); |
print_r($moderators->GetList());
Get Total Number of Moderators
1
| echo "there are " . $moderators->GetTotal() . " moderators."; |
echo "there are " . $moderators->GetTotal() . " moderators.";
Find a Moderator
1
2
| $justyy = $moderators->GetModerator('justyy');
print_r($justyy); |
$justyy = $moderators->GetModerator('justyy');
print_r($justyy);
Get Total Paid Rewards
1
| echo "Total Paid Rewards: " . $moderators->GetTotalPaidRewards(); |
echo "Total Paid Rewards: " . $moderators->GetTotalPaidRewards();
Get Total of should_receive_rewards
1
| echo "Should Receive Total: " . $moderators->GetShouldReceiveRewards(); |
echo "Should Receive Total: " . $moderators->GetShouldReceiveRewards();
Get Total Moderated Count
1
| echo "Total Moderated Count: " . $moderators->GetTotalModerated(); |
echo "Total Moderated Count: " . $moderators->GetTotalModerated();
Get Total Sum of total_paid_rewards_steem
1
| echo "Steem: " . $moderators->GetTotalPaidRewardsSteem(); |
echo "Steem: " . $moderators->GetTotalPaidRewardsSteem();
Get a list of Super Moderators
1
2
3
| foreach ($moderators->GetListOfSuperModerators() as $acc) {
echo "Boss: " . $acc;
} |
foreach ($moderators->GetListOfSuperModerators() as $acc) {
echo "Boss: " . $acc;
}
Get a list of Apprentices
1
2
3
| foreach ($moderators->GetListOfApprentice() as $acc) {
echo "Student: " . $acc;
} |
foreach ($moderators->GetListOfApprentice() as $acc) {
echo "Student: " . $acc;
}
Get a list of Banned Moderators
1
2
3
| foreach ($moderators->GetListOfBannedModerators() as $acc) {
echo "Banned: " . $acc;
} |
foreach ($moderators->GetListOfBannedModerators() as $acc) {
echo "Banned: " . $acc;
}
Get a list of Active Moderators
1
2
3
| foreach ($moderators->GetListOfActiveModerators() as $acc) {
echo "Active: " . $acc;
} |
foreach ($moderators->GetListOfActiveModerators() as $acc) {
echo "Active: " . $acc;
}
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 😀
Unit Tests
The unit tests framework is phpunit and you can run tests via command phpunit.
–EOF (The Ultimate Computing & Technology Blog) —
GD Star Rating
loading...
447 words
Last Post:
PHP Client of Utopian API Next Post:
Adding Sponsors Class to PHP Client of Utopian API