hitmeister/api-sdk
最新稳定版本:1.55.0
Composer 安装命令:
composer require hitmeister/api-sdk
包简介
Kaufland.de onlineshop API SDK for PHP
关键字:
README 文档
README
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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hitmeister/api-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PHP Client for the Kaufland/REAL.de API
A PSR-7 compatible library for making CRUD API endpoints
A PHP Client for the Kaufland API
A lightweight plain-PHP framework for database-backed CRUD APIs.
Modern, strongly-typed, PSR-compliant PHP client for the WeFact v2 API.
PHP SDK for the Enconvert file conversion API
统计信息
- 总下载量: 118.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 24
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-09