Download the PHP package balfour/php-omnisend without Composer
On this page you can find all versions of the php package balfour/php-omnisend. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download balfour/php-omnisend
More information about balfour/php-omnisend
Files in balfour/php-omnisend
Package php-omnisend
Short Description A library for interacting with the Omnisend API
License MIT
Informations about the package php-omnisend
php-omnisend
A library for interacting with the Omnisend API.
This library is in early release and is pending unit tests.
Table of Contents
- Installation
- Usage
- Creating a Client
- Contacts
- Create Contact
- Update Contact
- Retrieve Contact
- List Contacts
- Subscribe Contact
- Unsubscribe Contact
- Events
- List Events
- Retrieve Event
- Trigger Event
- Misc Calls
- Laravel Integration
- Configuration
- Job Handlers
- CreateContact
- UpdateContact
- TriggerEvent
Installation
Usage
Please see https://api-docs.omnisend.com/v3 for full API documentation.
Creating a Client
Contacts
Create Contact
Update Contact
Retrieve Contact
List Contacts
Subscribe Contact
Unsubscribe Contact
Events
List Events
Retrieve Event
``php $response = $omnisend->getEvent('5d5cf4d98653ed49cd7f1bd2');
// you can also retrieve an event by name // the function will return 'null' if no matching event is found $response = $omnisend->getEventByName('Payment Complete'); ``
Trigger Event
Misc Calls
For any other API calls which don't have class functions, you can call the following methods directly on the client.
Laravel Integration
This package comes bundled with a Laravel ServiceProvider & utility classes for easy integration into a Laravel project.
Configuration
The config can be published using php artisan vendor:publish
.
The following environment variables are supported:
OMNISEND_ENABLED
- Enable or disable Omnisend integration (defaults to false
)
OMNISEND_API_KEY
- Your Omnisend API key
OMNISEND_QUEUE
- The queue on which jobs will be processed (defaults to omnisend
)
OMNISEND_SEND_WELCOME_EMAIL
- If true, a welcome email will be sent to a contact upon creation (defaults to false
)
OMNISEND_DEFAULT_CONTACT_STATUS
- The default status when a contact is created. (defaults to subscribed
)
Job Handlers
The following job handlers are included: