zephia / sirena-api-client
1.0.7
2019-03-13 21:28 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-15 04:36:56 UTC
README
Sirena API 用于潜在客户提供商和潜在客户数据操作
此 PHP 包由 Swagger Codegen 项目自动生成(Swagger Codegen)
- API 版本:1.5.0
- 构建包:io.swagger.codegen.languages.PhpClientCodegen 了解更多信息,请访问 http://www.getsirena.com
要求
PHP 5.4.0 及以上
安装与使用
Composer
要通过 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/zephia/sirena-api-client.git"
}
],
"require": {
"zephia/sirena-api-client": "1.*"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循 安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: ApiKey Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); // Configure OAuth2 access token for authorization: OAuth2 Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new Swagger\Client\Api\InteractionsApi(); $format = "format_example"; // string | An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header. $agent = "agent_example"; // string | The id of the agent to filter $status = "status_example"; // string | The status to filter $created_after = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The start date to filter interactions by their creation date $start = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | @deprecated - use createdAfter The start date to filter interactions by their creation date (alias of createdAfter) $created_before = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The end date to filter interactions by their creation date $end = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | @deprecated - use createdBefore The end date to filter interactions by their creation date (alias of createdBefore) try { $result = $api_instance->getInteractions($format, $agent, $status, $created_after, $start, $created_before, $end); print_r($result); } catch (Exception $e) { echo 'Exception when calling InteractionsApi->getInteractions: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 http://api.getsirena.com/v1
模型文档
- 代理商
- 类别
- 按行业分类的类别
- 类别
- 默认值
- 错误
- 财务
- 交互
- 交互媒介
- 交互输出
- 交互输出对话
- 交互
- 潜在客户
- 潜在客户数据
- 消息媒介
- 消息输出
- 金额
- 金额估计
- 新报价
- 新订阅
- 对象 ID
- 里程表
- 产品
- 提案
- 提案项目
- 潜在客户
- 潜在客户
- 报价
- 报价项目
- 报价
- 订阅
- 订阅
- 主题
- 主题
- 更新报价
- 通用潜在客户
- 储蓄计划潜在客户
- 储蓄计划产品
- 车辆潜在客户
- 车辆产品
授权文档
API 密钥
- 类型:API 密钥
- API 密钥参数名:api-key
- 位置:URL 查询字符串
OAuth2
- 类型:OAuth
- 流程:accessCode
- 授权 URL:http://localhost:2000/oauth2/authorization
- 作用域:
- leads:write:潜在客户提供商
- prospects:read:读取潜在客户
- prospects:readAdditionalData:读取潜在客户附加数据
- prospects:write:写入潜在客户
- notifications:通知