This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ A Magento 2 API Object Oriented wrapper for a Laravel application.
2929 - [ Products] ( #products )
3030 - [ Schema] ( #schema )
3131 - [ Source Items] ( #source-items )
32+ - [ Custom modules] (#custom modules)
3233
3334
3435## Installation
@@ -223,6 +224,25 @@ Get info about a product by the product SKU:
223224$magento->api('products')->show($sku);
224225```
225226
227+ ### Custom modules
228+ Magento modules can have their own API endpoints.
229+ For example:
230+ ``` xml
231+ <route method =" POST" url =" /V1/custom/save" >
232+ ...
233+ </route >
234+ <route method =" GET" url =" /V1/custom/get/:id" >
235+ ...
236+ </route >
237+ ```
238+ To use these you can directly use get/post methods:
239+ ``` php
240+ $magento->api('custom')->post('save', [...]);
241+ ```
242+ ``` php
243+ $magento->api('custom')->get('get/1');
244+ ```
245+
226246<a id =" schema " ></a >
227247### Schema
228248
@@ -265,4 +285,4 @@ If you discover any security related issues, please email webmaster@grayloon.com
265285
266286## License
267287
268- The MIT License (MIT). Please see [ License File] ( LICENSE.md ) for more information.
288+ The MIT License (MIT). Please see [ License File] ( LICENSE.md ) for more information.
You can’t perform that action at this time.
0 commit comments