Skip to content

Commit 0faa8c2

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#252)
1 parent 67e848d commit 0faa8c2

File tree

299 files changed

+1317
-1411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+1317
-1411
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
pull_request:
77
branches:
88
- v3
9+
- next
910

1011
jobs:
1112
lint:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $ pip install -r requirements-dev.lock
3232
## Modifying/Adding code
3333

3434
Most of the SDK is generated code, and any modified code will be overridden on the next generation. The
35-
`src/python_minus_intercom/lib/` and `examples/` directories are exceptions and will never be overridden.
35+
`src/python_intercom/lib/` and `examples/` directories are exceptions and will never be overridden.
3636

3737
## Adding and running examples
3838

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
1010

1111
## Documentation
1212

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).
1414

1515
## Installation
1616

@@ -28,7 +28,7 @@ The full API of this library can be found in [api.md](api.md).
2828

2929
```python
3030
import os
31-
from python_minus_intercom import Intercom
31+
from python_intercom import Intercom
3232

3333
client = Intercom(
3434
# This is the default and can be omitted
@@ -53,7 +53,7 @@ Simply import `AsyncIntercom` instead of `Intercom` and use `await` with each AP
5353
```python
5454
import os
5555
import asyncio
56-
from python_minus_intercom import AsyncIntercom
56+
from python_intercom import AsyncIntercom
5757

5858
client = AsyncIntercom(
5959
# This is the default and can be omitted
@@ -84,27 +84,27 @@ Typed requests and responses provide autocomplete and documentation within your
8484

8585
## Handling errors
8686

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.
8888

8989
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.
9191

92-
All errors inherit from `python_minus_intercom.APIError`.
92+
All errors inherit from `python_intercom.APIError`.
9393

9494
```python
95-
import python_minus_intercom
96-
from python_minus_intercom import Intercom
95+
import python_intercom
96+
from python_intercom import Intercom
9797

9898
client = Intercom()
9999

100100
try:
101101
client.me.retrieve()
102-
except python_minus_intercom.APIConnectionError as e:
102+
except python_intercom.APIConnectionError as e:
103103
print("The server could not be reached")
104104
print(e.__cause__) # an underlying Exception, likely raised within httpx.
105-
except python_minus_intercom.RateLimitError as e:
105+
except python_intercom.RateLimitError as e:
106106
print("A 429 status code was received; we should back off a bit.")
107-
except python_minus_intercom.APIStatusError as e:
107+
except python_intercom.APIStatusError as e:
108108
print("Another non-200-range status code was received")
109109
print(e.status_code)
110110
print(e.response)
@@ -132,7 +132,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
132132
You can use the `max_retries` option to configure or disable retry settings:
133133

134134
```python
135-
from python_minus_intercom import Intercom
135+
from python_intercom import Intercom
136136

137137
# Configure the default for all requests:
138138
client = Intercom(
@@ -150,7 +150,7 @@ By default requests time out after 1 minute. You can configure this with a `time
150150
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
151151

152152
```python
153-
from python_minus_intercom import Intercom
153+
from python_intercom import Intercom
154154

155155
# Configure the default for all requests:
156156
client = Intercom(
@@ -200,7 +200,7 @@ if response.my_field is None:
200200
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
201201

202202
```py
203-
from python_minus_intercom import Intercom
203+
from python_intercom import Intercom
204204

205205
client = Intercom()
206206
response = client.me.with_raw_response.retrieve()
@@ -210,9 +210,9 @@ me = response.parse() # get the object that `me.retrieve()` would have returned
210210
print(me.id)
211211
```
212212

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.
214214

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.
216216

217217
#### `.with_streaming_response`
218218

@@ -274,7 +274,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
274274
- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
275275

276276
```python
277-
from python_minus_intercom import Intercom, DefaultHttpxClient
277+
from python_intercom import Intercom, DefaultHttpxClient
278278

279279
client = Intercom(
280280
# Or use the `INTERCOM_BASE_URL` env var

0 commit comments

Comments
 (0)