insidiousforce/laravel-marketo-extended-rest-client

Marketo.com REST API 的 PHP 客户端

v1.0.0 2023-06-23 20:15 UTC

This package is not auto-updated.

Last update: 2024-09-29 00:27:04 UTC


README

Marketo.com REST API 的非官方 PHP 客户端:http://developers.marketo.com/documentation/rest/。需要 PHP 5.3.3 或更高版本。

安装

推荐通过 Composer 安装客户端。只需运行以下命令即可将库添加到您的 composer.json 文件中。

composer require insidiousforce/laravel-marketo-extended-rest-client

设置

该客户端基于 Guzzle 3 构建,并使用工厂方法创建实例。您必须指定 Munchkin ID 或完整 URL。

####对于 REST API 访问

use CSD\Marketo\Client;

$client = Client::factory(array(
    'client_id' => 'Marketo client ID',         // required
    'client_secret' => 'Marketo client secret', // required
    'munchkin_id' => '100-ABC-123' // alternatively, you can supply the full URL, e.g. 'url' => 'https://100-ABC-123.mktorest.com'
));

####对于批量 API 访问

use CSD\Marketo\Client;

$client = Client::factory(array(
    'client_id' => 'Marketo client ID',         // required
    'client_secret' => 'Marketo client secret', // required
    'munchkin_id' => '100-ABC-123' // alternatively, you can supply the full URL, e.g. 'url' => 'https://100-ABC-123.mktorest.com'
    'bulk' => true // if uploading leads via file upload (e.g. csv)
));

用法

查看 src/Client.php 的源代码以获取所有可用方法。

许可证

此源代码根据 MIT 许可证授权,有关详细信息,请参阅 LICENSE 文件。如果您使用此代码,欢迎告知。