nikitakiselev / sendpulse
SendPulse REST API client for Laravel
Installs: 5 199
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- guzzlehttp/guzzle: ^6.2
This package is not auto-updated.
Last update: 2024-12-30 13:21:50 UTC
README
Sendpulse API package for Laravel 5
Installation
composer require nikitakiselev/sendpulse
Add NikitaKiselev\SendPulse\SendPulseProvider::class
to providers
config/app.php
'providers' => [ NikitaKiselev\SendPulse\SendPulseProvider::class, ], 'aliases' => [ 'SendPulse' => NikitaKiselev\SendPulse\SendPulse::class, ]
Publish config
php artisan vendor:publish --provider="NikitaKiselev\SendPulse\SendPulseProvider" --tag="config"
Set the api key variables in your .env
file
SENDPULSE_API_USER_ID=null
SENDPULSE_API_SECRET=null
Usage API
https://sendpulse.com/ru/integrations/api
// From container $api = app('sendpulse'); $books = $api->listAddressBooks(); // From facade $books = \SendPulse::listAddressBooks(); // From dependency injection public function getBooks(\NikitaKiselev\SendPulse\Contracts\SendPulseApi $api) { $books = $api->listAddressBooks(); }