shapin / customerio
PHP client for customer.io API
Installs: 8 895
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- symfony/config: ^4.4|^5.3|^6.0
- symfony/http-client: ^4.4|^5.3|^6.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- symfony/phpunit-bridge: ^4.4|^5.3|^6.0
- symfony/var-dumper: ^4.4|^5.3|^6.0
This package is auto-updated.
Last update: 2023-12-27 11:26:15 UTC
README
Install
Via Composer
$ composer require shapintv/customerio
Usage
// Create HTTP Clients $behavioralTrackingClient = HttpClient::create([ 'base_uri' => 'https://track.customer.io/api/v1/', 'auth_basic' => [self::SITE_ID, self::API_KEY], 'headers' => [ 'Content-Type' => 'application/json', ], ]); $apiClient = HttpClient::create([ 'base_uri' => 'https://api.customer.io/v1/api/', 'auth_basic' => [self::SITE_ID, self::API_KEY], 'headers' => [ 'Content-Type' => 'application/json', ], ]); $apiClient = new CustomerIOClient($behavioralTrackingClient, $apiClient); // Create a customer $apiClient->customers()->createOrUpdate('my_custom_id', [ 'email' => 'georges@abitbol.com', ]);
License
The MIT License (MIT). Please see License File for more information.