E-goi 的 PHP API

v0.3.6 2016-04-15 15:36 UTC

This package is not auto-updated.

Last update: 2024-09-24 03:38:57 UTC


README

PHP API 用于集成 E-goi 多渠道营销自动化。要使用,请访问 http://www.e-goi.com/en/resources/api/

要求

PHP 版本

  • PHP 5.3 或更高版本
  • ext-curl
  • ext-json

跟踪包

  • zendframework/zend-json
  • zendframework/zendrest
  • zendframework/zend-soap
  • zendframework/zend-xmlrpc

安装

您可以克隆此存储库

git clone https://github.com/twbs/bootstrap.git.

您可以从 [Composer](更多信息? https://getcomposer.org.cn/) 获取

composer require hat-framework/e-goi

或将其添加到您的 composer.json 中,然后执行 composer update

{
    "require": {
        "hat-framework/e-goi": "0.1.0"
    }
}

您可以下载文件(但请记住,在这种情况下,您应该安装或下载 zendframework 依赖项)

https://github.com/hat-framework/e-goi/archive/v0.3.4.zip

用法

require_once './vendor/autoload.php';

$apikey = "<e-goi api key>";

$arguments = array(
    "apikey" => $apikey
);

// $api = EgoiApiFactory::getApi(Protocol::Soap);
// $api = EgoiApiFactory::getApi(Protocol::Rest);
$api = EgoiApiFactory::getApi(Protocol::XmlRpc);
$result = $api->getUserData($arguments);
print_r($result);

致谢

此包基于 https://github.com/alexndreazevedo/egoi-api-php。但 alexndreazevedo 用户未更新 e-goi api 到 0.3.4,因此我使用了他们的基础代码来更新 e-goi api 到最新版本