PHP code example of alexander-emelyanov / anyoption-api-client
1. Go to this page and download the library: Download alexander-emelyanov/anyoption-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/ */
alexander-emelyanov / anyoption-api-client example snippets
$client = new \AnyOption\ApiClient([
'apiUser' => [
'userName' => '<ANYOPTION_USERNAME>',
'password' => '<ANYOPTION_PASSWORD>'
],
'url' => '<ANYOPTION_URL>'
]);
$command = new \AnyOption\Commands\InsertUser([
'utcOffset' => 0,
'locale' => 'en',
'register' => [
'firstName' => 'John',
'lastName' => 'Smith',
'email' => '[email protected]',
'mobilePhone' => '493025922774',
'password' => 'qwerty',
'password2' => 'qwerty',
'countryName' => 'DEU',
'ip' => '127.0.0.1',
'terms' => '',
],
]);
/** @var \AnyOption\Responses\InsertUser $response */
$response = $client->call($command);
$countries = \AnyOption\Dictionaries::countries();
$command = new \AnyOption\Commands\GetFTDUsersByDate([
'locale' => 'en',
'dateRequest' => date('Y-m-d'),
]);
/** @var \AnyOption\Responses\GetFTDUsersByDate $response */
$response = $client->call($command);