gldrenthe89 / kiyoh-php-client
PHP Library for connecting to Kiyoh or Klantenvertellen API End Point
Installs: 7 114
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.2.0
This package is auto-updated.
Last update: 2021-06-15 18:00:06 UTC
README
for use in Laravel projects.
Currently only supported functions are shown below. New functions will be released in the future. Feel free to contribute and create a PR.
Installation
You can install the library via composer:
composer require gldrenthe89/kiyoh-php-client
Usage
Import class:
use Gldrenthe89\KiyohPhpClient\KiyohApi;
For group statistics use:
$baseUrl = string // www.kiyoh.com or www.Klantenvertellen.nl'; $apiKey = string // provided by accountmanager from Kiyoh; $apiCall = new KiyohApi($baseUrl, $apiKey); $response = $apiCall->getGroupStatistics();
For a per location statistics use:
$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);
Send a review invite: when response has error exception is thrown.
$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);
License
The Kiyoh PHP Client is open-sourced software licensed under the MIT license.