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
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"client_class_name": "CloudPDFClient",
"environment_class_name": "CloudPDFEnvironment"
},
"originGitCommit": "b7dddfba5011349a40db7878b5cbc8685b2d42cf",
"originGitCommit": "c6f87eecf9636e7ef367946a7fd7f3729401ce90",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0a14",
"requestedVersion": "3.0.0a15",
"ciProvider": "github"
}
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,21 @@ Instantiate and use the client with the following:

```python
from cloudpdf import CloudPDFClient
from cloudpdf.doc import DocChangesRequestChangesItem

client = CloudPDFClient(
token="<token>",
base_url="https://yourhost.com/path/to/api",
)

client.shares.exchange(
share_token="shareToken",
client.doc.changes(
doc_id="docId",
layer_name="layerName",
changes=[
DocChangesRequestChangesItem(
op_id="opId",
)
],
)
```

Expand All @@ -52,6 +59,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t

```python
import asyncio
from cloudpdf.doc import DocChangesRequestChangesItem

from cloudpdf import AsyncCloudPDFClient

Expand All @@ -62,8 +70,14 @@ client = AsyncCloudPDFClient(


async def main() -> None:
await client.shares.exchange(
share_token="shareToken",
await client.doc.changes(
doc_id="docId",
layer_name="layerName",
changes=[
DocChangesRequestChangesItem(
op_id="opId",
)
],
)


Expand All @@ -79,7 +93,7 @@ will be thrown.
from cloudpdf.core.api_error import ApiError

try:
client.shares.exchange(...)
client.doc.changes(...)
except ApiError as e:
print(e.status_code)
print(e.body)
Expand All @@ -96,7 +110,7 @@ The `.with_raw_response` property returns a "raw" client that can be used to acc
from cloudpdf import CloudPDFClient

client = CloudPDFClient(...)
response = client.shares.with_raw_response.exchange(...)
response = client.doc.with_raw_response.changes(...)
print(response.headers) # access the response headers
print(response.status_code) # access the response status code
print(response.data) # access the underlying object
Expand Down Expand Up @@ -127,7 +141,7 @@ Which status codes are retried depends on the `retryStatusCodes` generator confi
Use the `max_retries` request option to configure this behavior.

```python
client.shares.exchange(..., request_options={
client.doc.changes(..., request_options={
"max_retries": 1
})
```
Expand All @@ -142,7 +156,7 @@ from cloudpdf import CloudPDFClient
client = CloudPDFClient(..., timeout=20.0)

# Override timeout for a specific method
client.shares.exchange(..., request_options={
client.doc.changes(..., request_options={
"timeout": 1
})
```
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": "python",
"canonicalVersion": "3.0.0-next.14",
"sdkVersion": "3.0.0a14",
"canonicalVersion": "3.0.0-next.15",
"sdkVersion": "3.0.0a15",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "188ea071e3534971638ee3d1fb1f19c77f36e04b2a783f5eefdbe67326527ea6",
"gitCommit": "b7dddfba5011349a40db7878b5cbc8685b2d42cf",
"openapiSha256": "9d70deca638cc7a80b0e670ec47fc45710d6603eb8f493d5fac95a38d7e5f8b3",
"gitCommit": "c6f87eecf9636e7ef367946a7fd7f3729401ce90",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "cloudpdf"
version = "3.0.0a14"
version = "3.0.0a15"
description = "The official Python SDK for the CloudPDF API."
readme = "README.md"
authors = ["CloudPDF <hello@cloudpdf.com>"]
Expand Down
Loading
Loading