Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"homepage": "https://www.cloudpdf.com"
}
},
"originGitCommit": "b7dddfba5011349a40db7878b5cbc8685b2d42cf",
"originGitCommit": "c6f87eecf9636e7ef367946a7fd7f3729401ce90",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0-alpha.14",
"requestedVersion": "3.0.0-alpha.15",
"ciProvider": "github",
"sdkVersion": "3.0.0-alpha.14"
"sdkVersion": "3.0.0-alpha.15"
}
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,21 @@ Instantiate and use the client with the following:
namespace Example;

use CloudPDF\CloudPDFClient;
use CloudPDF\Shares\Requests\SharesExchangeRequest;
use CloudPDF\Doc\Requests\DocChangesRequest;
use CloudPDF\Doc\Types\DocChangesRequestChangesItem;

$client = new CloudPDFClient(
token: '<token>',
);
$client->shares->exchange(
new SharesExchangeRequest([
'shareToken' => 'shareToken',
$client->doc->changes(
'docId',
'layerName',
new DocChangesRequest([
'changes' => [
new DocChangesRequestChangesItem([
'opId' => 'opId',
]),
],
]),
);

Expand All @@ -59,7 +66,7 @@ use CloudPDF\Exceptions\CloudPDFApiException;
use CloudPDF\Exceptions\CloudPDFException;

try {
$response = $client->shares->exchange(...);
$response = $client->doc->changes(...);
} catch (CloudPDFApiException $e) {
echo 'API Exception occurred: ' . $e->getMessage() . "\n";
echo 'Status Code: ' . $e->getCode() . "\n";
Expand Down Expand Up @@ -118,7 +125,7 @@ The `retryStatusCodes` configuration controls which [5XX](https://developer.mozi
Use the `maxRetries` request option to configure this behavior.

```php
$response = $client->shares->exchange(
$response = $client->doc->changes(
...,
options: [
'maxRetries' => 0 // Override maxRetries at the request level
Expand All @@ -131,7 +138,7 @@ $response = $client->shares->exchange(
The SDK defaults to a 30 second timeout. Use the `timeout` option to configure this behavior.

```php
$response = $client->shares->exchange(
$response = $client->doc->changes(
...,
options: [
'timeout' => 3.0 // Override timeout at the request level
Expand Down
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "php",
"canonicalVersion": "3.0.0-next.14",
"sdkVersion": "3.0.0-alpha.14",
"canonicalVersion": "3.0.0-next.15",
"sdkVersion": "3.0.0-alpha.15",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "188ea071e3534971638ee3d1fb1f19c77f36e04b2a783f5eefdbe67326527ea6",
"gitCommit": "b7dddfba5011349a40db7878b5cbc8685b2d42cf",
"openapiSha256": "9d70deca638cc7a80b0e670ec47fc45710d6603eb8f493d5fac95a38d7e5f8b3",
"gitCommit": "c6f87eecf9636e7ef367946a7fd7f3729401ce90",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
Loading
Loading