File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,23 +21,15 @@ composer require orgmanager/orgmanager-api
2121You must pass a Guzzle client and the API token to the constructor of ` OrgManager\ApiClient\OrgManager ` .
2222
2323``` php
24- $client = new \GuzzleHttp\Client();
25-
26- $token = 'YOUR_ORGMANAGER_API_TOKEN';
27-
28- $orgmanager = new \OrgManager\ApiClient\OrgManager($client, $token);
24+ $orgmanager = new \OrgManager\ApiClient\OrgManager('YOUR_ORGMANAGER_API_TOKEN');
2925```
3026
3127or you can skip the token and use the ` connect() ` method later
3228
3329``` php
34- $client = new \GuzzleHttp\Client();
35-
36- $token = 'YOUR_ORGMANAGER_API_TOKEN';
30+ $orgmanager = new \OrgManager\ApiClient\OrgManager();
3731
38- $orgmanager = new \OrgManager\ApiClient\OrgManager($client);
39-
40- $orgmanager->connect($token);
32+ $orgmanager->connect('YOUR_ORGMANAGER_API_TOKEN');
4133```
4234
4335### Get User info
@@ -82,6 +74,20 @@ $orgmanager->regenerateToken($set);
8274```
8375where ` $set ` is false if you don't want to use the new token on future requests.
8476
77+ ### Get the Guzzle Client
78+
79+ ``` php
80+ $orgmanager->getClient();
81+ ```
82+
83+ ### Set the Guzzle Client
84+
85+ ``` php
86+ $client = new \GuzzleHttp\Client(); // Example Guzzle client
87+ $orgmanager->setClient($client);
88+ ```
89+ where $client is an instance of ` \GuzzleHttp\Client ` .
90+
8591## Changelog
8692
8793Please see [ CHANGELOG] ( CHANGELOG.md ) for more information what has changed recently.
You can’t perform that action at this time.
0 commit comments