PHP code example of evergrowth / paid-ai-php-client
1. Go to this page and download the library: Download evergrowth/paid-ai-php-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/ */
evergrowth / paid-ai-php-client example snippets
use Evergrowth\PaidAiPhpClient\PaidAiApiClient;
use Evergrowth\PaidAiPhpClient\PaidAiApiClientInterface;
/** @var PaidAiApiClientInterface $client */
$client = PaidAiApiClient::new('secret-api-key');
use Evergrowth\PaidAiPhpClient\Model\Signal;
$signals = [
new Signal('event1', 'agent1', 'customerX', ['additional metadata']),
new Signal('event2', 'agent2', 'customerX', ['additional metadata']),
];
$client->flush($signals);
use Evergrowth\PaidAiPhpClient\Model\Signal;
use Evergrowth\PaidAiPhpClient\Model\AgentEnum;
$signals = [
Signal::fromAgent(
AgentEnum::ACCOUNT_QUALIFICATION,
'customerX',
['additional metadata'],
),
];
$client->flush($signals);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.