Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit b7f313c

Browse files
committed
Update readme
1 parent 4f85fca commit b7f313c

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)