Skip to content

Commit 333c06b

Browse files
feat(api): manual updates
1 parent 2d65a57 commit 333c06b

17 files changed

+36
-36
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-d1a3e6dfc45ae832b6b14a0aef25878985c679fa9f48c1470df188b1578ba648.yml
33
openapi_spec_hash: 1d382866fce3284f26d341f112988d9d
4-
config_hash: 54c05a157f2cc730fac9e1df5dc3ca29
4+
config_hash: 29a2351fe2be89392b15719be8bc964f

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Parameters with a default value must be set by name.
4848
use ImageKit\Client;
4949

5050
$client = new Client(
51-
privateAPIKey: getenv("IMAGEKIT_PRIVATE_API_KEY") ?: "My Private API Key",
51+
privateKey: getenv("IMAGEKIT_PRIVATE_API_KEY") ?: "My Private Key",
5252
password: getenv("OPTIONAL_IMAGEKIT_IGNORES_THIS") ?: "do_not_set",
5353
);
5454

src/Client.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class Client extends BaseClient
2020
{
21-
public string $privateAPIKey;
21+
public string $privateKey;
2222

2323
public string $password;
2424

@@ -65,12 +65,12 @@ class Client extends BaseClient
6565
public WebhooksService $webhooks;
6666

6767
public function __construct(
68-
?string $privateAPIKey = null,
68+
?string $privateKey = null,
6969
?string $password = null,
7070
?string $baseUrl = null,
7171
) {
72-
$this->privateAPIKey = (string) (
73-
$privateAPIKey ?? getenv('IMAGEKIT_PRIVATE_API_KEY')
72+
$this->privateKey = (string) (
73+
$privateKey ?? getenv('IMAGEKIT_PRIVATE_API_KEY')
7474
);
7575
$this->password = (string) (
7676
$password ?? getenv('OPTIONAL_IMAGEKIT_IGNORES_THIS') ?: 'do_not_set'
@@ -110,12 +110,12 @@ public function __construct(
110110
/** @return array<string, string> */
111111
protected function authHeaders(): array
112112
{
113-
if (!$this->privateAPIKey && !$this->password) {
113+
if (!$this->privateKey && !$this->password) {
114114
return [];
115115
}
116116

117117
$base64_credentials = base64_encode(
118-
"{$this->privateAPIKey}:{$this->password}"
118+
"{$this->privateKey}:{$this->password}"
119119
);
120120

121121
return ['Authorization' => "Basic {$base64_credentials}"];

tests/Services/Accounts/OriginsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ protected function setUp(): void
2222

2323
$testUrl = getenv('TEST_API_BASE_URL') ?: 'http://127.0.0.1:4010';
2424
$client = new Client(
25-
privateAPIKey: 'My Private API Key',
25+
privateKey: 'My Private Key',
2626
password: 'My Password',
27-
baseUrl: $testUrl,
27+
baseUrl: $testUrl
2828
);
2929

3030
$this->client = $client;

tests/Services/Accounts/URLEndpointsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ protected function setUp(): void
2222

2323
$testUrl = getenv('TEST_API_BASE_URL') ?: 'http://127.0.0.1:4010';
2424
$client = new Client(
25-
privateAPIKey: 'My Private API Key',
25+
privateKey: 'My Private Key',
2626
password: 'My Password',
27-
baseUrl: $testUrl,
27+
baseUrl: $testUrl
2828
);
2929

3030
$this->client = $client;

tests/Services/Accounts/UsageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ protected function setUp(): void
2222

2323
$testUrl = getenv('TEST_API_BASE_URL') ?: 'http://127.0.0.1:4010';
2424
$client = new Client(
25-
privateAPIKey: 'My Private API Key',
25+
privateKey: 'My Private Key',
2626
password: 'My Password',
27-
baseUrl: $testUrl,
27+
baseUrl: $testUrl
2828
);
2929

3030
$this->client = $client;

tests/Services/AssetsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ protected function setUp(): void
2222

2323
$testUrl = getenv('TEST_API_BASE_URL') ?: 'http://127.0.0.1:4010';
2424
$client = new Client(
25-
privateAPIKey: 'My Private API Key',
25+
privateKey: 'My Private Key',
2626
password: 'My Password',
27-
baseUrl: $testUrl,
27+
baseUrl: $testUrl
2828
);
2929

3030
$this->client = $client;

tests/Services/Beta/V2/FilesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ protected function setUp(): void
2222

2323
$testUrl = getenv('TEST_API_BASE_URL') ?: 'http://127.0.0.1:4010';
2424
$client = new Client(
25-
privateAPIKey: 'My Private API Key',
25+
privateKey: 'My Private Key',
2626
password: 'My Password',
27-
baseUrl: $testUrl,
27+
baseUrl: $testUrl
2828
);
2929

3030
$this->client = $client;

tests/Services/Cache/InvalidationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ protected function setUp(): void
2222

2323
$testUrl = getenv('TEST_API_BASE_URL') ?: 'http://127.0.0.1:4010';
2424
$client = new Client(
25-
privateAPIKey: 'My Private API Key',
25+
privateKey: 'My Private Key',
2626
password: 'My Password',
27-
baseUrl: $testUrl,
27+
baseUrl: $testUrl
2828
);
2929

3030
$this->client = $client;

tests/Services/CustomMetadataFieldsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ protected function setUp(): void
2323

2424
$testUrl = getenv('TEST_API_BASE_URL') ?: 'http://127.0.0.1:4010';
2525
$client = new Client(
26-
privateAPIKey: 'My Private API Key',
26+
privateKey: 'My Private Key',
2727
password: 'My Password',
28-
baseUrl: $testUrl,
28+
baseUrl: $testUrl
2929
);
3030

3131
$this->client = $client;

0 commit comments

Comments
 (0)