定制 ecommercebox/actionml 二次开发

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

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

ecommercebox/actionml

Composer 安装命令:

composer require ecommercebox/actionml

包简介

ActionML Harness API PHP Client

README 文档

README

Build Status

Prerequisites

Note: This SDK only supports ActionML version 0.6 or higher.

Getting Started

The easiest way to install ActionML PHP client is to use Composer.

  1. actionml is available on Packagist and can be installed using Composer:

     composer require ecommercebox/actionml
    
  2. Include Composer's autoloader in your PHP code

     require_once("vendor/autoload.php");
    

Usage

This package is a web service client based on Guzzle. A few quick examples are shown below.

Instantiate ActionML API Event Client

use actionml\EventClient;
$engineId = 'test_ur';
$client = new EventClient($engineId, 'http://localhost:9090');

Set a User Record from Your App

// assume you have a user with user ID 5
$response = $client->setUser(5);

Set an Item Record from Your App

// assume you have a book with ID 'bookId1' and we assign 1 as the type ID for book
$response = $client->setItem('bookId1', array('itypes' => 1));

Import a User Action (View) form Your App

// assume this user has viewed this book item
$client->recordUserActionOnItem('view', 5, 'bookId1');

Retrieving Prediction Result

// assume you have created an itemrank engine on localhost:9090
// we try to get ranking of 5 items (item IDs: 1, 2, 3, 4, 5) for a user (user ID 7)

$engineClient = new EngineClient('test_ur');
$response = $engineClient->queryItemSet(aray(7,4,6));

print_r($response);

Bugs and Feature Requests

Use ActionML PHP SDK Issues to report bugs or request new features.

Contributing

Read the Contribute Code page.

License

Apache PredictionIO is under Apache 2 license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-11-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固