PHP code example of rockbuzz / sp-client

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

    

rockbuzz / sp-client example snippets


use Rockbuzz\SpClient\Client;
use Rockbuzz\SpClient\Data\{Subscriber, Tag, Campaign};

$client = new Client;
$client->campaigns(int $page = 1): array;
$client->campaign(int $id): Campaign;
$client->addCampaign(array $data): Campaign;
$client->tags(int $page = 1): array;
$client->allTags(): array;
$client->tag(int $id): Tag;
$client->addTag(array $data): Tag;
$client->changeTag(int $id, array $data): Tag;
$client->subscribersFromTag(int $tagId, int $page = 1): array;
$client->deleteSubscribersFromTag(int $tagId, array $subscribersId): array;
$client->subscribers(int $page = 1): array;
$client->subscriber(int $id): Subscriber
$client->addSubscriber(array $data): Subscriber;
$client->changeSubscriber(int $id, array $data): Subscriber;
$client->send(int $id): Campaign