PHP code example of ylorant / hedgebot-api-client

1. Go to this page and download the library: Download ylorant/hedgebot-api-client 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/ */

    

ylorant / hedgebot-api-client example snippets



use HedgebotApi\Client as HedgebotApiClient;

// The long way to do it
$client = new HedgebotApiClient();
$client->setBaseUrl('http://127.0.0.1:8081');

$endpoint = $client->endpoint('/plugin');
$list = $endpoint->getList();

// A shorter way to do it
$client = new HedgebotApiClient('http://127.0.0.1:8081');
$list = $client->endpoint('/plugin')->getList();