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
Jump to file
Failed to load files.
Loading
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 @@ -10,10 +10,10 @@
"base-exception-class-name": "CloudPDFException",
"base-api-exception-class-name": "CloudPDFApiException"
},
"originGitCommit": "a0adb9e77ef16feaef2358d71b247b4f5a98fd23",
"originGitCommit": "81e6a2097d2997ef713a3013668e5eae0e748575",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0-next.1",
"requestedVersion": "3.0.0-next.5",
"ciProvider": "github",
"sdkVersion": "3.0.0-next.1"
"sdkVersion": "3.0.0-next.5"
}
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Instantiate and use the client with the following:
using CloudPDF;

var client = new CloudPDFClient("TOKEN");
await client.Tenants.CreateAsync(new TenantsCreateRequest { Id = "id" });
await client.Shares.ExchangeAsync(new SharesExchangeRequest { ShareToken = "shareToken" });
```

## Exception Handling
Expand All @@ -56,7 +56,7 @@ will be thrown.
using CloudPDF;

try {
var response = await client.Tenants.CreateAsync(...);
var response = await client.Shares.ExchangeAsync(...);
} catch (CloudPDFApiException e) {
System.Console.WriteLine(e.Body);
System.Console.WriteLine(e.StatusCode);
Expand Down Expand Up @@ -99,7 +99,7 @@ Which status codes are retried depends on the `retryStatusCodes` generator confi
Use the `MaxRetries` request option to configure this behavior.

```csharp
var response = await client.Tenants.CreateAsync(
var response = await client.Shares.ExchangeAsync(
...,
new RequestOptions {
MaxRetries: 0 // Override MaxRetries at the request level
Expand All @@ -112,7 +112,7 @@ var response = await client.Tenants.CreateAsync(
The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior.

```csharp
var response = await client.Tenants.CreateAsync(
var response = await client.Shares.ExchangeAsync(
...,
new RequestOptions {
Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s
Expand All @@ -128,7 +128,7 @@ Access raw HTTP response data (status code, headers, URL) alongside parsed respo
using CloudPDF;

// Access raw response data (status code, headers, etc.) alongside the parsed response
var result = await client.Tenants.CreateAsync(...).WithRawResponse();
var result = await client.Shares.ExchangeAsync(...).WithRawResponse();

// Access the parsed data
var data = result.Data;
Expand All @@ -145,7 +145,7 @@ if (headers.TryGetValue("X-Request-Id", out var requestId))
}

// For the default behavior, simply await without .WithRawResponse()
var data = await client.Tenants.CreateAsync(...);
var data = await client.Shares.ExchangeAsync(...);

// .WithRawResponse() also works on streaming endpoints (returns IAsyncEnumerable<T> + RawResponse)
// and on endpoints with no response body (returns RawResponse only).
Expand All @@ -156,7 +156,7 @@ var data = await client.Tenants.CreateAsync(...);
If you would like to send additional headers as part of the request, use the `AdditionalHeaders` request option.

```csharp
var response = await client.Tenants.CreateAsync(
var response = await client.Shares.ExchangeAsync(
...,
new RequestOptions {
AdditionalHeaders = new Dictionary<string, string?>
Expand All @@ -172,7 +172,7 @@ var response = await client.Tenants.CreateAsync(
If you would like to send additional query parameters as part of the request, use the `AdditionalQueryParameters` request option.

```csharp
var response = await client.Tenants.CreateAsync(
var response = await client.Shares.ExchangeAsync(
...,
new RequestOptions {
AdditionalQueryParameters = new Dictionary<string, string>
Expand All @@ -189,7 +189,7 @@ If you would like to send additional body properties as part of the request, use
This is only applied to JSON requests.

```csharp
var response = await client.Tenants.CreateAsync(
var response = await client.Shares.ExchangeAsync(
...,
new RequestOptions {
AdditionalBodyProperties = new Dictionary<string, object>
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": "csharp",
"canonicalVersion": "3.0.0-next.1",
"sdkVersion": "3.0.0-next.1",
"canonicalVersion": "3.0.0-next.5",
"sdkVersion": "3.0.0-next.5",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "6858ce7912e9063d8fb171ade95fc473db01c5971a3af241a612dda79cc05100",
"gitCommit": "a0adb9e77ef16feaef2358d71b247b4f5a98fd23",
"openapiSha256": "e86b3f1766a77c28cb782a6513b5a86998668cd4e688e5b5ac27342e58637cd7",
"gitCommit": "81e6a2097d2997ef713a3013668e5eae0e748575",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
Loading
Loading