Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: update pagination usage in README.md#855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tiwarishubham635 merged 2 commits intomainfromadd-readme
Apr 10, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,6 +193,8 @@ The library automatically handles paging for you. Collections, such as `calls` a

`list` eagerly fetches all records and returns them as a list, whereas `stream` returns an iterator and lazily retrieves pages of records as you iterate over the collection. You can also page manually using the `page` method.

`page_size` as a parameter is used to tell how many records should we get in every page and `limit` parameter is used to limit the max number of records we want to fetch.

#### Use the `list` method

```python
Expand All@@ -206,6 +208,21 @@ for sms in client.messages.list():
print(sms.to)
```

```python
client.messages.list(limit=20, page_size=20)
```
This will make 1 call that will fetch 20 records from backend service.

```python
client.messages.list(limit=20, page_size=10)
```
This will make 2 calls that will fetch 10 records each from backend service.

```python
client.messages.list(limit=20, page_size=100)
```
This will make 1 call which will fetch 100 records but user will get only 20 records.

### Asynchronous API Requests

By default, the Twilio Client will make synchronous requests to the Twilio API. To allow for asynchronous, non-blocking requests, we've included an optional asynchronous HTTP client. When used with the Client and the accompanying `*_async` methods, requests made to the Twilio API will be performed asynchronously.
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp