rockbuzz / sp-client
0.7.0
2022-02-23 01:28 UTC
Requires
- php: >=7.3
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.2
README
Simple SDK for communication with sendportal api.
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.