cra/marketo-api
最新稳定版本:0.3.0
Composer 安装命令:
composer require cra/marketo-api
包简介
Unofficial Marketo API PHP library.
README 文档
README
Unofficial Marketo API PHP library.
Installation
Composer
composer require cra/marketo-api
Manual download
Run composer install in the library directory and then require PATH_TO_LIBRARY/vendor/autoload.php in your project.
Usage
First, you need to initialise and authenticate client.
use Cra\MarketoApi\Client; $client = (new Client($config))->authenticate();
$config must have the following fields restBaseUrl, identityBaseUrl, clientId, and clientSecret.
See Examples section below for more information on the fields.
Then $client will be passed to API endpoint classes. E.g.:
use Cra\MarketoApi\Endpoint\Asset\Folder; $folderEndpoint = new Folder($client); $folder = $folderEndpoint->queryByName('My awesome folder'); $folders = $folderEndpoint->browse($folder->folderId());
Examples
To run examples from /examples directory put the following config.json file in the repository root:
{
"restBaseUrl": "REST BASE URL copied from Marketo dashboard including /rest",
"identityBaseUrl": "REST BASE URL copied from Marketo dashboard including /identity",
"clientId": "CLIENT ID from Marketo dashboard",
"clientSecret": "CLIENT SECRET from Marketo dashboard"
}
统计信息
- 总下载量: 10.8k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-01