rockbuzz/sp-client

0.7.0 2022-02-23 01:28 UTC

This package is auto-updated.

Last update: 2022-06-23 02:33:43 UTC


README

Simple SDK for communication with sendportal api.

badge.svg

Requirements

PHP >=7.3

Development environment

Requirements

docker-compose up -d --build
docker-compose exec app composer ...

Usage

composer require rockbuzz/sp-client
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

Style Code

composer cs

Testing

composer test

License

The Sendportal Api Client is open-sourced software licensed under the MIT license.