Skip to content

Commit 234fc88

Browse files
Update README
1 parent 819868c commit 234fc88

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
@@ -287,13 +287,19 @@ $packages = $client->teams()->packages($teamId);
287287
Returns an array of packages.
288288

289289
#### Grant a team access to a list of private packages
290+
291+
You pass an array of packages to give access to. The values of the array can be either package ID or package name.
292+
290293
```php
291294
$teamId = 1;
292-
$packages = $client->teams()->addPackages($teamId, ['acme-website/package']);
295+
$packages = $client->teams()->addPackages($teamId, ['acme-website/package', 1]);
293296
```
294297
Returns an array of packages.
295298

296299
#### Remove access for a package from a team
300+
301+
You can use the package ID or package name as a reference.
302+
297303
```php
298304
$teamId = 1;
299305
$packages = $client->teams()->removePackage($teamId, 'acme-website/package');
@@ -429,6 +435,9 @@ $packages = $client->customers()->addOrEditPackages($customerId, $packages);
429435
Returns an array of all added or edited customer packages.
430436

431437
#### Revoke access to a package from a customer
438+
439+
You can reference the package by its ID or name.
440+
432441
```php
433442
$customerId = 42;
434443
$packageName = 'acme-website/package';
@@ -533,6 +542,9 @@ $packages = $client->vendorBundles()->packages()->addOrEditPackages($vendorBundl
533542
Returns an array of all added or edited customer packages.
534543

535544
#### Remove a package from a vendor bundle
545+
546+
You can reference the package by its ID or name.
547+
536548
```php
537549
$vendorBundleId = 42;
538550
$packageName = 'acme-website/package';
@@ -772,6 +784,8 @@ $client->subrepositories()->mirroredRepositories()->removePackages($subrepositor
772784

773785
### Package
774786

787+
You can reference a package by its name or ID.
788+
775789
#### List an organization's packages
776790
```php
777791
$filters = [
@@ -784,7 +798,10 @@ Returns an array of packages.
784798

785799
#### Show a package
786800
```php
801+
// Either use package name:
787802
$package = $client->packages()->show('acme-website/package');
803+
// Or the package ID:
804+
$package = $client->packages()->show(123);
788805
```
789806
Returns the package.
790807

@@ -847,6 +864,9 @@ $client->packages()->listDependents('acme-website/package');
847864
Returns a list of packages.
848865

849866
#### List all customers with access to a package
867+
868+
Pass either package ID or package name as argument.
869+
850870
```php
851871
$client->packages()->listCustomers('acme-website/package');
852872
```

0 commit comments

Comments
 (0)