You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2025. It is now read-only.
Repository navigation
Commit 9296bd8
Browse filesBrowse the repository at this point in the historyBrowse files
* client should only use a http client
* refactor job repoisitory
* refactor pricing and eta repository
* update to version 3.0.0
* update readme
* Update README.md
* Update README.md
* reset old notation
$api_client_secret = '681ae68635c7aadef5cd1jdng8ef357a808cd9dc794811296446f19268d48fcd'; // can be found here: https://admin-sandbox.stuart.com/client/api
35
35
$authenticator = new \Stuart\Infrastructure\Authenticator($environment, $api_client_id, $api_client_secret);
36
36
37
-
$client = new \Stuart\Client($authenticator);
37
+
$httpClient = new \Stuart\Infrastructure\HttpClient($authenticator)
38
+
39
+
$client = new \Stuart\Client($httpClient);
38
40
```
39
41
40
-
You can also pass your own Guzzle client instance to the `\Stuart\Client` constructor:
42
+
You can also pass your own Guzzle client instance to the `\Stuart\HttpClient` constructor:
41
43
42
44
```php
43
45
$guzzleClient = new \Guzzle\Client();
44
-
$client = new \Stuart\Client($authenticator, $guzzleClient);
46
+
$httpClient = new \Stuart\Infrastructure\HttpClient($authenticator, $guzzleClient);
45
47
```
46
48
47
-
This can be useful if you need to attach middlewares to the Guzzle client used by the Stuart client.
49
+
This can be useful if you need to attach middlewares to the Guzzle client.
48
50
49
51
### Create a Job
50
52
@@ -332,13 +334,6 @@ You can also send requests on your own without relying on the `\Stuart\Client`.
332
334
It allows you to use endpoints that are not yet available on the `\Stuart\Client` and enjoy the `\Stuart\Authenticator`.
$api_client_id = '65176d7a1f4e734f6723hd690825f166f8dadf69fb40af52fffdeac4593e4bc'; // can be found here: https://admin-sandbox.stuart.com/client/api
337
-
$api_client_secret = '681ae68635c7aadef5cd1jdng8ef357a808cd9dc794811296446f19268d48fcd'; // can be found here: https://admin-sandbox.stuart.com/client/api
338
-
$authenticator = new \Stuart\Infrastructure\Authenticator($environment, $api_client_id, $api_client_secret);
339
-
340
-
$httpClient = new \Stuart\Infrastructure\HttpClient($this->authenticator);
0 commit comments