Version: 1.0.5 stable
This library will allow you to connect to the nToklo API and create your own applications, get tokens and the results. Full documentation of the API can be found in the nToklo dev website
$ composer require ntoklo/ntokloapi-php
You can see how to use this library on the documentation
Include the require path to autoload.php and instantiate a new NtokloApi class and pass through the nToklo api key and secret.
require "vendor/autoload.php";
$api = new NtokloApi('nToklo API key', 'nToklo API secret');
Events API allows customers to send nToklo user activity. Click here for more info on Events
$api->postEvent( $array );
Add a new product to the Ntoklo API Click here for more info on posting product
$api->postProduct( $array );
Get a product by ID Click here for more info on getting product by Id
$api->getProduct( $productId );
Recommendations API allows customers to retrieve recommendations based on user history and product attributes Click here for more info on recommendations
$api->recommendations( $userId, $productId, $scope, $value );
Charts API allows customers to retrieve a list of popular products. Charts represents a rolling time window (daily or weekly) and can be scoped by product attributes and filtered by action. Click here for more info on charts
$api->chart( $timestamp, $scope, $value, $action, $tw, $maxItems );
Add to blacklist Click here for more info on adding product to blacklist
$api->addBlacklist($productId);
Remove from blacklist Click here for more info on removing product from blacklist
$api->removeBlacklist($productId);
Gettin all blacklisted product Click here for more info on getting blacklisted products
$api->fetchBlacklist();
This is a list of the functionality that is available on this API connector:
- postEvent($date);
- postProduct($data_product);
- getProduct($productId);
- recommendations($userId = null, $productId = null, $scope = null, $value = null);
- chart($timestamp = null, $scope = null, $value = null, $action = null, $tw = null, $maxItems = null);
- addBlacklist($productId);
- removeBlacklist($productId);
- fetchBlacklist();
- Fu Hoang fu.hoang@ntoklo.com
This library is licensed under the Apache 2.0 license. See LICENSE for more details
Copyright 2015 nToklo Ltd.