artifacia/artifacia-client-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

artifacia/artifacia-client-php

Composer 安装命令:

composer require artifacia/artifacia-client-php

包简介

A php client to integrate Visual Recommendation feature from Artifacia API.

README 文档

README

This php client is a simple wrapper around our powerful Visual Discovery API.

The wrapper allows you to create your own index of images on which you would like to enhance the product discovery experiences. It also allows you to get various types of recommendations which are listed below.

  • Visual Recommendation
  • Cross Product Recommendation
  • Personalized Recommendation

Installation

To install the package you can follow the steps:-

composer require artifacia/artifacia-client-php

Getting Started

The API is really easy and simple to use. First you need to visit this page and request for username and password. Using that credentials you can create your constructor and get stated.

require __DIR__ . '/vendor/autoload.php';
$api_key = <api_key>;
use Artifacia\Client;
$client = new Client($api_key);

Creating your index

The first step is to create a index of the items that you would like to store in our databases to perform search against. If you don't have data ready right now you can quickly get started with our sample data. Once the data is stored and indexed we will inform you shortly.

$data = file_get_contents("./sample_data.json");
$data_indexing_response = $client->upload_item_data($data);
echo $data_indexing_response;

Performing Visual Recommendation

Once you receive a notification from us about the status of the indexed data, you are ready to search. You can search for a product ID indexed in the sample data you inserted/uploaded. And also you can specify the number of results to be returned as well as set the attribute (like color, pattern, material etc.) if you want to prioritize the result as given below.

$sample_prod_id = 2761;
$num = 4;
$filters = array('color' => 1, 'pattern' => 1);
$query_response = $client->get_visual_recommendation($sample_prod_id, $num, $filters);
echo $query_response;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固