PHP code example of ntoklo / ntokloapi-php

1. Go to this page and download the library: Download ntoklo/ntokloapi-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ntoklo / ntokloapi-php example snippets


$api->fetchBlacklist();

 bash
$ composer 
 php
pi = new NtokloApi('nToklo API key', 'nToklo API secret');

 php
$api->postEvent( $array );

 php
$api->postProduct( $array );

 php
$api->getProduct( $productId );

 php
$api->recommendations( $userId, $productId, $scope, $value );

 php
$api->chart( $timestamp, $scope, $value, $action, $tw, $maxItems );

 php
$api->addBlacklist($productId);

 php
$api->removeBlacklist($productId);