daryl-uc / autopilot
dev-dev/1.0.0
2019-02-15 06:40 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-20 20:41:44 UTC
README
一套API,允许CRM与AutoPilotHQ通信
此PHP软件包是由Swagger Codegen项目自动生成的
- API版本:0.0.3-oas3
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5及更高版本
安装与使用
Composer
要通过Composer安装绑定,请将以下内容添加到composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照安装过程操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: autopilotapikey $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('autopilotapikey', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('autopilotapikey', 'Bearer'); $apiInstance = new Swagger\Client\Api\AccountInfoApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->getAccount(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountInfoApi->getAccount: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI都是相对于https://private-anon-b40d4dece5-autopilot.apiary-mock.com/v1
类 | 方法 | HTTP请求 | 描述 |
---|---|---|---|
AccountInfoApi | getAccount | GET /account | 从AutoPilot获取账户信息 |
ContactAddOrUpdateApi | createOrUpdateContact | POST /contact | 创建或更新联系人 |
ContactOperationApi | deleteContact | DELETE /contact/{contact-email} | 从AutoPilot中删除联系人 |
ContactOperationApi | getContactInfo | GET /contact/{contact-email} | 从AutoPilot返回联系人信息 |
ContactOperationApi | getFirstContactSet | GET /contacts | 获取AutoPilot中存在的第一个联系人集 |
ContactOperationApi | getNextContactSet | GET /contacts/{bookmark} | 获取AutoPilot中存在的下一个联系人集 |
ContactSubscriptionApi | unsubscribeContact | POST /contact/{contact-email}/unsubscribe | 在AutoPilot中取消联系人的订阅 |
CustomFieldsApi | getCustomFields | GET /contacts/custom_fields | 获取AutoPilot中存在的自定义字段 |
HooksApi | deleteHooks | DELETE /hooks | 删除所有钩子 |
HooksApi | getHooks | GET /hooks | 获取AutoPilot中存在的所有钩子列表 |
HooksApi | registerHooks | POST /hook | 注册钩子 |
HooksApi | unregisterHook | DELETE /hook/{hook_id} | 注销钩子 |
ListOperationApi | addToList | POST /list/{list_id}/contact/{contact_email} | 将联系人添加到列表中 |
ListOperationApi | checkContactInList | GET /list/{list_id}/contact/{contact_email} | 检查联系人是否存在于AutoPilot中 |
ListOperationApi | getAllList | GET /lists | 返回AutoPilot中存在的所有列表 |
ListOperationApi | getFirstContactSetInList | GET /list/{list_id}/contacts | 从AutoPilot中获取列表中存在的第一个联系人集 |
ListOperationApi | getNextContactSetInList | GET /list/{list_id}/contacts/{bookmark} | 从AutoPilot中获取列表中存在的下一个联系人集 |
ListOperationApi | removeFromList | 删除 /list/{list_id}/contact/{contact_email} | 从AutoPilot中的列表中移除联系人 |
SmartSegmentApi | getSegment | GET /smart_segments | 获取智能段中所有列表 |
TriggersApi | addTriggers | POST /trigger/{trigger_id}/contact/{contact_email} | 将联系人添加到旅程 |
TriggersApi | getTriggers | GET /triggers | 获取所有具有API触发的所有旅程的列表 |
模型文档
授权文档
autopilotapikey
- 类型: API密钥
- API密钥参数名称: autopilotapikey
- 位置: HTTP头
作者
- daryl-uc