-
Notifications
You must be signed in to change notification settings - Fork 15
Installation & Usage
Ben Sherred edited this page Dec 3, 2019
·
3 revisions
You can install the package via Composer. Run the following command:
composer require truckersmp/api-clientTo use the package, use Composer's autoload:
require_once('vendor/autoload.php');Once you have installed the package, you can create a new instance of the Client:
<?php
require_once('vendor/autoload.php');
$client = new TruckersMP\APIClient\Client();This package uses Guzzle for gathering data from the API. If you want to change the Guzzle configuration, you can pass an array to the Client during initialization:
<?php
require_once('vendor/autoload.php');
$client = new TruckersMP\Client([
// Guzzle config
]);If you have any questions about the library, you can create a topic on our forum.
This package is open-source and is licensed under the MIT license.