You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
10
10
11
11
## Documentation
12
12
13
-
The REST API documentation can be found [on developers.intercom.com](https://developers.intercom.com). The full API of this library can be found in [api.md](api.md).
13
+
The REST API documentation can be found on [developers.intercom.com](https://developers.intercom.com). The full API of this library can be found in [api.md](api.md).
14
14
15
15
## Installation
16
16
@@ -28,7 +28,7 @@ The full API of this library can be found in [api.md](api.md).
28
28
29
29
```python
30
30
import os
31
-
frompython_minus_intercomimport Intercom
31
+
frompython_intercomimport Intercom
32
32
33
33
client = Intercom(
34
34
# This is the default and can be omitted
@@ -53,7 +53,7 @@ Simply import `AsyncIntercom` instead of `Intercom` and use `await` with each AP
53
53
```python
54
54
import os
55
55
import asyncio
56
-
frompython_minus_intercomimport AsyncIntercom
56
+
frompython_intercomimport AsyncIntercom
57
57
58
58
client = AsyncIntercom(
59
59
# This is the default and can be omitted
@@ -84,27 +84,27 @@ Typed requests and responses provide autocomplete and documentation within your
84
84
85
85
## Handling errors
86
86
87
-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `python_minus_intercom.APIConnectionError` is raised.
87
+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `python_intercom.APIConnectionError` is raised.
88
88
89
89
When the API returns a non-success status code (that is, 4xx or 5xx
90
-
response), a subclass of `python_minus_intercom.APIStatusError` is raised, containing `status_code` and `response` properties.
90
+
response), a subclass of `python_intercom.APIStatusError` is raised, containing `status_code` and `response` properties.
91
91
92
-
All errors inherit from `python_minus_intercom.APIError`.
92
+
All errors inherit from `python_intercom.APIError`.
93
93
94
94
```python
95
-
importpython_minus_intercom
96
-
frompython_minus_intercomimport Intercom
95
+
importpython_intercom
96
+
frompython_intercomimport Intercom
97
97
98
98
client = Intercom()
99
99
100
100
try:
101
101
client.me.retrieve()
102
-
exceptpython_minus_intercom.APIConnectionError as e:
102
+
exceptpython_intercom.APIConnectionError as e:
103
103
print("The server could not be reached")
104
104
print(e.__cause__) # an underlying Exception, likely raised within httpx.
105
-
exceptpython_minus_intercom.RateLimitError as e:
105
+
exceptpython_intercom.RateLimitError as e:
106
106
print("A 429 status code was received; we should back off a bit.")
107
-
exceptpython_minus_intercom.APIStatusError as e:
107
+
exceptpython_intercom.APIStatusError as e:
108
108
print("Another non-200-range status code was received")
109
109
print(e.status_code)
110
110
print(e.response)
@@ -132,7 +132,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
132
132
You can use the `max_retries` option to configure or disable retry settings:
133
133
134
134
```python
135
-
frompython_minus_intercomimport Intercom
135
+
frompython_intercomimport Intercom
136
136
137
137
# Configure the default for all requests:
138
138
client = Intercom(
@@ -150,7 +150,7 @@ By default requests time out after 1 minute. You can configure this with a `time
150
150
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
151
151
152
152
```python
153
-
frompython_minus_intercomimport Intercom
153
+
frompython_intercomimport Intercom
154
154
155
155
# Configure the default for all requests:
156
156
client = Intercom(
@@ -200,7 +200,7 @@ if response.my_field is None:
200
200
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
201
201
202
202
```py
203
-
frompython_minus_intercomimport Intercom
203
+
frompython_intercomimport Intercom
204
204
205
205
client = Intercom()
206
206
response = client.me.with_raw_response.retrieve()
@@ -210,9 +210,9 @@ me = response.parse() # get the object that `me.retrieve()` would have returned
210
210
print(me.id)
211
211
```
212
212
213
-
These methods return an [`APIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_minus_intercom/_response.py) object.
213
+
These methods return an [`APIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_intercom/_response.py) object.
214
214
215
-
The async client returns an [`AsyncAPIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_minus_intercom/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
215
+
The async client returns an [`AsyncAPIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_intercom/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
216
216
217
217
#### `.with_streaming_response`
218
218
@@ -274,7 +274,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
0 commit comments