talentify/customerio-sdk

0.5.6 2023-07-18 20:54 UTC

README

用于customer.io的基本php客户端。

快速入门

前往并获取您的凭证,在以下位置创建工作区的令牌: https://fly.customer.io/settings/api_credentials?keyType=app

$client = new CustomerIoClient(
    [
        'site_id' => 'string', // site_id and site_key is needed for tracking api
        'site_key' => 'string',
        'token' => 'string', // is needed for app and beta apis
    ],
    AccountRegion::US()
)

// instance your request with his requeriments (generally entities from CIO\Entity namespace)
$request = new AddOrUpdateCustomer(
    new Customer(
        new Identifier(123),
        'email@provider.com',
        1622554538,
        [
             'attributeName'  => 'string|int|boolean only',
             'name'           => 'string',
             'converted'      => false,
             'type'           => 1,
        ]
    )
);

$response = $client->execute($request);

开发

  • 安装依赖项 docker-compose run php composer install;
  • 运行测试 docker-compose run php ./vendor/bin/phpunit;

改进路线图

  • 请求异常;