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

Commit d9898c0

Browse files
ahinkleJean Carlos Farias
andcommitted
Formatting
Co-Authored-By: Jean Carlos Farias <contato@jeancf.com.br>
1 parent b508f87 commit d9898c0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,20 @@ $response->ok() : bool;
7777

7878
> Will throw an exception on >500 errors.
7979
80-
Use the wrapper for multiple shops, without needing to publish config or setting environment variables::
80+
You may also utilize the constructor directly without having to configure environment variables:
8181

8282
```php
8383
use Grayloon\Magento\Magento;
8484

85-
$magento = new Magento('https://myshop.url', 'token', 'V1', 'basePath', 'storeCode');
86-
$response = $magento->api('products')->all();
85+
$magento = new Magento(
86+
$baseUrl = 'https://my-magneto-shop.com',
87+
$token = 'client_access_token',
88+
$version = 'V1',
89+
$basePath = 'rest',
90+
$storeCode = 'default'
91+
);
8792

93+
$response = $magento->api('products')->all();
8894
```
8995

9096
## Available Methods:
@@ -352,7 +358,7 @@ Magento::api('my-custom-endpoint')->get('get/1');
352358

353359
Get a schema blueprint of the Magento 2 REST API:
354360
```php
355-
Magento::api('schema')->show();
361+
Magento::api('schema')->show();
356362
```
357363

358364
### Source Items (inventoryApiSourceItemRepositoryV1)

0 commit comments

Comments
 (0)