Bug Fixes
With PR#2, I updated the readme with install and test commands. This will help other who want to use or develop for the client.
I fixed moderator class by checking if the property 'total_paid_rewards' exists and it also seems that GetCategory() cannot have no arguments, so I gave it one with some clever little code.
With PR#3, I fixed a serious inverted parameters of the CallAPI function and corrected the GET implementation of the CallAPI function as well. I also removed the code that was nullifying the params string of my getPosts function.
New Features
With PR#4, I implemented the posts class and in a way this is why I was discovering the bugs above.
Here is some code on how to use it:
require('class.posts.php');
$posts = new Posts();
$data = $posts->GetPosts('limit=10&moderator=helo&sortBy=created');
print_r($data);
$data = $posts->GetTotal();
print_r($data);
$data = $posts->GetList();
print_r($data);
$data = $posts->GetPost('helo','php-client-of-utopian-api-add-composer-and-fix-unit-tests');
print_r($data);
Technology Stack
PHP, nano, gedit
and for this post I used Gimp and DPICS from @wehmoenRoadmap
I plan to continue contributing to this repo and improving the quality and usefulness of this client library of Utopian APIHow 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
Posted on Utopian.io - Rewarding Open Source Contributors