定制 findologic/findologic-api 二次开发

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

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

findologic/findologic-api

Composer 安装命令:

composer require findologic/findologic-api

包简介

Library for FINDOLOGIC API requests

README 文档

README

Tests codecov Packagist

Synopsis

FINDOLOGIC-API is an object oriented wrapper for the Findologic API, with over 300 automated unit-tests and 100% code coverage.

This library not only helps requesting the Findologic API, but also getting data from the response and mapping them to corresponding objects. You won't have to mess around with sending requests and getting the data from the Findologic's response anymore.

You want to get filters? Just call Response::getMainFilters(). It really is that simple, just try out the Basic Usage or see some Examples.

To have a better understanding about the API, please make sure to read the general Findologic API documentation. We already got you covered with quicklinks to it:

Limitations

Currently, we support the following response formats:

Response Type Format Version Supported End of life
Search/Navigation JSON 1.0 ✔️ Not in the foreseeable future
XML 2.1 ✔️ Not in the foreseeable future
XML 2.0 ✖️ → Use XML_2.1 instead 2019-10-18
HTML any ✔️ → The response is not parsed Not in the foreseeable future
Smart Suggest JSON 3.0 ✔️ Not in the foreseeable future
Item Update JSON latest ✔️ Not in the foreseeable future

Requirements

Installation

For a simple installation you can use Composer. Using this command will install the latest version.

composer require findologic/findologic-api

Basic usage

The usage is pretty simple. Here is an example:

// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';

use FINDOLOGIC\Api\Config;
use FINDOLOGIC\Api\Client;
use FINDOLOGIC\Api\Requests\Request;
use FINDOLOGIC\Api\Requests\SearchNavigation\SearchRequest;
use FINDOLOGIC\Api\Responses\Json10\Json10Response;

// Set your ServiceId/Shopkey, which can be found in the customer account.
$config = new Config('ABCDABCDABCDABCDABCDABCDABCDABCD');
$client = new Client($config);

/** @var SearchRequest $request */
$request = Request::getInstance(Request::TYPE_SEARCH);
$request->setQuery('shirt') // Users search query.
    ->setShopUrl('blubbergurken.de') // Url of the shop.
    ->setUserIp('127.0.0.1') // Users IP.
    ->setReferer($_SERVER['HTTP_REFERER']) // Page where search was fired.
    ->setRevision('1.0.0') // Version of your API wrapper.
    ->setOutputAdapter('JSON_1.0'); // Optional setting of output format.

/** @var Json10Response $response */
$response = $client->send($request);

var_dump($response->getResult()->getItems()); // Get all products/items.
var_dump($response->getResult()->getMainFilters()); // Get all main filters easily.
var_dump($response->getResult()->getOtherFilters()); // Get all other filters easily.
var_dump($response); // Entire response, full of helper methods.

Examples

  • Working examples can be found in the /examples directory.
  • The documentation can be found in our Project Wiki.

Projects using this library

Bug Report

We need your help! If you find any bug, please submit an issue and use our template! Be as precise as possible so we can reproduce your case easier. For further information, please refer to our issue template at .github/ISSUE_TEMPLATE/bug_report.md.

Contributing

Please check our contribution guide on how to contribute.

findologic/findologic-api 适用场景与选型建议

findologic/findologic-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 106.74k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 07 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 findologic/findologic-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 findologic/findologic-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 findologic/findologic-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-05