Skip to content

Commit 8a84b93

Browse files
committed
Update README with new Show Customer Package API Endpoint
1 parent 9ed9513 commit 8a84b93

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* [Enable a customer](#enable-a-customer)
3030
* [Disable a customer](#disable-a-customer)
3131
* [List a customer's packages](#list-a-customers-packages)
32+
* [Show a customer's package](#show-a-customers-package)
3233
* [Grant a customer access to a package or edit the limitations](#grant-a-customer-access-to-a-package-or-edit-the-limitations)
3334
* [Revoke access to a package from a customer](#revoke-access-to-a-package-from-a-customer)
3435
* [Regenerate a customer's Composer repository token](#regenerate-a-customers-composer-repository-token)
@@ -107,7 +108,7 @@
107108
* [Validate incoming webhook payloads](#validate-incoming-webhook-payloads)
108109
* [License](#license)
109110

110-
<!-- Added by: glaubinix, at: Thu 13 Jan 2022 13:34:48 GMT -->
111+
<!-- Added by: zanbaldwin, at: Thu 18 Aug 12:50:05 CEST 2022 -->
111112

112113
<!--te-->
113114

@@ -286,6 +287,14 @@ $packages = $client->customers()->listPackages($customerId);
286287
```
287288
Returns an array of customer packages.
288289

290+
#### Show a customer's package
291+
```php
292+
$customerId = 42;
293+
$package = $client->customers()->showPackage($customerId, $packageName);
294+
$accessibleVersions = $package['versions'];
295+
```
296+
Returns a customer's package, including the versions that the customer has been granted access to.
297+
289298
#### Grant a customer access to a package or edit the limitations
290299
```php
291300
$customerId = 42;
@@ -508,7 +517,7 @@ $mirroredRepository = $client->subrepositories()->mirroredRepositories()->add($s
508517
```
509518
Returns a list of added mirrored repositories.
510519

511-
#### Edit the mirroring behaviour of mirrored repository in a subrepository
520+
#### Edit the mirroring behaviour of mirrored repository in a subrepository
512521
```php
513522
$subrepositoryName = 'subrepository';
514523
$mirroredRepositoryId = 42;
@@ -845,7 +854,7 @@ When you create or update a webhook in Private Packagist an optional secret can
845854
$request = /** any Psr7 request */;
846855
$secret = 'webhook-secret';
847856
$webhookSignature = new \PrivatePackagist\ApiClient\WebhookSignature($secret);
848-
$requestSignature = $request->hasHeader('Packagist-Signature') ? $request->getHeader('Packagist-Signature')[0] : null;
857+
$requestSignature = $request->hasHeader('Packagist-Signature') ? $request->getHeader('Packagist-Signature')[0] : null;
849858
$webhookSignature->validate($requestSignature, (string) $request->getBody());
850859
```
851860

0 commit comments

Comments
 (0)