@@ -21,9 +21,9 @@ public function login($email, $password, $twoFactorAuthenticationToken = null)
21
21
{
22
22
try {
23
23
return $ this ->request ('post ' , '/api/login ' , [
24
- 'host ' => gethostname (),
25
- 'email ' => $ email ,
26
- 'password ' => $ password ,
24
+ 'host ' => gethostname (),
25
+ 'email ' => $ email ,
26
+ 'password ' => $ password ,
27
27
'two_factor_token ' => $ twoFactorAuthenticationToken ,
28
28
])['access_token ' ];
29
29
} catch (ClientException $ e ) {
@@ -102,7 +102,7 @@ public function teamMembers()
102
102
public function addTeamMember ($ email , array $ permissions )
103
103
{
104
104
$ this ->requestWithErrorHandling ('post ' , '/api/teams/ ' .Helpers::config ('team ' ).'/members ' , [
105
- 'email ' => $ email ,
105
+ 'email ' => $ email ,
106
106
'permissions ' => $ permissions ,
107
107
]);
108
108
}
@@ -232,7 +232,7 @@ public function createZone($providerId, $zone)
232
232
{
233
233
return $ this ->requestWithErrorHandling ('post ' , '/api/teams/ ' .Helpers::config ('team ' ).'/zones ' , [
234
234
'cloud_provider_id ' => $ providerId ,
235
- 'zone ' => $ zone ,
235
+ 'zone ' => $ zone ,
236
236
]);
237
237
}
238
238
@@ -270,8 +270,8 @@ public function records($zoneId)
270
270
public function createRecord ($ zoneId , $ type , $ name , $ value )
271
271
{
272
272
return $ this ->requestWithErrorHandling ('put ' , '/api/zones/ ' .$ zoneId .'/records ' , [
273
- 'type ' => $ type ,
274
- 'name ' => $ name ,
273
+ 'type ' => $ type ,
274
+ 'name ' => $ name ,
275
275
'value ' => $ value ,
276
276
]);
277
277
}
@@ -323,9 +323,9 @@ public function network($networkId)
323
323
public function createNetwork ($ providerId , $ name , $ region , $ withInternetAccess )
324
324
{
325
325
$ this ->requestWithErrorHandling ('post ' , '/api/teams/ ' .Helpers::config ('team ' ).'/networks ' , [
326
- 'cloud_provider_id ' => $ providerId ,
327
- 'name ' => $ name ,
328
- 'region ' => $ region ,
326
+ 'cloud_provider_id ' => $ providerId ,
327
+ 'name ' => $ name ,
328
+ 'region ' => $ region ,
329
329
'with_internet_access ' => $ withInternetAccess ,
330
330
]);
331
331
}
@@ -399,12 +399,12 @@ public function database($databaseId)
399
399
public function createDatabase ($ networkId , $ name , $ type , $ instanceClass , $ storage , $ public , $ pause = false )
400
400
{
401
401
return $ this ->requestWithErrorHandling ('post ' , '/api/networks/ ' .$ networkId .'/databases ' , [
402
- 'name ' => $ name ,
403
- 'type ' => $ type ,
402
+ 'name ' => $ name ,
403
+ 'type ' => $ type ,
404
404
'instance_class ' => $ instanceClass ,
405
- 'storage ' => $ storage ,
406
- 'public ' => $ public ,
407
- 'pause ' => $ pause ,
405
+ 'storage ' => $ storage ,
406
+ 'public ' => $ public ,
407
+ 'pause ' => $ pause ,
408
408
]);
409
409
}
410
410
@@ -420,7 +420,7 @@ public function scaleDatabase($databaseId, $instanceClass, $storage)
420
420
{
421
421
$ this ->requestWithErrorHandling ('put ' , '/api/databases/ ' .$ databaseId .'/size ' , [
422
422
'instance_class ' => $ instanceClass ,
423
- 'storage ' => $ storage ,
423
+ 'storage ' => $ storage ,
424
424
]);
425
425
}
426
426
@@ -507,7 +507,7 @@ public function rotateDatabasePassword($databaseId)
507
507
public function restoreDatabase ($ databaseId , $ name , $ restoreTo )
508
508
{
509
509
return $ this ->requestWithErrorHandling ('post ' , '/api/restored-databases?database_id= ' .$ databaseId , [
510
- 'name ' => $ name ,
510
+ 'name ' => $ name ,
511
511
'restore_to ' => $ restoreTo ,
512
512
]);
513
513
}
@@ -585,8 +585,8 @@ public function cache($cacheId)
585
585
public function createCache ($ networkId , $ name , $ type , $ instanceClass )
586
586
{
587
587
return $ this ->requestWithErrorHandling ('post ' , '/api/networks/ ' .$ networkId .'/caches ' , [
588
- 'name ' => $ name ,
589
- 'type ' => $ type ,
588
+ 'name ' => $ name ,
589
+ 'type ' => $ type ,
590
590
'instance_class ' => $ instanceClass ,
591
591
]);
592
592
}
@@ -734,9 +734,9 @@ public function requestCertificate($providerId, $domain, array $alternativeNames
734
734
{
735
735
$ this ->requestWithErrorHandling ('post ' , '/api/teams/ ' .Helpers::config ('team ' ).'/certificates ' , [
736
736
'cloud_provider_id ' => $ providerId ,
737
- 'domain ' => $ domain ,
737
+ 'domain ' => $ domain ,
738
738
'alternative_names ' => $ alternativeNames ,
739
- 'region ' => $ region ,
739
+ 'region ' => $ region ,
740
740
'validation_method ' => $ validationMethod ,
741
741
]);
742
742
}
@@ -1024,12 +1024,12 @@ public function createArtifact(
1024
1024
$ coreVersion = null
1025
1025
) {
1026
1026
$ artifact = $ this ->requestWithErrorHandling ('post ' , '/api/projects/ ' .$ projectId .'/artifacts/ ' .$ environment , [
1027
- 'uuid ' => $ uuid ,
1028
- 'commit ' => $ commit ,
1027
+ 'uuid ' => $ uuid ,
1028
+ 'commit ' => $ commit ,
1029
1029
'commit_message ' => $ commitMessage ,
1030
- 'vendor_hash ' => $ vendorHash ,
1031
- 'cli_version ' => $ cliVersion ,
1032
- 'core_version ' => $ coreVersion ,
1030
+ 'vendor_hash ' => $ vendorHash ,
1031
+ 'cli_version ' => $ cliVersion ,
1032
+ 'core_version ' => $ coreVersion ,
1033
1033
'uses_container_image ' => is_null ($ file ),
1034
1034
]);
1035
1035
@@ -1123,8 +1123,8 @@ public function deployment($deploymentId)
1123
1123
public function validateManifest ($ projectId , $ environment , array $ manifest , $ cliVersion = null , $ coreVersion = null )
1124
1124
{
1125
1125
$ this ->requestWithErrorHandling ('post ' , '/api/projects/ ' .$ projectId .'/environments/ ' .$ environment .'/linted-manifest ' , [
1126
- 'manifest ' => $ manifest ,
1127
- 'cli_version ' => $ cliVersion ,
1126
+ 'manifest ' => $ manifest ,
1127
+ 'cli_version ' => $ cliVersion ,
1128
1128
'core_version ' => $ coreVersion ,
1129
1129
]);
1130
1130
}
@@ -1450,10 +1450,10 @@ protected function request($method, $uri, array $json = [], $tries = 0)
1450
1450
protected function requestWithoutErrorHandling ($ method , $ uri , array $ json = [])
1451
1451
{
1452
1452
return json_decode ((string ) $ this ->client ()->request ($ method , ltrim ($ uri , '/ ' ), [
1453
- 'json ' => $ json ,
1453
+ 'json ' => $ json ,
1454
1454
'headers ' => [
1455
- 'Accept ' => 'application/json ' ,
1456
- 'Content-Type ' => 'application/json ' ,
1455
+ 'Accept ' => 'application/json ' ,
1456
+ 'Content-Type ' => 'application/json ' ,
1457
1457
'Authorization ' => 'Bearer ' .Helpers::config ('token ' , $ _ENV ['VAPOR_API_TOKEN ' ] ?? getenv ('VAPOR_API_TOKEN ' ) ?? null ),
1458
1458
],
1459
1459
])->getBody (), true );
0 commit comments