offline-agency/laravel-email-chef

This is a simple Laravel package for integration with Email Chef API

1.0.4 2023-11-27 21:33 UTC

This package is auto-updated.

Last update: 2024-11-17 15:38:39 UTC


README

Latest Stable Version License run-tests StyleCI Total Downloads PHP Version Require

Laravel Email Chef Integration

Installation

You can install the package via composer:

composer require offline-agency/laravel-email-chef

You can publish and run the migrations with:

php artisan vendor:publish --provider="OfflineAgency\LaravelEmailChef\LaravelEmailChefServiceProvider" --tag="laravel-email-chef-migrations"

You can publish the config file with:

php artisan vendor:publish --provider="OfflineAgency\LaravelEmailChef\LaravelEmailChefServiceProvider" --tag="laravel-email-chef-config"

This is the contents of the published config file:

return [
    'baseUrl' => 'https://app.emailchef.com/apps/api/v1/',

    'login_url' => 'https://app.emailchef.com/api/',

    'username' =>  env('EMAIL_CHEF_USERNAME'),

    'password' => env('EMAIL_CHEF_PASSWORD'),

    'list_id' => '97322',
    
    'contact_id' => '656023'
];

Usage

$laravel-email-chef = new OfflineAgency\LaravelEmailChef();
echo $laravel-email-chef->echoPhrase('Hello, OfflineAgency!');

//List create
$list = new ListsApi();
$list->create([
    'list_name' => 'OA list name',
    'list_description' => 'description'
]);

//List unsubscribe
$list = new ListsApi();
$list->unsubscribe(
    97322, //list_id
    53998920 //contact_id
);

//Contacts get count
$contacts = new ContactsApi;
$contacts->count(config('email-chef.list_id'));

API coverage

We are currently work on this package to implement all endpoints. Enable notifications to be notified when new API are released.

❌ Account

❌ Account infos

❌ Subscription

✅ Lists

✅ Contacts

❌ Predefined Fields

❌ Custom Fields

❌ Blockings

❌ Import Tasks

❌ Segments

❌ Campaigns

❌ Autoresponders

❌ Send mail

❌ SMS

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security-related issues, please email support@offlineagency.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.