PHP code example of rvkulikov / yii2-getresponse

1. Go to this page and download the library: Download rvkulikov/yii2-getresponse 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/ */

    

rvkulikov / yii2-getresponse example snippets



return [
    'components' => [
        'gr'        => [
            'class'   => 'rvkulikov\yii2\getResponse\GRClient',
            'baseUrl' => null,
            'token'   => null,
            'domain'  => null,
            'fields'  => [
                'customFields' => [
                    'foo' => null,
                    'bar' => null,
                ],
            ],
        ],
    ]
];


return [
    'components' => [
        'gr'        => [
            'baseUrl' => 'https://api3.getresponse360.pl/v3',
            'token'   => 'token',
            'domain'  => 'domain.com',
            'fields'  => [
                'customFields' => [
                    'foo' => 'value1',
                    'bar' => 'value2',
                ],
            ],
        ],
    ]
];


$grClient = \Yii::$app->gr;
$campaign = $grClient->getCampaigns()->getCampaign('<id>');
\yii\helpers\VarDumper::dump($campaign);