定制 discoverydn/vidora-api-client 二次开发

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

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

discoverydn/vidora-api-client

最新稳定版本:v0.3.3

Composer 安装命令:

composer require discoverydn/vidora-api-client

包简介

A library that wraps the Vidora API

README 文档

README

Vidora is an AI-driven recommendaiton service that allows you to surface content via their API. The intention of this library is to make getting data from Vidora as simple as possible.

Installation

Git

git clone git@github.com:discoverydn/vidora-api-client.git

Composer

composer require discoverydn/vidora-api-client dev-master && composer dumpautoload

Usage

There are two main components: the client and the request. The client uses the request to fetch data from the API. The Vidora API has two main types of requests: Behavioral, which POSTs data and Personalization which GETs data.

example:

$vidoraClient = new \Discoverydn\VidoraApiClient\Client('api-key', 'api-secret');

$request = new \Discoverydn\VidoraApiClient\Requests\Personalization\UserRecommendationsRequest($vidoraClient, 'user-id', ['param1' => 'value1', 'param2' => 'value2']);

$data = $vidoraClient->fetch($request); // {"items": [ {...

Testing

In order to fully test the code, you'll need to add a .env file with the following:

VIDORA_KEY=<your-api-key>
VIDORA_SECRET=<your-api-secret>
VIDORA_TEST_FETCH_CATEGORY=<your-test-category>
VIDORA_TEST_USER_ID=<your-test-user-id>
VIDORA_TEST_ITEM_ID=<your-test-item-id>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-24