rogertiweb/sendpulse

There is no license information available for the latest version (1.3) of this package.

SendPulse REST API client for Laravel

1.3 2022-10-16 20:30 UTC

This package is auto-updated.

Last update: 2025-06-17 02:27:58 UTC


README

Sendpulse API package for Laravel 9

Installation

composer require rogertiweb/sendpulse

Add Rogertiweb\SendPulse\SendPulseProvider::class to providers

config/app.php

'providers' => [
    Rogertiweb\SendPulse\SendPulseProvider::class,
],

'aliases' => [
    'SendPulse' => Rogertiweb\SendPulse\SendPulse::class,
]

Publish config

php artisan vendor:publish --provider="Rogertiweb\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/en/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();
}