|
70 | 70 | * [Delete a package](#delete-a-package) |
71 | 71 | * [List all dependents of a package](#list-all-dependents-of-a-package) |
72 | 72 | * [List all customers with access to a package](#list-all-customers-with-access-to-a-package) |
| 73 | + * [Create a package uploaded file](#create-a-package-uploaded-file) |
| 74 | + * [Create an artifact package](#create-an-artifact-package) |
| 75 | + * [Update an artifact package files](#update-an-artifact-package-files) |
73 | 76 | * [Credential](#credential) |
74 | 77 | * [List an organization's credentials](#list-an-organizations-credentials) |
75 | 78 | * [Show a credential](#show-a-credential) |
|
95 | 98 | * [Validate incoming webhook payloads](#validate-incoming-webhook-payloads) |
96 | 99 | * [License](#license) |
97 | 100 |
|
98 | | -<!-- Added by: glaubinix, at: Mon 6 Jul 2020 14:07:03 BST --> |
| 101 | +<!-- Added by: wissem, at: Tue Jul 14 11:42:54 CEST 2020 --> |
99 | 102 |
|
100 | 103 | <!--te--> |
101 | 104 |
|
@@ -575,6 +578,29 @@ $client->packages()->listCustomers('acme-website/package'); |
575 | 578 | ``` |
576 | 579 | Returns a list of customers with access to the package. |
577 | 580 |
|
| 581 | +#### Create a package uploaded file |
| 582 | + |
| 583 | +```php |
| 584 | +$fileName = 'package1.zip'; // your package archive artifact containing a valid composer.json in root directory |
| 585 | +$file = file_get_contents($fileName); |
| 586 | +$client->packageArtifact()->create($file, 'application/zip', $fileName); |
| 587 | +``` |
| 588 | + |
| 589 | +#### Create an artifact package |
| 590 | + |
| 591 | +```php |
| 592 | +$fileName = 'package1.zip'; |
| 593 | +$file = file_get_contents($fileName); |
| 594 | +$response = $client->packageArtifact()->create($file, 'application/zip', $fileName); |
| 595 | +$artifactId = $response['id']; |
| 596 | +$client->packages()->createArtifactPackage([$artifactId]); |
| 597 | +``` |
| 598 | +#### Update an artifact package files |
| 599 | + |
| 600 | +```php |
| 601 | +$packageUploadedFileIds = [42, 43]; |
| 602 | +$client->packages()->editArtifactPackage('acme-website/package', $packageUploadedFileIds); |
| 603 | +``` |
578 | 604 | ### Credential |
579 | 605 |
|
580 | 606 | #### List an organization's credentials |
|
0 commit comments