PHP code example of rulecom / api-wrapper

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

    

rulecom / api-wrapper example snippets



use Rule\ApiWrapper\Api\V2\Subscriber\Subscriber;

class Foo
{
    private $subscriberApi;

    public function __construct(Subscriber $subscriberApi)
    {
        $this->subscriberApi = $subscriberApi;
    }

    public function createMeSomeSubscriber($params)
    {
        //... do something 
        $this->subscriberApi->create([
            'email' => $email,
            //... see docs for detailes
        ]);
    }
}