gldrenthe89/kiyoh-php-client

此包已被弃用,不再维护。未建议替代包。

用于连接到 Kiyoh 或 Klantenvertellen API 终端点的 PHP 库

v1.2.2 2020-01-10 10:02 UTC

This package is auto-updated.

Last update: 2021-06-15 18:00:06 UTC


README

用于 Laravel 项目。

目前只显示以下支持的功能。新功能将在未来发布。欢迎贡献并创建 PR。

安装

您可以通过 composer 安装库

composer require gldrenthe89/kiyoh-php-client

使用方法

导入类

use Gldrenthe89\KiyohPhpClient\KiyohApi;

用于分组统计

$baseUrl    = string // www.kiyoh.com or www.Klantenvertellen.nl';
$apiKey     = string // provided by accountmanager from Kiyoh;
$apiCall    = new KiyohApi($baseUrl, $apiKey);
$response   = $apiCall->getGroupStatistics();

用于单个地点统计

$baseUrl    = string  // www.kiyoh.com or www.Klantenvertellen.nl'.
$apiKey     = string  // provided by accountmanager from Kiyoh.
$locationId = integer // provided by accountmanager from Kiyoh of found in respective group dashboard.
$apiCall    = new KiyohApi($baseUrl, $apiKey);
$response   = $apiCall->getLocationStatistics($locationId);

发送评论邀请:当响应有错误异常时抛出。

$baseUrl            =   string // www.kiyoh.com or www.Klantenvertellen.nl';
$inviteApiKey       =   string // API key (token) to authorize the request, found in respective group dashboard;
$params             =   [
    'location_id'       =>      integer   // ID for the location for which the invite should be sent,
    'invite_email'      =>      string    // email address that should receive the invite,
    'delay'             =>      integer   // number of days after which the email should be sent. 0 is immediately,
    'first_name'        =>      string    // name fields to personalize the invite,
    'last_name'         =>      string    // name fields to personalize the invite,
    'language'          =>      string    // language the invite email is sent, “nl” for Dutch (case sensitive)
    'ref_code'          =>      string    // internal reference code which can be used for administration purposes (the reference code is visible in invite history, review exports and XML feed)
];
$apiCall            =   new KiyohApi($baseUrl, $inviteApiKey);
$response           =   $apiCall->sendReviewInviteJson($params);

许可证

Kiyoh PHP 客户端是开源软件,许可协议为 MIT 许可证