PHP code example of lacunaphp / api-client
1. Go to this page and download the library: Download lacunaphp/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/ */
lacunaphp / api-client example snippets
use LacunaPHP\APIClient\Client;
$client = new Client('https://us1.lacunaexpanse.com');
try {
$result = $client->empire->login([
'name' => 'empire-name',
'password' => 'empire-password',
'api_key' => 'anonymous'
]);
} catch($error) {
...
}
bash
# Install Composer
curl -sS https://getcomposer.org/installer | php