Skip to content
Open
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
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ Instantiate and use the client with the following:

```python
from merge import Merge
from merge.resources.ats import ActivityRequest
from merge.resources.chat import DataPassthroughRequest, MethodEnum

client = Merge(
account_token="YOUR_ACCOUNT_TOKEN",
api_key="YOUR_API_KEY",
)
client.ats.activities.create(
is_debug_mode=True,
run_async=True,
model=ActivityRequest(),
remote_user_id="remote_user_id",
client.chat.async_passthrough.create(
request=DataPassthroughRequest(
method=MethodEnum.GET,
path="/scooters",
),
)
```

Expand Down Expand Up @@ -89,7 +89,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
import asyncio

from merge import AsyncMerge
from merge.resources.ats import ActivityRequest
from merge.resources.chat import DataPassthroughRequest, MethodEnum

client = AsyncMerge(
account_token="YOUR_ACCOUNT_TOKEN",
Expand All @@ -98,11 +98,11 @@ client = AsyncMerge(


async def main() -> None:
await client.ats.activities.create(
is_debug_mode=True,
run_async=True,
model=ActivityRequest(),
remote_user_id="remote_user_id",
await client.chat.async_passthrough.create(
request=DataPassthroughRequest(
method=MethodEnum.GET,
path="/scooters",
),
)


Expand All @@ -118,7 +118,7 @@ will be thrown.
from merge.core.api_error import ApiError

try:
client.ats.activities.create(...)
client.chat.async_passthrough.create(...)
except ApiError as e:
print(e.status_code)
print(e.body)
Expand All @@ -137,7 +137,7 @@ from merge import Merge
client = Merge(
...,
)
response = client.ats.activities.with_raw_response.create(...)
response = client.chat.async_passthrough.with_raw_response.create(...)
print(response.headers) # access the response headers
print(response.data) # access the underlying object
```
Expand All @@ -157,7 +157,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
Use the `max_retries` request option to configure this behavior.

```python
client.ats.activities.create(..., request_options={
client.chat.async_passthrough.create(..., request_options={
"max_retries": 1
})
```
Expand All @@ -177,7 +177,7 @@ client = Merge(


# Override timeout for a specific method
client.ats.activities.create(..., request_options={
client.chat.async_passthrough.create(..., request_options={
"timeout_in_seconds": 1
})
```
Expand Down Expand Up @@ -263,3 +263,4 @@ while response.next is not None:




2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "MergePythonClient"

[tool.poetry]
name = "MergePythonClient"
version = "2.6.2"
version = "2.6.3"
description = ""
readme = "README.md"
authors = []
Expand Down
Loading
Loading