Skip to content

Commit 2ebe4bf

Browse files
feat(api): manual updates
1 parent 8aecc6e commit 2ebe4bf

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-911102f2eaf3be4b34381f6ba089330bed099bb72eb93667ce2f6e72b5934c8c.yml
3-
openapi_spec_hash: 637ad417a580137914441bd790b04cc2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-0726d89b19f532c7fb92990d688a9bfb5aa4a9a871d64f49d4ba45bac6998e4a.yml
3+
openapi_spec_hash: 9525bb02ab496b3459a1f93ac50968e3
44
config_hash: 70f9408b8d1dfbcf262a20d6eed50e1c

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ $client = new Client(
5252
password: getenv("OPTIONAL_IMAGEKIT_IGNORES_THIS") ?: "do_not_set",
5353
);
5454

55-
$response = $client->files->upload(
56-
file: "https://www.example.com/public-url.jpg", fileName: "file-name.jpg"
57-
);
55+
$response = $client->files->upload(file: 'file', fileName: "file-name.jpg");
5856

5957
var_dump($response->videoCodec);
6058
```
@@ -76,9 +74,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
7674
use ImageKit\Core\Exceptions\APIConnectionException;
7775

7876
try {
79-
$response = $client->files->upload(
80-
file: "https://www.example.com/public-url.jpg", fileName: "file-name.jpg"
81-
);
77+
$response = $client->files->upload(file: 'file', fileName: "file-name.jpg");
8278
} catch (APIConnectionException $e) {
8379
echo "The server could not be reached", PHP_EOL;
8480
var_dump($e->getPrevious());
@@ -126,7 +122,7 @@ $client = new Client(maxRetries: 0);
126122
// Or, configure per-request:
127123

128124
$result = $client->files->upload(
129-
file: "https://www.example.com/public-url.jpg",
125+
file: 'file',
130126
fileName: "file-name.jpg",
131127
requestOptions: RequestOptions::with(maxRetries: 5),
132128
);
@@ -148,7 +144,7 @@ Note: the `extra*` parameters of the same name overrides the documented paramete
148144
use ImageKit\RequestOptions;
149145

150146
$response = $client->files->upload(
151-
file: "https://www.example.com/public-url.jpg",
147+
file: 'file',
152148
fileName: "file-name.jpg",
153149
requestOptions: RequestOptions::with(
154150
extraQueryParams: ["my_query_parameter" => "value"],

0 commit comments

Comments
 (0)