PHP code example of dotzero / habrahabr_guzzle

1. Go to this page and download the library: Download dotzero/habrahabr_guzzle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dotzero / habrahabr_guzzle example snippets


$adapter = new \Habrahabr\Api\HttpAdapter\GuzzleAdapter();

$adapter->setEndpoint(getenv('ENDPOINT'));
$adapter->setToken(getenv('TOKEN'));
$adapter->setClient(getenv('CLIENT'));

$client = new \Habrahabr\Api\Client($adapter);

$User = $client->getUserResource()->getUser('me');
var_dump($User);