SteemPHP receiving new documentation

in #steemdev7 years ago

steemphp.png

SteemPHP (https://github.com/davidkevork/steemphp) will be receiving new documentation and soon more tests file.

the old documentation


/**     
     * Account History from: - account creation     
     *                       - account update       
     *                       - submited stories     
     *                       - comment      
     *                       - votes        
     *                       - followers        
     *                       - following        
     *                       - transfer     
     * @param String $username      
     * @param int $limit        
     * @param int $skip         
     * @return array        
     */     
    public function getAccountHistory($username, $limit = 100, $skip = -1)      
    {       
        try {       
            return $this->client->call(0, 'get_account_history', [$username, SteemHelper::filterInt($skip), SteemHelper::filterInt($limit)]);       
        } catch (\Exception $e) {       
            return SteemHelper::handleError($e);        
        }       
    }

and the new code


/**
     * Gets the account history.
     *
     * @param      string   $username  The username
     * @param      integer  $limit     The limit
     * @param      integer  $skip      Skip is the place to start for pagination
     *
     * @return     array   The account history.
     */
    public function getAccountHistory($username, $limit = 100, $skip = -1)
    {
        try {
            return $this->client->call(0, 'get_account_history', [$username, SteemHelper::filterInt($skip), SteemHelper::filterInt($limit)]);
        } catch (\Exception $e) {
            return SteemHelper::handleError($e);
        }
    }

How to support this project?

upvote, resteem and star our repo on Github.

Which projects are being build using SteemPHP?

SteemHater and SteemDash

Sort:  

Very interested in this as a PHP developer.

I've been toying with SteemJS and built some fun little things but having something that could be run via cron would make life so much easier.

As I recall from looking at it a while back though it has several dependencies that stopped me from going any further. Any chance this is possible purely through curl?

You can use curl to grab data from the block chain.
simply write your small curl code and get the post values needed from the library and it should work.

If you want to post artices/comment or upvote which will be available soon is not possible without dependencies as it there has to be signature converting wif which heavily depends on bitcoin-php, which contains many of the functions needed

Thanks David, I'll have a play and see what I can come up with. :)

Okay, I got the basics up and running using curl. The argument setups were a bit different so some trial and error was involved but I'm now fetching things successfully.

I can now replicate the maths I was doing in javascript into PHP.

I'm not one to shy from a challenge so my next aim is to be able to drop an upvote on something in pure php :P