PHPackages                             ntoklo/ntokloapi-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ntoklo/ntokloapi-php

ActiveLibrary[API Development](/categories/api)

ntoklo/ntokloapi-php
====================

API connector for ntoklo recommendations engine

1.0.5(10y ago)128Apache-2.0PHPPHP &gt;=5.5

Since Aug 21Pushed 8y ago3 watchersCompare

[ Source](https://github.com/nToklo/ntokloapi-php)[ Packagist](https://packagist.org/packages/ntoklo/ntokloapi-php)[ Docs](https://github.com/ntoklo/ntokloapi-php)[ RSS](/packages/ntoklo-ntokloapi-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

nToklo API PHP connector
========================

[](#ntoklo-api-php-connector)

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](https://docs.ntoklo.com)

Installation
------------

[](#installation)

### Composer

[](#composer)

```
$ composer require ntoklo/ntokloapi-php
```

### Usage

[](#usage)

You can see how to use this library on the [documentation](http://ntokloapi-php.readthedocs.org/en/latest/)

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');
```

### Examples

[](#examples)

#### Events

[](#events)

Events API allows customers to send nToklo user activity. [Click here for more info on Events](http://docs.ntoklo.com/start.php/api_reference:events)

```
$api->postEvent( $array );
```

#### Add Products

[](#add-products)

Add a new product to the Ntoklo API [Click here for more info on posting product](http://docs.ntoklo.com/start.php/api_reference:products)

```
$api->postProduct( $array );
```

#### Get product

[](#get-product)

Get a product by ID [Click here for more info on getting product by Id](http://docs.ntoklo.com/start.php/api_reference:products)

```
$api->getProduct( $productId );
```

#### Recommendations

[](#recommendations)

Recommendations API allows customers to retrieve recommendations based on user history and product attributes [Click here for more info on recommendations](http://docs.ntoklo.com/start.php/api_reference:recommendations)

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

#### Charts

[](#charts)

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](http://docs.ntoklo.com/start.php/api_reference:charts)

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

#### Add to blacklist

[](#add-to-blacklist)

Add to blacklist [Click here for more info on adding product to blacklist](http://docs.ntoklo.com/start.php/api_reference:blacklist)

```
$api->addBlacklist($productId);
```

#### Remove from blacklist

[](#remove-from-blacklist)

Remove from blacklist [Click here for more info on removing product from blacklist](http://docs.ntoklo.com/start.php/api_reference:blacklist)

```
$api->removeBlacklist($productId);
```

#### Get blacklist product

[](#get-blacklist-product)

Gettin all blacklisted product [Click here for more info on getting blacklisted products](http://docs.ntoklo.com/start.php/api_reference:blacklist)

```
$api->fetchBlacklist();
```

Features
--------

[](#features)

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();

Authors
-------

[](#authors)

- Fu Hoang

License
-------

[](#license)

This library is licensed under the Apache 2.0 license. See LICENSE for more details

Copyright
---------

[](#copyright)

Copyright 2015 nToklo Ltd.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

6

Last Release

3883d ago

PHP version history (2 changes)1.0.3PHP &gt;=5.6

1.0.5PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0fbb88d2541482e74ddf0248bb5765e7bf1269c13712d7f1b21d95d83e40ae2?d=identicon)[fu.ntoklo](/maintainers/fu.ntoklo)

---

Top Contributors

[![fuhoang](https://avatars.githubusercontent.com/u/607496?v=4)](https://github.com/fuhoang "fuhoang (3 commits)")[![ovidiu-beldie](https://avatars.githubusercontent.com/u/1387097?v=4)](https://github.com/ovidiu-beldie "ovidiu-beldie (1 commits)")

---

Tags

apiconnectorrecommendationsntoklo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ntoklo-ntokloapi-php/health.svg)

```
[![Health](https://phpackages.com/badges/ntoklo-ntokloapi-php/health.svg)](https://phpackages.com/packages/ntoklo-ntokloapi-php)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)[akeneo/magento-connector-bundle

Akeneo PIM bundle to export to Magento platform

582.2k](/packages/akeneo-magento-connector-bundle)[bmeme/eventbrite_connector

PHP Library for integration with Eventbrite API v3

151.1k](/packages/bmeme-eventbrite-connector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
