PHP code example of inspiredminds / eyepin-api

1. Go to this page and download the library: Download inspiredminds/eyepin-api 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/ */

    

inspiredminds / eyepin-api example snippets


use InspiredMinds\EyepinApi\EyepinApiFactory;
use InspiredMinds\EyepinApi\Model\AddressList;
use InspiredMinds\EyepinApi\Model\Request\AddressInsertRequest;

$api = (new EyepinApiFactory())->createForCredentials('username', 'password');

// Get account info
$accountInfo = $api->getAccountInfo();

// Create address
$addressInsertRequest = new AddressInsertRequest();
$addressInsertRequest->email = '[email protected]';
$addressInsertRequest->status = '1';
$addressInsertRequest->lists[] = new AddressList(123);

$api->createUpdateAddress($addressInsertRequest);