Skip to content

Commit 4a7875c

Browse files
committed
Update readme
1 parent 39a193a commit 4a7875c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ You can use multiple client credentials
4040
4141
```yaml
4242
balikobot:
43+
default_connection: 'client2'
4344
connections:
4445
client1:
4546
api_user: '%env(resolve:BALIKOBOT_API_USER_1)%'
@@ -52,7 +53,9 @@ balikobot:
5253
api_key: '%env(resolve:BALIKOBOT_API_KEY_3)%'
5354
```
5455
55-
Then use `ServiceContainerRegistry` to get `ServiceContainer` for given connection.
56+
## Usage
57+
58+
Use `ServiceContainerRegistry` to get `ServiceContainer` for given connection.
5659

5760
```php
5861
/** @var Inspirum\Balikobot\Service\Registry\ServiceContainerRegistry $registry */
@@ -64,6 +67,17 @@ $packageService = $registry->get()->getPackageService();
6467
$packageService = $registry->get('client3')->getBranchService();
6568
```
6669

70+
or use services directly for default connection
71+
72+
```php
73+
/** @var Inspirum\Balikobot\Service\PackageService $packageService */
74+
$packageService->addPackages(...)
75+
76+
/** @var Inspirum\Balikobot\Service\BranchService $branchService */
77+
$branchService->getBranches(...)
78+
```
79+
80+
6781
## Contributing
6882

6983
Please see [CONTRIBUTING][link-contributing] and [CODE_OF_CONDUCT][link-code-of-conduct] for details.

0 commit comments

Comments
 (0)