-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: go live (#250) * feat(api): update via SDK Studio (#251) * feat(api): update via SDK Studio (#252) * chore: update SDK settings (#253) * release: 0.1.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
- Loading branch information
1 parent
44d360a
commit 7727515
Showing
311 changed files
with
1,514 additions
and
1,514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.prism.log | ||
.vscode | ||
_dev | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.0.1" | ||
".": "0.1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Changelog | ||
|
||
## 0.1.0 (2024-07-17) | ||
|
||
Full Changelog: [v0.0.1...v0.1.0](https://github.com/intercom/python-intercom/compare/v0.0.1...v0.1.0) | ||
|
||
### Features | ||
|
||
* **api:** OpenAPI spec update ([7b99dc3](https://github.com/intercom/python-intercom/commit/7b99dc3ea6ce3c61845510a06f313624d92db628)) | ||
* **api:** OpenAPI spec update ([632e659](https://github.com/intercom/python-intercom/commit/632e659f6a0694e1c262e77d8a1da664e67488fa)) | ||
* **api:** OpenAPI spec update ([a561dff](https://github.com/intercom/python-intercom/commit/a561dffa1225722412e78890ea2668f58a3d6aa9)) | ||
* **api:** update via SDK Studio ([44d360a](https://github.com/intercom/python-intercom/commit/44d360a2e477e2e3cbc2441a2f1ef6dae51e6331)) | ||
* **api:** update via SDK Studio ([4f981c5](https://github.com/intercom/python-intercom/commit/4f981c5818eb35a61bcd98952c30322cce6b4e77)) | ||
* **api:** update via SDK Studio ([1802937](https://github.com/intercom/python-intercom/commit/1802937e0c6c1366861f4d54d62335b132a6aca8)) | ||
* **api:** update via SDK Studio ([c5ee578](https://github.com/intercom/python-intercom/commit/c5ee5781b766f90017b9e40e040dc6ee4010b403)) | ||
* **api:** update via SDK Studio ([8d1d513](https://github.com/intercom/python-intercom/commit/8d1d5135cd2ad5a9e92116611e42e5ce471e4c55)) | ||
* **api:** update via SDK Studio ([4b7275f](https://github.com/intercom/python-intercom/commit/4b7275faddb82e20d8beb21ad5d1edf8d1ff4e39)) | ||
* **api:** update via SDK Studio ([cd48024](https://github.com/intercom/python-intercom/commit/cd480246a573bc08a1cc1182a318f1b3a3b6d709)) | ||
* **api:** update via SDK Studio ([dfd8fba](https://github.com/intercom/python-intercom/commit/dfd8fbaea39b1e55b22ee632f7558e96a349e473)) | ||
* **api:** update via SDK Studio ([0bd7ae4](https://github.com/intercom/python-intercom/commit/0bd7ae43a2ecfb9f6a190e50a72a139e772a279f)) | ||
* **api:** update via SDK Studio ([638c48b](https://github.com/intercom/python-intercom/commit/638c48b6b6aa01b49232d89b8a8e8509055fc062)) | ||
* **api:** update via SDK Studio ([bce089e](https://github.com/intercom/python-intercom/commit/bce089efbaf0406130d1ded51c15b752f332bc94)) | ||
* **api:** update via SDK Studio ([635b1d1](https://github.com/intercom/python-intercom/commit/635b1d18a40f730ab28529301297a809e1c9d5dc)) | ||
* **api:** update via SDK Studio ([b1b9219](https://github.com/intercom/python-intercom/commit/b1b92197c2758c1f121f52cf636033c4b9ba6f42)) | ||
* **api:** update via SDK Studio ([e3069e9](https://github.com/intercom/python-intercom/commit/e3069e903f7188941c2a6f69a982bf6e49a04313)) | ||
* **api:** update via SDK Studio ([6210114](https://github.com/intercom/python-intercom/commit/62101148adf4ecf0b5aeea53b110feaaba296ede)) | ||
* **api:** update via SDK Studio ([aff3c46](https://github.com/intercom/python-intercom/commit/aff3c46f12717bee8bc2a662cd99f34c73e959af)) | ||
* **api:** update via SDK Studio ([#251](https://github.com/intercom/python-intercom/issues/251)) ([67e848d](https://github.com/intercom/python-intercom/commit/67e848dfa7681cf197fab68a74d492b6b8f35c39)) | ||
* **api:** update via SDK Studio ([#252](https://github.com/intercom/python-intercom/issues/252)) ([0faa8c2](https://github.com/intercom/python-intercom/commit/0faa8c2b3d4557242e1f2ee5dd86bd3c60e11fb7)) | ||
|
||
|
||
### Chores | ||
|
||
* go live ([#250](https://github.com/intercom/python-intercom/issues/250)) ([6e3ce75](https://github.com/intercom/python-intercom/commit/6e3ce753e0578fb82d79c77fd4f3dd1184839b4d)) | ||
* update SDK settings ([#253](https://github.com/intercom/python-intercom/issues/253)) ([a937722](https://github.com/intercom/python-intercom/commit/a9377223662206e95044d70d44e6f76307204c0d)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,25 +10,22 @@ It is generated with [Stainless](https://www.stainlessapi.com/). | |
|
||
## Documentation | ||
|
||
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). | ||
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). | ||
|
||
## Installation | ||
|
||
```sh | ||
# install from the production repo | ||
pip install git+ssh://[email protected]/intercom/python-intercom#v3.git | ||
# install from PyPI | ||
pip install python-intercom | ||
``` | ||
|
||
> [!NOTE] | ||
> Once this package is [published to PyPI](https://app.stainlessapi.com/docs/guides/publish), this will become: `pip install python-intercom` | ||
## Usage | ||
|
||
The full API of this library can be found in [api.md](api.md). | ||
|
||
```python | ||
import os | ||
from python_minus_intercom import Intercom | ||
from python_intercom import Intercom | ||
|
||
client = Intercom( | ||
# This is the default and can be omitted | ||
|
@@ -53,7 +50,7 @@ Simply import `AsyncIntercom` instead of `Intercom` and use `await` with each AP | |
```python | ||
import os | ||
import asyncio | ||
from python_minus_intercom import AsyncIntercom | ||
from python_intercom import AsyncIntercom | ||
|
||
client = AsyncIntercom( | ||
# This is the default and can be omitted | ||
|
@@ -84,27 +81,27 @@ Typed requests and responses provide autocomplete and documentation within your | |
|
||
## Handling errors | ||
|
||
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. | ||
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. | ||
|
||
When the API returns a non-success status code (that is, 4xx or 5xx | ||
response), a subclass of `python_minus_intercom.APIStatusError` is raised, containing `status_code` and `response` properties. | ||
response), a subclass of `python_intercom.APIStatusError` is raised, containing `status_code` and `response` properties. | ||
|
||
All errors inherit from `python_minus_intercom.APIError`. | ||
All errors inherit from `python_intercom.APIError`. | ||
|
||
```python | ||
import python_minus_intercom | ||
from python_minus_intercom import Intercom | ||
import python_intercom | ||
from python_intercom import Intercom | ||
|
||
client = Intercom() | ||
|
||
try: | ||
client.me.retrieve() | ||
except python_minus_intercom.APIConnectionError as e: | ||
except python_intercom.APIConnectionError as e: | ||
print("The server could not be reached") | ||
print(e.__cause__) # an underlying Exception, likely raised within httpx. | ||
except python_minus_intercom.RateLimitError as e: | ||
except python_intercom.RateLimitError as e: | ||
print("A 429 status code was received; we should back off a bit.") | ||
except python_minus_intercom.APIStatusError as e: | ||
except python_intercom.APIStatusError as e: | ||
print("Another non-200-range status code was received") | ||
print(e.status_code) | ||
print(e.response) | ||
|
@@ -132,7 +129,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ | |
You can use the `max_retries` option to configure or disable retry settings: | ||
|
||
```python | ||
from python_minus_intercom import Intercom | ||
from python_intercom import Intercom | ||
|
||
# Configure the default for all requests: | ||
client = Intercom( | ||
|
@@ -150,7 +147,7 @@ By default requests time out after 1 minute. You can configure this with a `time | |
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: | ||
|
||
```python | ||
from python_minus_intercom import Intercom | ||
from python_intercom import Intercom | ||
|
||
# Configure the default for all requests: | ||
client = Intercom( | ||
|
@@ -200,7 +197,7 @@ if response.my_field is None: | |
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g., | ||
|
||
```py | ||
from python_minus_intercom import Intercom | ||
from python_intercom import Intercom | ||
|
||
client = Intercom() | ||
response = client.me.with_raw_response.retrieve() | ||
|
@@ -210,9 +207,9 @@ me = response.parse() # get the object that `me.retrieve()` would have returned | |
print(me.id) | ||
``` | ||
|
||
These methods return an [`APIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_minus_intercom/_response.py) object. | ||
These methods return an [`APIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_intercom/_response.py) object. | ||
|
||
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. | ||
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. | ||
|
||
#### `.with_streaming_response` | ||
|
||
|
@@ -274,7 +271,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c | |
- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality | ||
|
||
```python | ||
from python_minus_intercom import Intercom, DefaultHttpxClient | ||
from python_intercom import Intercom, DefaultHttpxClient | ||
|
||
client = Intercom( | ||
# Or use the `INTERCOM_BASE_URL` env var | ||
|
Oops, something went wrong.