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
+99-9Lines changed: 99 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,12 @@ client = BeeperDesktop(
33
33
access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted
34
34
)
35
35
36
-
accounts = client.accounts.list()
36
+
page = client.chats.search(
37
+
include_muted=True,
38
+
limit=3,
39
+
type="single",
40
+
)
41
+
print(page.items)
37
42
```
38
43
39
44
While you can provide a `access_token` keyword argument,
@@ -56,7 +61,12 @@ client = AsyncBeeperDesktop(
56
61
57
62
58
63
asyncdefmain() -> None:
59
-
accounts =await client.accounts.list()
64
+
page =await client.chats.search(
65
+
include_muted=True,
66
+
limit=3,
67
+
type="single",
68
+
)
69
+
print(page.items)
60
70
61
71
62
72
asyncio.run(main())
@@ -88,7 +98,12 @@ async def main() -> None:
88
98
access_token="My Access Token",
89
99
http_client=DefaultAioHttpClient(),
90
100
) as client:
91
-
accounts =await client.accounts.list()
101
+
page =await client.chats.search(
102
+
include_muted=True,
103
+
limit=3,
104
+
type="single",
105
+
)
106
+
print(page.items)
92
107
93
108
94
109
asyncio.run(main())
@@ -103,6 +118,85 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
103
118
104
119
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`.
105
120
121
+
## Pagination
122
+
123
+
List methods in the Beeper Desktop API are paginated.
124
+
125
+
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
0 commit comments