l5-klaviyo

1.0.0 • Public • Published

Laravel Klaviyo API

Wrapper Klaviyo API works with Laravel 5.*

Requirements

  • PHP 7.0.0 (or higher)
  • Laravel framework >= v5.0

Installation

"require": {
    "baorv/l5-klaviyo": "dev-master"
}

Configurations

Add ServiceProvider to config/app.php

'providers' => [
    \Baorv\Klaviyo\KlaviyoServiceProvider::class,
]

After that, run below command to publish vendor config

php artisan vendor:publish

Add two enviroment configurations: API Key and Public Key you can get it from : https://www.klaviyo.com/account#api-keys-tab

KLAVIYO_API_KEY={your-api-key}
KLAVIYO_PUBLIC_KEY={your-public-key}

Usage

$campaignApi = app(Secomapp\Klaviyo\Resources\Campaign::class);
$campaignApi->all();

With catching exception

try{
    $campaign = app(\Baorv\Klaviyo\Resources\Campaign::class);
    $campaign->all();
}catch (\Baorv\Klaviyo\Exceptions\KlaviyoApiException $exception) {
    $exception->getMessage();
}

License

This project is licensed under the MIT License.

Contribution

Todo

  • Add unit test
  • Travis

/l5-klaviyo/

    Package Sidebar

    Install

    npm i l5-klaviyo

    Weekly Downloads

    4

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    53.9 kB

    Total Files

    24

    Last publish

    Collaborators

    • wildlifechorus