1. Go to this page and download the library: Download dynata/rex-sdk-php 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/ */
dynata / rex-sdk-php example snippets
use Dynata\Rex\Core\Security\BasicCredentialsProvider;
use Dynata\Rex\Core\Security\StringSigner;
use Dynata\Rex\Registry\Registry;
$interval = \DateInterval::createFromDateString('1 day');
$creds_provider = new BasicCredentialsProvider("REX_ACCESS_KEY", "REX_SECRET_KEY");
$string_signer = new StringSigner($creds_provider, $interval);
$registy = new Registry("REX_REGISTRY_BASE_URL", $string_signer);
$shardConfig = new ShardConfig(1, 1);
$notification_payload = new ReceiveNotificationsInput(1, $shardConfig, "account_id");
$registry->recieveNotifications($notification_payload);
$ack_notification_payload = new AckNotificationsInput("account_id", [1, 2 , 3]);
$registry->ackNotifications($ack_notification_payload);
$registry->getOpportunity(['id'=> 1]);
$list_project_opportunities_payload = new ListProjectOpportunitiesInput("account_id", 1);
$registry->listProjectOpportunities($list_project_opportunities_payload);
$download_collection_payload = new DownloadCollectionInput("account_id", 1);
$registry->downloadCollection($list_project_opportunities_payload);
use Dynata\Rex\Core\Security\BasicCredentialsProvider;
use Dynata\Rex\Core\Security\StringSigner;
$interval = \DateInterval::createFromDateString('1 day');
$creds_provider = new BasicCredentialsProvider("REX_ACCESS_KEY", "REX_SECRET_KEY");
$string_signer = new StringSigner($creds_provider, $interval);
$gateway = new Gateway("REX_BASE_URL", $string_signer);