fond-of-spryker/product-api
最新稳定版本:1.2.1
Composer 安装命令:
composer require fond-of-spryker/product-api
包简介
Extends the Base Spryker Product Api Modulegit initgit init
README 文档
README
ProductApi extends the Base Spryker Product Api Module:
- the update and get calls are using the SKU of a product instead of the Abstract Product ID
- touch Abstract Product on create
Installation
composer require fond-of-spryker/product-api
use rewritten "ProductApiResourcePlugin" class in Pyz ApiDenpendencyProvider
use FondOfSpryker\Zed\ProductApi\Communication\Plugin\Api\ProductApiResourcePlugin;
instead of "use Spryker\Zed\Api\ApiDependencyProvider as SprykerApiDependencyProvider;"
API
GET /api/rest/products/{sku}
curl -X GET "http://zed.yourdomain.com/api/rest/products/{sku}" \
-H 'Content-Type: application/json' \
POST /api/rest/products/
curl -X POST "http://zed.yourdomain.com/api/rest/products/" \
-H 'Content-Type: application/json' \
-d $'{
"data": {
"sku": "sku",
"id_tax_set": 1,
"name": "Name",
"fk_locale": "en_US",
"attributes" : {
"attribute": "value"
},
"localized_attributes": [
{
"name": "Name",
"description": "Description",
"meta_description": "Meta Description",
"attributes": {
},
"locale": {
"id_locale": 46,
"locale_name": "en_US",
"is_active": true
}
}
]
}
}'
PATCH /api/rest/products/{sku}
curl -X PATCH "http://zed.yourdomain.com/api/rest/products/{sku}" \
-H 'Content-Type: application/json' \
-d $'{
"data": {
"sku": "sku",
"id_tax_set": 1,
"name": "Name",
"fk_locale": "en_US",
"attributes" : {
"attribute": "value"
},
"localized_attributes": [
{
"name": "Name",
"description": "Description",
"meta_description": "Meta Description",
"attributes": {
},
"locale": {
"id_locale": 46,
"locale_name": "en_US",
"is_active": true
}
}
]
}
}'
统计信息
- 总下载量: 23.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-16