A PHP API client for Hubleto, designed to simplify integration with Hubleto’s services.
Install via Composer:
composer require hubleto/php-api-client- PHP 7.4 or higher
- Composer
- GuzzleHTTP (installed automatically via Composer dependencies)
require 'vendor/autoload.php';
use Hubleto\Api\Client;
$phpClient = new Client('your-api-key', 'http://localhost/hubleto/erp-project/');
$response = $phpClient->sendRequest('POST', 'Hubleto\\App\\Community\\Contacts', 'GetContacts', []);
// Example POST request
$response = $client->post('Hubleto\App\Community\Contacts', 'CreateContact', ['name' => 'John Doe']);
echo $response->getBody();See the examples directory for more usage examples.
You can configure the client by passing options to the constructor:
$client = new Client('your-api-key', 'http://localhost/hubleto/erp-project/');Creates a new API client instance.
Sends a GET request. Uses the sendRequest method internally.
Sends a POST request. Uses the sendRequest method internally.
Sends an HTTP request with the specified method (GET, POST, etc.) to the given app and controller, with optional parameters.
For questions or support, please contact us at https://hubleto.com/en/contact.