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
Full Changelog: [v0.0.1...v4.1.295](https://github.com/beeper/desktop-api-python/compare/v0.0.1...v4.1.295)
6
+
7
+
### Features
8
+
9
+
***api:** bump for new endpoints ([f63e0e4](https://github.com/beeper/desktop-api-python/commit/f63e0e48e35789609f9c589684ab03a9ca97b28d))
***api:** remove limit from list routes ([d5cb6c2](https://github.com/beeper/desktop-api-python/commit/d5cb6c2ee132bc3d558552df145082396c80521c))
21
+
22
+
23
+
### Chores
24
+
25
+
* configure new SDK language ([d0b2ca6](https://github.com/beeper/desktop-api-python/commit/d0b2ca6bd2e9331cd42fe5143e0f94861502f11f))
26
+
* configure new SDK language ([d11b464](https://github.com/beeper/desktop-api-python/commit/d11b4641e572db6ceb07bb4b9d47b97beadd9253))
27
+
***internal:** detect missing future annotations with ruff ([5e05845](https://github.com/beeper/desktop-api-python/commit/5e058450070fedbd9730bd6ec57fa392974d09e1))
Alternatively, you can build from source and install the wheel file:
@@ -120,7 +120,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
120
120
121
121
### Publish with a GitHub workflow
122
122
123
-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/stainless-sdks/beeper-desktop-api-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
123
+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/beeper/desktop-api-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
@@ -90,8 +95,12 @@ async def main() -> None:
90
95
access_token="My Access Token",
91
96
http_client=DefaultAioHttpClient(),
92
97
) as client:
93
-
user_info =await client.token.info()
94
-
print(user_info.sub)
98
+
page =await client.chats.search(
99
+
include_muted=True,
100
+
limit=3,
101
+
type="single",
102
+
)
103
+
print(page.items)
95
104
96
105
97
106
asyncio.run(main())
@@ -106,6 +115,100 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
106
115
107
116
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
108
117
118
+
## Pagination
119
+
120
+
List methods in the Beeper Desktop API are paginated.
121
+
122
+
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
Nested parameters are dictionaries, typed using `TypedDict`, for example:
200
+
201
+
```python
202
+
from beeper_desktop_api import BeeperDesktop
203
+
204
+
client = BeeperDesktop()
205
+
206
+
client.chats.reminders.create(
207
+
chat_id="!NCdzlIaMjZUmvmvyHU:beeper.com",
208
+
reminder={"remind_at_ms": 0},
209
+
)
210
+
```
211
+
109
212
## Handling errors
110
213
111
214
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `beeper_desktop_api.APIConnectionError` is raised.
@@ -122,7 +225,7 @@ from beeper_desktop_api import BeeperDesktop
122
225
client = BeeperDesktop()
123
226
124
227
try:
125
-
client.token.info()
228
+
client.accounts.list()
126
229
except beeper_desktop_api.APIConnectionError as e:
127
230
print("The server could not be reached")
128
231
print(e.__cause__) # an underlying Exception, likely raised within httpx.
token= response.parse() # get the object that `token.info()` would have returned
236
-
print(token.sub)
338
+
account= response.parse() # get the object that `accounts.list()` would have returned
339
+
print(account)
237
340
```
238
341
239
-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/beeper-desktop-api-python/tree/main/src/beeper_desktop_api/_response.py) object.
342
+
These methods return an [`APIResponse`](https://github.com/beeper/desktop-api-python/tree/main/src/beeper_desktop_api/_response.py) object.
240
343
241
-
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/beeper-desktop-api-python/tree/main/src/beeper_desktop_api/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
344
+
The async client returns an [`AsyncAPIResponse`](https://github.com/beeper/desktop-api-python/tree/main/src/beeper_desktop_api/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
242
345
243
346
#### `.with_streaming_response`
244
347
@@ -247,7 +350,7 @@ The above interface eagerly reads the full response body when you make the reque
247
350
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
248
351
249
352
```python
250
-
with client.token.with_streaming_response.info() as response:
353
+
with client.accounts.with_streaming_response.list() as response:
251
354
print(response.headers.get("X-My-Header"))
252
355
253
356
for line in response.iter_lines():
@@ -342,7 +445,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
342
445
343
446
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
344
447
345
-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/beeper-desktop-api-python/issues) with questions, bugs, or suggestions.
448
+
We are keen for your feedback; please open an [issue](https://www.github.com/beeper/desktop-api-python/issues) with questions, bugs, or suggestions.
0 commit comments