michalper / ipresso_api
v2.10.0
2021-09-20 07:21 UTC
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
- itav/serializer: ^1.3
Requires (Dev)
- phpunit/phpunit: ^6.5
- dev-master
- v2.10.0
- v2.9.0
- v2.8.0
- v2.7.0
- 2.6.x-dev
- v2.6.0
- 2.5.x-dev
- v2.5.0
- v2.4.0
- 2.3.x-dev
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.0
- 1.4.1
- 1.4
- 1.3.18
- 1.3.17
- 1.3.16
- 1.3.15
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3
- 1.2.x-dev
- 1.2.24
- 1.2.23
- 1.2.22
- 1.2.21
- 1.2.20
- 1.2.19
- 1.2.18
- 1.2.17
- 1.2.16
- 1.2.15
- 1.2.14
- 1.2.13
- 1.2.12
- 1.2.11
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.3
- 1.1.0
- 1.0.0
- dev-feature/DV-3012
- dev-development
- dev-feature/IPRESSO-8542
- dev-apiclient/201811_scenario_status
- dev-apiclient/201810_algo_data
- dev-apiclient/201808_external_ids
This package is not auto-updated.
Last update: 2022-02-01 12:57:02 UTC
README
文档
安装
使用以下命令安装最新版本
$ composer require encjacom/ipresso_api
示例
认证
<?php $ipresso = new iPresso(); $ipresso->setLogin('login'); $ipresso->setPassword('password'); $ipresso->setCustomerKey('customerKey'); $ipresso->setUrl('https://yourdomain.ipresso.pl'); $token = $ipresso->getToken(); $ipresso->setToken($token->data);
添加新联系人
<?php use \iPresso\Model\Contact; use \iPresso\Service\Response; $contact = new Contact(); $contact->setEmail('email@address.com'); $contact->setFirstName('FirstName'); $contact->setLastName('LastName'); /** @var Response $response */ $response = $ipresso->contact->add($contact);
使用给定 ID 号收集联系人数据
<?php use \iPresso\Service\Response; $idContact = 1; /** @var Response $response */ $response = $ipresso->contact->get($idContact);
向联系人添加活动
<?php use \iPresso\Service\Response; use \iPresso\Model\ContactActivity; $idContact = 1; $contactActivity = new ContactActivity(); $contactActivity->setKey('activityKey'); $contactActivity->setDate('2017-01-01 00:00:01'); $contactActivity->addParameter('parameterKey','parameterValue'); /** @var Response $response */ $response = $ipresso->contact->addActivity($idContact, $contactActivity);
关于
要求
- iPresso REST API 客户端与 PHP 5.3 或更高版本兼容。
提交错误和功能请求
错误和功能请求在 GitHub 上跟踪。