mediaman / module-wishlist-api
此包已被弃用且不再维护。未建议替代包。
提供与愿望清单模块交互的API的Magento 2模块。
1.0.1
2017-06-19 08:50 UTC
Requires
- php: >=7.0
- magento/framework: 100.*
- magento/module-integration: 100.*
Requires (Dev)
- phpstan/phpstan: ^0.7.0
- phpunit/phpunit: 4.1.0
- squizlabs/php_codesniffer: ^3.0
This package is not auto-updated.
Last update: 2020-01-23 10:09:34 UTC
README
添加与Magento2愿望清单交互的API。
入门指南
通过composer安装模块
$ composer require "mediaman/module-wishlist-api: 1.*"
启用模块
$ ./bin/magento module:enable Mediaman_WishlistApi
升级您的Magento数据库模式
$ ./bin/magento setup:upgrade
用法
该模块添加了三个新的API端点,允许您与Magento 2愿望清单进行交互。
如果没有可用的客户会话,则通过客户令牌接收当前客户。
GET /rest/V1/wishlist
获取用户的愿望清单。
示例
$ curl -X GET http://magento.example.com/rest/V1/wishlist --header "Authorization: Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"
PUT /rest/V1/wishlist/:sku
将产品添加到用户的愿望清单。
示例
$ curl -X PUT http://magento.example.com/rest/V1/wishlist/24-MB01 --header "Authorization: Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"
DELETE /rest/V1/wishlist/:itemId
从用户的愿望清单中删除一个项目。
示例
$ curl -X DELETE http://magento.example.com/rest/V1/wishlist/1 --header "Authorization: Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"
许可证
MIT © mediaman GmbH