承接 hitmeister/api-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hitmeister/api-sdk

最新稳定版本:1.55.0

Composer 安装命令:

composer require hitmeister/api-sdk

包简介

Kaufland.de onlineshop API SDK for PHP

README 文档

README

Latest Stable Version Coverage Status Total Downloads

The v1 API doesn't exist anymore, and this package is abandoned and no longer maintained. No new versions will be released. The API version 2 is available at this url.

PHP client for Kaufland.de Onlineshop API.

Install

Via Composer

$ composer require hitmeister/api-sdk

Via GitHub

$ git clone git@github.com:hitmeister/api-sdk-php.git

Quickstart

This section will give you a quick overview of the client and how the major functions work.

Create client

Before starting, you will need the API keys from your API settings page. Also please provide the name of your partner solution name to the setUserAgent() field.

Include the autoloader in your main project (if you haven’t already), and instantiate a new client.

require 'vendor/autoload.php';

use Hitmeister\Component\Api\ClientBuilder;

$client = ClientBuilder::create()
	->setClientKey('YOUR_CLIENT_KEY')
	->setClientSecret('YOUR_CLIENT_SECRET')
	->setUserAgent('YOUR_USER_AGENT')
	->build();

Namespaces overview

The client has a number of "namespaces", which generally expose API functionality. The namespaces correspond to the various API endpoints. This is a complete list of namespaces:

Namespace Functionality
attributes() Retrieve the attributes data
categories() Retrieve the categories data
claimMessages() Post messages to the claim DEPRECATED, use ticketMessages
claims() Retrieve and manage the claims DEPRECATED, use tickets
importFiles() To send inventory data for multiple items at once
items() Retrieve the product data
orders() Retrieve the orders data
orderInvoices() Retrieve and manage order invoices data
orderUnits() Retrieve and manage your order units
productData() Upload or change your product data for an EAN
productDataStatus() Retrieve the status of your product data
reports() Generate and retrieve summary reports
returns() Retrieve the returns from your sales
returnUnits() Accept, reject or repair returns from your sales
shipments() Add shipment information to order units
shippingGroups() Retrieve the shipping groups data
status() System status
subscriptions() Push notifications management
ticketMessages() Post messages to the tickets
tickets( ) Manage tickets, i.e. N-to-N relations between order-units and claims
warehouses() Warehouses management
units() To upload inventory data one item at a time

Retrieve the categories data

You can search for categories:

$categories = $client->categories()->find('handy');
foreach ($categories as $category) {
	echo "Category ID: {$category->id_category}\n";
	echo "Category Name: {$category->name}\n";
}

Or get the information about one of them:

$category = $client->categories()->get(1);
echo "Category ID: {$category->id_category}\n";
echo "Category Name: {$category->name}\n";

Retrieve the product data

Search for items:

$items = $client->items()->find('iphone');
foreach ($items as $item) {
	$eans = implode(',', $item->eans);
	echo "Item ID: {$item->id_item}\n";
	echo "Category ID: {$item->id_category}\n";
	echo "Title: {$item->title}\n";
	echo "EANs: {$eans}\n";
}

Also you can find the items by EAN:

$items = $client->items()->findByEan('0885909781652');

Send inventory data

According to the API documentation you have two options:

To upload your product data as CSV file

// Post the task to import your file. You will have the ID of the task.
$importFileId = $client->importFiles()
	->post('http://www.example.com/my_products.csv', 'PRODUCT_FEED');

// Retrieve the information about your task
$data = $client->importFiles()->get($importFileId);
echo "URL: {$data->uri}\n";
echo "Status: {$data->status}\n";

To update a single unit

// $result will be true or false
$result = $client->units()->update(10, ['condition' => 'new']);

Testing

$ composer test

License

The MIT License (MIT). Please see License File for more information.

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

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

它主要适用于以下技术方向: 「api」 「sdk」 「hitmeister」 「real.digital」 「real.de」 「real-digital」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 24
  • Watchers: 13
  • Forks: 28
  • 开发语言: PHP

其他信息

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