定制 ntoklo/ntokloapi-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ntoklo/ntokloapi-php

最新稳定版本:1.0.5

Composer 安装命令:

composer require ntoklo/ntokloapi-php

包简介

API connector for ntoklo recommendations engine

README 文档

README

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

Installation

Composer

$ composer require ntoklo/ntokloapi-php

Usage

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

Examples

Events

Events API allows customers to send nToklo user activity. Click here for more info on Events

$api->postEvent( $array );

Add Products

Add a new product to the Ntoklo API Click here for more info on posting product

$api->postProduct( $array );

Get product

Get a product by ID Click here for more info on getting product by Id

$api->getProduct( $productId );

Recommendations

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

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

Add to blacklist Click here for more info on adding product to blacklist

$api->addBlacklist($productId);

Remove from blacklist

Remove from blacklist Click here for more info on removing product from blacklist

$api->removeBlacklist($productId);

Get blacklist product

Gettin all blacklisted product Click here for more info on getting blacklisted products

$api->fetchBlacklist();

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

License

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

Copyright

Copyright 2015 nToklo Ltd.

统计信息

  • 总下载量: 28
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2015-07-30