PHP code example of drinks-it / esb-client
1. Go to this page and download the library: Download drinks-it/esb-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/ */
drinks-it / esb-client example snippets
use EsbClient\ApiClient;
use EsbClient\ApiConfig;
use EsbClient\Request\OrderRequest;
$config = new ApiConfig([
'base_uri' => 'https://api.example.com',
'api_key' => 'your-api-key',
]);
$client = new ApiClient($config);
$request = new OrderRequest(/* ...parameters... */);
$response = $client->send($request);
// Handle $response
use EsbClient\Factory\EsbClientFactory;
$client = EsbClientFactory::create([
'base_uri' => 'https://api.example.com',
'api_key' => 'your-api-key',
]);