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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fintercom%2Fpython-intercom)
[![pypi](https://img.shields.io/pypi/v/python-intercom)](https://pypi.python.org/pypi/python-intercom)

The Intercom Python library provides convenient access to the Intercom API from Python.
The Intercom Python library provides convenient access to the Intercom APIs from Python.

## Installation

Expand All @@ -25,12 +25,8 @@ from intercom import Intercom
client = Intercom(
token="YOUR_TOKEN",
)
client.articles.create(
title="Thanks for everything",
description="Description of the Article",
body="Body of the Article",
author_id=1295,
state="published",
client.ai_content.create_content_import_source(
url="https://www.example.com",
)
```

Expand All @@ -49,12 +45,8 @@ client = AsyncIntercom(


async def main() -> None:
await client.articles.create(
title="Thanks for everything",
description="Description of the Article",
body="Body of the Article",
author_id=1295,
state="published",
await client.ai_content.create_content_import_source(
url="https://www.example.com",
)


Expand All @@ -70,7 +62,7 @@ will be thrown.
from intercom.core.api_error import ApiError

try:
client.articles.create(...)
client.ai_content.create_content_import_source(...)
except ApiError as e:
print(e.status_code)
print(e.body)
Expand Down Expand Up @@ -107,7 +99,7 @@ from intercom import Intercom
client = Intercom(
...,
)
response = client.articles.with_raw_response.create(...)
response = client.ai_content.with_raw_response.create_content_import_source(...)
print(response.headers) # access the response headers
print(response.data) # access the underlying object
pager = client.articles.list(...)
Expand Down Expand Up @@ -135,7 +127,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.articles.create(..., request_options={
client.ai_content.create_content_import_source(..., request_options={
"max_retries": 1
})
```
Expand All @@ -155,7 +147,7 @@ client = Intercom(


# Override timeout for a specific method
client.articles.create(..., request_options={
client.ai_content.create_content_import_source(..., request_options={
"timeout_in_seconds": 1
})
```
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 = "python-intercom"

[tool.poetry]
name = "python-intercom"
version = "4.0.0"
version = "5.0.0"
description = ""
readme = "README.md"
authors = []
Expand Down
Loading
Loading