yoopies/braze-php

Braze API 客户端,基于 Guzzle 6|7 构建

0.0.1 2021-03-11 12:53 UTC

This package is not auto-updated.

Last update: 2024-09-17 03:06:22 UTC


README

这是一个非官方的 Braze PHP 库,它允许用 PHP 编写的应用程序访问 Braze API。

API 参考: https://www.braze.com/docs/api/

安装

推荐通过 Composer 安装 braze-php

composer require yoopies/braze-php

使用

use Braze\BrazeClient;

$client = new BrazeClient('apiKey', 'rest.fra-01.braze.eu');

$client->user->track(
    [
        'events' => [
            [
                '_update_existing_only' => false,
                'name'                  => 'my_event_name',
                'external_id'           => '1234',
                'time'                  => (new \DateTime())->format('c'),
            ],
        ],
    ]
);