Wallogit.com
2017 © Pedro Peláez
Ease Access to the Khepri technology
In the composer.json, on the require section add:, (*1)
"require": {, (*2)
"khepri/connector": "dev-master", (*3)
}, (*4)
You need to update your composer, (*5)
$ composer update, (*6)
Here is a simple sample use case, (*7)
<?php, (*8)
require './vendor/autoload.php';, (*9)
// Khepri URL (sandbox environment), (*10)
$khepri_url = 'http://sb.khepri.tech';, (*11)
// Initialize the client with your API-Key. You can find it on your Khepri account., (*12)
$api_key = 'MY_API_KEY';, (*13)
// you can create your instance with your khepri account here we select the instance 1, (*14)
$instance_id = 1;, (*15)
// init, (*16)
KhepriAPI::init($khepri_url, $api_key);, (*17)
// Simple ask, (*18)
$answer = KhepriAPI::ask($instance_id);, (*19)
// Simple success, (*20)
$chk = KhepriAPI::success($instance_id, $answer->solution);, (*21)